Lucid Database Size Question

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Lucid Database Size Question

Emily Gouge
I'm hoping someone and tell me how I can get back harddrive space once I've dropped a large table or
schema?

I've noticed that my installation of lucid doesn't seem to give back hard drive space when tables or
schema's are dropped.  For example I can load a couple 270 million row tables which use approx 23G
of space.  If I drop these tables and try to reload them I end up running out of hard drive space.

Is there some command I need to run to compress the database after dropping large tables?

Thanks,
Emily


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

Zelaine Fong-3
Run ALTER SYSTEM DEALLOCATE OLD after dropping the tables.  It sounds
like you're using a version of LucidDB that supports snaphot/versioning.
  With that feature, you need to explicitly execute the command above in
order to free up space that's been deallocated.

-- Zelaine

Emily Gouge wrote:

> I'm hoping someone and tell me how I can get back harddrive space once I've dropped a large table or
> schema?
>
> I've noticed that my installation of lucid doesn't seem to give back hard drive space when tables or
> schema's are dropped.  For example I can load a couple 270 million row tables which use approx 23G
> of space.  If I drop these tables and try to reload them I end up running out of hard drive space.
>
> Is there some command I need to run to compress the database after dropping large tables?
>
> Thanks,
> Emily
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> luciddb-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luciddb-users



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

John Sichi
Administrator
For some additional info, see section "Page Multi-versioning" in this doc:

http://docs.eigenbase.org/LucidDbConcurrencyControl

JVS

Zelaine Fong wrote:

> Run ALTER SYSTEM DEALLOCATE OLD after dropping the tables.  It sounds
> like you're using a version of LucidDB that supports snaphot/versioning.
>   With that feature, you need to explicitly execute the command above in
> order to free up space that's been deallocated.
>
> -- Zelaine
>
> Emily Gouge wrote:
>> I'm hoping someone and tell me how I can get back harddrive space once I've dropped a large table or
>> schema?
>>
>> I've noticed that my installation of lucid doesn't seem to give back hard drive space when tables or
>> schema's are dropped.  For example I can load a couple 270 million row tables which use approx 23G
>> of space.  If I drop these tables and try to reload them I end up running out of hard drive space.
>>
>> Is there some command I need to run to compress the database after dropping large tables?
>>
>> Thanks,
>> Emily
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> luciddb-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/luciddb-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> luciddb-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luciddb-users
>



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Like and Indexes

Emily Gouge
Hi again,

Can somebody tell me if it's possible to have "like" use an column index for string comparisons?
I'm wondering if I need to create a special index type.

For example the following query uses the index created on column iv_xy:
select * from habc.location_dimension_tmp where iv_xy = '11';

however if the = is changed to 'like' then the index is no longer used (ultimately I'd like to use
wildcard characters too):
select * from habc.location_dimension_tmp where iv_xy like '11';

The query plans are below.

Thanks again for the help.
Emily

QUERY PLANS (generated using "explain plan for <query>")
"=":
FennelToIteratorConverter
     LcsRowScanRel(table=[[LOCALDB, HABC, LOCATION_DIMENSION_TMP]], projection=[*], clustered
indexes=[[SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_XY,
SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_YX,
SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$LOC_KEY, SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$X,
SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$Y]])
         LcsIndexSearchRel(table=[[LOCALDB, HABC, LOCATION_DIMENSION_TMP]],
index=[LOCATION_DIM_TMP_IV_XY], projection=[*], inputKeyProj=[[1, 3]], inputDirectiveProj=[[0, 2]],
startRidParamId=[0], rowLimitParamId=[0])

"like":
IterCalcRel(expr#0..4=[{inputs}], expr#5=['11'], expr#6=[LIKE($t3, $t5)], proj#0..4=[{exprs}],
$condition=[$t6])
     FennelToIteratorConverter
         LcsRowScanRel(table=[[LOCALDB, HABC, LOCATION_DIMENSION_TMP]], projection=[*], clustered
indexes=[[SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_XY,
SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_YX,
SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$LOC_KEY, SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$X,
SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$Y]])





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Like and Indexes

Zelaine Fong-3
No, LucidDB currently doesn't handle LIKE's with indexes.  This is
logged as a TODO in http://jirahost.eigenbase.org:8081/browse/LDB-78.

-- Zelaine

Emily Gouge wrote:

> Hi again,
>
> Can somebody tell me if it's possible to have "like" use an column index for string comparisons?
> I'm wondering if I need to create a special index type.
>
> For example the following query uses the index created on column iv_xy:
> select * from habc.location_dimension_tmp where iv_xy = '11';
>
> however if the = is changed to 'like' then the index is no longer used (ultimately I'd like to use
> wildcard characters too):
> select * from habc.location_dimension_tmp where iv_xy like '11';
>
> The query plans are below.
>
> Thanks again for the help.
> Emily
>
> QUERY PLANS (generated using "explain plan for <query>")
> "=":
> FennelToIteratorConverter
>      LcsRowScanRel(table=[[LOCALDB, HABC, LOCATION_DIMENSION_TMP]], projection=[*], clustered
> indexes=[[SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_XY,
> SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_YX,
> SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$LOC_KEY, SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$X,
> SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$Y]])
>          LcsIndexSearchRel(table=[[LOCALDB, HABC, LOCATION_DIMENSION_TMP]],
> index=[LOCATION_DIM_TMP_IV_XY], projection=[*], inputKeyProj=[[1, 3]], inputDirectiveProj=[[0, 2]],
> startRidParamId=[0], rowLimitParamId=[0])
>
> "like":
> IterCalcRel(expr#0..4=[{inputs}], expr#5=['11'], expr#6=[LIKE($t3, $t5)], proj#0..4=[{exprs}],
> $condition=[$t6])
>      FennelToIteratorConverter
>          LcsRowScanRel(table=[[LOCALDB, HABC, LOCATION_DIMENSION_TMP]], projection=[*], clustered
> indexes=[[SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_XY,
> SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$IV_YX,
> SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$LOC_KEY, SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$X,
> SYS$CLUSTERED_INDEX$LOCATION_DIMENSION_TMP$Y]])
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> luciddb-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luciddb-users



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

new docs on some admin topics

John Sichi
Administrator
I have added a couple of docs to the LucidDB admin guide.

How to backup and restore a LucidDB instance (rather important since
catalog crash recovery still isn't 100% bulletproof):

http://docs.eigenbase.org/LucidDbBackupRestore

How to change the amount of memory used by LucidDB's buffer pool for
data cache and execution algorithms (useful for tuning with large data
volumes):

http://docs.eigenbase.org/LucidDbBufferPoolSizing

JVS


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Like and Indexes

John Sichi
Administrator
In reply to this post by Zelaine Fong-3
By the way, in cases where LIKE's wildcards are not expressive enough,
you can instead use the SQL:2003 SIMILAR predicate.  See example at the
bottom of this message.  The pattern syntax is along the lines of
standard regular expressions, except that it uses underscore instead of
dot for the match-one-character wildcard.  As with LIKE, the optimizer
does not yet know how to use indexes for the search.  The unindexed
evaluation for both LIKE and SIMILAR is via compilation to java.util.regex.

0: jdbc:luciddb:> select * from sys_root.dba_system_parameters
where param_name similar to '_*(Init|Max)Size';
+----------------------------+--------------+
|         PARAM_NAME         | PARAM_VALUE  |
+----------------------------+--------------+
| databaseInitSize           | 1000         |
| databaseMaxSize            | 0            |
| tempInitSize               | 1000         |
| tempMaxSize                | 0            |
| databaseShadowLogInitSize  | 2000         |
| databaseTxnLogInitSize     | 2000         |
+----------------------------+--------------+

JVS


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

Jeremy Lemaire
In reply to this post by John Sichi
Hello,

I tried using ALTER SYSTEM DEALLOCATE OLD to cleanup after I dropped some tables and the server crashed.  In fact I tried several times and it crashed each time.  I am using v.0.9.2 and the stack trace is below.  Any thoughts?

Thanks
-h


Mar 21, 2010 11:43:06 PM net.sf.farrago.db.FarragoDbSession prepare
INFO:
ALTER SYSTEM DEALLOCATE OLD
Mar 21, 2010 11:43:06 PM net.sf.farrago.db.FarragoDbSession commitImpl
INFO: commit
Mar 21, 2010 11:43:06 PM net.sf.fennel.backtrace <native>
SEVERE: *** CAUGHT SIGNAL 6; BACKTRACE:
/home/lucid/luciddb/lib/fennel/libfennel_common.so(fennel::AutoBacktrace::signal_handler(int)+0x51) [0x2ad21]
/lib/libpthread.so.0 [0x7f4240f5ca80]
/lib/libc.so.6(gsignal+0x35) [0x7f4240a28ed5]
/lib/libc.so.6(abort+0x183) [0x7f4240a2a3f3]
/home/lucid/luciddb/lib/fennel/libstlport.so.5.1(__gnu_cxx::__verbose_terminate_handler()+0x114) [0x80104]
/home/lucid/luciddb/lib/fennel/libstlport.so.5.1(__cxxabiv1::__terminate(void (*)())+0x6) [0x7e506]
/home/lucid/luciddb/lib/fennel/libstlport.so.5.1 [0x7f41a6000533]
/home/lucid/luciddb/lib/fennel/libstlport.so.5.1 [0x7f41a600061a]
/home/lucid/luciddb/lib/fennel/libfennel_device.so(fennel::FileDevice::FileDevice(stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> >, fennel::DeviceMode, unsigned long)+0x328) [0xa2f8]
/home/lucid/luciddb/lib/fennel/libfennel_device.so(fennel::RandomAccessFileDevice::RandomAccessFileDevice(stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> >, fennel::DeviceMode)+0x83) [0xd083]
/home/lucid/luciddb/lib/fennel/libfennel_segment.so(fennel::SegmentFactory::newTempDeviceSegment(boost::shared_ptr<fennel::Cache>, fennel::DeviceMode, stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> >)+0xcf) [0x473cf]
/home/lucid/luciddb/lib/fennel/libfennel_segment.so(fennel::SpillOutputStream::spill()+0xae) [0x59b2e]
/home/lucid/luciddb/lib/fennel/libfennel_segment.so(fennel::SpillOutputStream::flushBuffer(unsigned int)+0x28) [0x5a098]
/home/lucid/luciddb/lib/fennel/libfennel_common.so(fennel::ByteOutputStream::hardPageBreak()+0xb) [0x3045b]
/home/lucid/luciddb/lib/fennel/libfennel_txn.so(fennel::LogicalTxnLog::checkpointTxn(boost::shared_ptr<fennel::LogicalTxn>)+0x3d) [0x1385d]
/home/lucid/luciddb/lib/fennel/libfennel_txn.so(fennel::LogicalTxnLog::checkpoint(fennel::LogicalTxnLogCheckpointMemento&, fennel::CheckpointType)+0x160) [0x160a0]
/home/lucid/luciddb/lib/fennel/libfennel_db.so(fennel::Database::checkpointImpl(fennel::CheckpointType)+0xc8) [0x14408]
/home/lucid/luciddb/lib/fennel/libfennel_db.so(fennel::CheckpointThread::run()+0xfd) [0x1253d]
/home/lucid/luciddb/lib/fennel/libfennel_common.so(fennel::Thread::initAndRun()+0x12) [0x551c2]
/home/lucid/luciddb/lib/fennel/libboost_thread-mt-p.so(thread_proxy+0x5f) [0x7f41a6b2fe1f]
/lib/libpthread.so.0 [0x7f4240f54fc7]
/lib/libc.so.6(clone+0x6d) [0x7f4240ac659d]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

John Sichi
Administrator
LucidDB is failing while trying to create a log file needed for making
the ALTER SYSTEM DEALLOCATE OLD operation atomic.  Maybe your disk is
full?  If so, delete some unneeded files and then try again.

JVS

haawker wrote:

> Hello,
>
> I tried using ALTER SYSTEM DEALLOCATE OLD to cleanup after I dropped some
> tables and the server crashed.  In fact I tried several times and it crashed
> each time.  I am using v.0.9.2 and the stack trace is below.  Any thoughts?
>
> Thanks
> -h
>
>
> Mar 21, 2010 11:43:06 PM net.sf.farrago.db.FarragoDbSession prepare
> INFO:
> ALTER SYSTEM DEALLOCATE OLD
> Mar 21, 2010 11:43:06 PM net.sf.farrago.db.FarragoDbSession commitImpl
> INFO: commit
> Mar 21, 2010 11:43:06 PM net.sf.fennel.backtrace <native>
> SEVERE: *** CAUGHT SIGNAL 6; BACKTRACE:
> /home/lucid/luciddb/lib/fennel/libfennel_common.so(fennel::AutoBacktrace::signal_handler(int)+0x51)
> [0x2ad21]
> /lib/libpthread.so.0 [0x7f4240f5ca80]
> /lib/libc.so.6(gsignal+0x35) [0x7f4240a28ed5]
> /lib/libc.so.6(abort+0x183) [0x7f4240a2a3f3]
> /home/lucid/luciddb/lib/fennel/libstlport.so.5.1(__gnu_cxx::__verbose_terminate_handler()+0x114)
> [0x80104]
> /home/lucid/luciddb/lib/fennel/libstlport.so.5.1(__cxxabiv1::__terminate(void
> (*)())+0x6) [0x7e506]
> /home/lucid/luciddb/lib/fennel/libstlport.so.5.1 [0x7f41a6000533]
> /home/lucid/luciddb/lib/fennel/libstlport.so.5.1 [0x7f41a600061a]
> /home/lucid/luciddb/lib/fennel/libfennel_device.so(fennel::FileDevice::FileDevice(stlp_std::basic_string<char,
> stlp_std::char_traits<char>, stlp_std::allocator<char> >,
> fennel::DeviceMode, unsigned long)+0x328) [0xa2f8]
> /home/lucid/luciddb/lib/fennel/libfennel_device.so(fennel::RandomAccessFileDevice::RandomAccessFileDevice(stlp_std::basic_string<char,
> stlp_std::char_traits<char>, stlp_std::allocator<char> >,
> fennel::DeviceMode)+0x83) [0xd083]
> /home/lucid/luciddb/lib/fennel/libfennel_segment.so(fennel::SegmentFactory::newTempDeviceSegment(boost::shared_ptr<fennel::Cache>,
> fennel::DeviceMode, stlp_std::basic_string<char,
> stlp_std::char_traits<char>, stlp_std::allocator<char> >)+0xcf) [0x473cf]
> /home/lucid/luciddb/lib/fennel/libfennel_segment.so(fennel::SpillOutputStream::spill()+0xae)
> [0x59b2e]
> /home/lucid/luciddb/lib/fennel/libfennel_segment.so(fennel::SpillOutputStream::flushBuffer(unsigned
> int)+0x28) [0x5a098]
> /home/lucid/luciddb/lib/fennel/libfennel_common.so(fennel::ByteOutputStream::hardPageBreak()+0xb)
> [0x3045b]
> /home/lucid/luciddb/lib/fennel/libfennel_txn.so(fennel::LogicalTxnLog::checkpointTxn(boost::shared_ptr<fennel::LogicalTxn>)+0x3d)
> [0x1385d]
> /home/lucid/luciddb/lib/fennel/libfennel_txn.so(fennel::LogicalTxnLog::checkpoint(fennel::LogicalTxnLogCheckpointMemento&,
> fennel::CheckpointType)+0x160) [0x160a0]
> /home/lucid/luciddb/lib/fennel/libfennel_db.so(fennel::Database::checkpointImpl(fennel::CheckpointType)+0xc8)
> [0x14408]
> /home/lucid/luciddb/lib/fennel/libfennel_db.so(fennel::CheckpointThread::run()+0xfd)
> [0x1253d]
> /home/lucid/luciddb/lib/fennel/libfennel_common.so(fennel::Thread::initAndRun()+0x12)
> [0x551c2]
> /home/lucid/luciddb/lib/fennel/libboost_thread-mt-p.so(thread_proxy+0x5f)
> [0x7f41a6b2fe1f]
> /lib/libpthread.so.0 [0x7f4240f54fc7]
> /lib/libc.so.6(clone+0x6d) [0x7f4240ac659d]
>


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

Jeremy Lemaire
I seem to have plenty of disk space.  Is it possible it is a permissions issue with directory the file is being written to? How can I tell which file is failing to get created?  

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda3            2878625464 798555316 1933844324  30% /
tmpfs                  8267964         0   8267964   0% /lib/init/rw
udev                     10240       772      9468   8% /dev
tmpfs                  8267964         0   8267964   0% /dev/shm
/dev/sda1               242078     16237    213341   8% /boot
/dev/sdb1            480721636  49354148 406948160  11% /media/spare

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 139264
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 139264
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

John Sichi
Administrator
It would be trying to create the temp log file under the luciddb/catalog
directory.  Besides permissions (unlikely unless you changed something
explicitly after installation), the other possibility is that somehow
the filesystem got mounted read-only?

The C++ stack at the point of crash is hard to interpret since line
numbers aren't available for the release build; it doesn't even look
like it is crashing on the call to open the file since it is dying
inside of libstlport.

JVS

haawker wrote:

> I seem to have plenty of disk space.  Is it possible it is a permissions
> issue with directory the file is being written to? How can I tell which file
> is failing to get created?  
>
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/sda3            2878625464 798555316 1933844324  30% /
> tmpfs                  8267964         0   8267964   0% /lib/init/rw
> udev                     10240       772      9468   8% /dev
> tmpfs                  8267964         0   8267964   0% /dev/shm
> /dev/sda1               242078     16237    213341   8% /boot
> /dev/sdb1            480721636  49354148 406948160  11% /media/spare
>
> core file size          (blocks, -c) 0
> data seg size           (kbytes, -d) unlimited
> scheduling priority             (-e) 0
> file size               (blocks, -f) unlimited
> pending signals                 (-i) 139264
> max locked memory       (kbytes, -l) 32
> max memory size         (kbytes, -m) unlimited
> open files                      (-n) 1024
> pipe size            (512 bytes, -p) 8
> POSIX message queues     (bytes, -q) 819200
> real-time priority              (-r) 0
> stack size              (kbytes, -s) 8192
> cpu time               (seconds, -t) unlimited
> max user processes              (-u) 139264
> virtual memory          (kbytes, -v) unlimited
> file locks                      (-x) unlimited
>
>


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

Jeremy Lemaire
The permissions where fine under the catalog directory.  What I did find however is that if I run lucidDbServer under screen instead of as a daemon process under Monit then the ALTER SYSTEM DEALLOCATE OLD statement works just fine.  I haven't found the exact source of the issue but I suspect the wrapper I have setup for the daemon, or the restart check in monit, is not initializing all of the file paths correctly.  Here is my defunct Monit setup:

## monitrc check for LucidDB Process
#
check process lucidDbServer with pidfile /var/run/lucid/lucidDbServer.pid
       start program = "/home/lucid/luciddb/bin/lucidDbService start"
         as uid lucid gid lucid
       stop program = "/home/lucid/luciddb/bin/lucidDbService stop"
         as uid lucid gid lucid
       if cpu usage is greater than 80 percent for 5 cycles then alert
       if 2 restarts within 3 cycles then timeout
alert noc@yourcompany.com


## lucidDbService wrapper 
## called by Monit check
#
#!/bin/sh
# $Id: //open/dev/farrago/dist/bin/farragoServer#4 $
# Run Farrago as a standalone RMI server
NAME=lucidDbServer
PIDFILE=/var/run/lucid/$NAME.pid
JAVA_HOME=/usr/opt/java
BIN_DIR=$(cd `dirname $0`; pwd)

. $BIN_DIR/defineFarragoRuntime.sh

case $1 in
    start)
       echo $$ > $PIDFILE;
       exec 2>&1 ${JAVA_EXEC} ${JAVA_ARGS} com.lucidera.farrago.LucidDbServer
       ;;
     stop)
       kill `cat $PIDFILE` ;;
     *)
       echo "usage: $NAME {start|stop}" ;;
esac
exit 0



## defineFarragoRuntime script called by
## lucidDbService wrapper
#
# $Id: //open/dev/farrago/dist/bin/defineFarragoRuntime.sh#7 $
# Define variables needed by runtime scripts such as farragoServer.
# This script is meant to be sourced from other scripts, not
# executed directly.

MAIN_DIR=$(cd `dirname $0`/..; pwd)

if [ ! -e "$MAIN_DIR/bin/classpath.gen" ]; then
    echo "Error:  $MAIN_DIR/install/install.sh has not been run yet."
    exit -1
fi

JAVA_ARGS="-Xms512m -Xmx2056m -cp `cat $MAIN_DIR/bin/classpath.gen` \
  -Dnet.sf.farrago.home=$MAIN_DIR \
  -Dorg.eigenbase.util.AWT_WORKAROUND=off \
  -Djava.util.logging.config.file=$MAIN_DIR/trace/Trace.properties"

SQLLINE_JAVA_ARGS="sqlline.SqlLine"

JAVA_EXEC=${JAVA_HOME}/bin/java

export LD_LIBRARY_PATH=$MAIN_DIR/plugin:$MAIN_DIR/lib/fennel

Does anybody have a working Monit setup they could post that it does not cause file write problems I am seeing?  
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Lucid Database Size Question

John Sichi
Administrator
I don't know anything about monit, but the inestimably talented Tom
Barber recently wrote up instructions for Java Service Wrapper:

http://n2.nabble.com/PG-MySQL-protocol-support-td4180819.html#a4486348

Both may have issues with clean shutdown; Nick and I have a pending JIRA
issue open for resolving that.

JVS

haawker wrote:

> The permissions where fine under the catalog directory.  What I did find
> however is that if I run lucidDbServer under screen instead of as a daemon
> process under Monit then the ALTER SYSTEM DEALLOCATE OLD statement works
> just fine.  I haven't found the exact source of the issue but I suspect the
> wrapper I have setup for the daemon, or the restart check in monit, is not
> initializing all of the file paths correctly.  Here is my defunct Monit
> setup:
>
> ## monitrc check for LucidDB Process
> #
> check process lucidDbServer with pidfile /var/run/lucid/lucidDbServer.pid
>        start program = "/home/lucid/luciddb/bin/lucidDbService start"
>          as uid lucid gid lucid
>        stop program = "/home/lucid/luciddb/bin/lucidDbService stop"
>          as uid lucid gid lucid
>        if cpu usage is greater than 80 percent for 5 cycles then alert
>        if 2 restarts within 3 cycles then timeout
> alert [hidden email]
>
>
> ## lucidDbService wrapper
> ## called by Monit check
> #
> #!/bin/sh
> # $Id: //open/dev/farrago/dist/bin/farragoServer#4 $
> # Run Farrago as a standalone RMI server
> NAME=lucidDbServer
> PIDFILE=/var/run/lucid/$NAME.pid
> JAVA_HOME=/usr/opt/java
> BIN_DIR=$(cd `dirname $0`; pwd)
>
> . $BIN_DIR/defineFarragoRuntime.sh
>
> case $1 in
>     start)
>        echo $$ > $PIDFILE;
>        exec 2>&1 ${JAVA_EXEC} ${JAVA_ARGS}
> com.lucidera.farrago.LucidDbServer
>        ;;
>      stop)
>        kill `cat $PIDFILE` ;;
>      *)
>        echo "usage: $NAME {start|stop}" ;;
> esac
> exit 0
>
>
>
> ## defineFarragoRuntime script called by
> ## lucidDbService wrapper
> #
> # $Id: //open/dev/farrago/dist/bin/defineFarragoRuntime.sh#7 $
> # Define variables needed by runtime scripts such as farragoServer.
> # This script is meant to be sourced from other scripts, not
> # executed directly.
>
> MAIN_DIR=$(cd `dirname $0`/..; pwd)
>
> if [ ! -e "$MAIN_DIR/bin/classpath.gen" ]; then
>     echo "Error:  $MAIN_DIR/install/install.sh has not been run yet."
>     exit -1
> fi
>
> JAVA_ARGS="-Xms512m -Xmx2056m -cp `cat $MAIN_DIR/bin/classpath.gen` \
>   -Dnet.sf.farrago.home=$MAIN_DIR \
>   -Dorg.eigenbase.util.AWT_WORKAROUND=off \
>   -Djava.util.logging.config.file=$MAIN_DIR/trace/Trace.properties"
>
> SQLLINE_JAVA_ARGS="sqlline.SqlLine"
>
> JAVA_EXEC=${JAVA_HOME}/bin/java
>
> export LD_LIBRARY_PATH=$MAIN_DIR/plugin:$MAIN_DIR/lib/fennel
>
> Does anybody have a working Monit setup they could post that it does not
> cause file write problems I am seeing?  


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Loading...