1.0

Table Of Contents
Set the disk store attribute ALLOWFORCECOMPACTION to true. This causes SQLFire to maintain extra data
about the les so that it can compact on demand. This is disabled by default to save space. You can run manual
online compaction at any time while the system is running. Oplogs eligible for compaction based on the
COMPACTIONTHRESHOLD are compacted into the current oplog.
Run manual compaction as needed. You can compact all online disk stores in a distributed system from the
command-line. For example:
sqlf compact-all-disk-stores
Note: This sqlf command requires a local sqlfire.properties le that contains properties
to locate the distributed system. Or, specify the multicast port or locator properties to connect to the
cluster (for example, -mcast-port= port_number).
Run Offline Compaction
Ofine compaction is a manual process. All log les are compacted as much as possible, regardless of how
much garbage they hold. Ofine compaction creates new log les for the compacted log records.
Use this syntax to compact individual ofine disk stores:
sqlf compact-disk-store myDiskStoreName /firstDir /secondDir
-maxOplogSize=maxMegabytesForOplog
You must provide all of the directories in the disk store. If no oplog max size is specied, SQLFire uses the
system default.
Ofine compaction can take a lot of memory. If you get a java.lang.OutOfMemory error while running
this, you made need to increase your heap size. See the sqlf command help for instructions on how to do this.
Performance Benefits of Manual Compaction
You can improve performance during busy times if you disable automatic compaction and run your own manual
compaction during lighter system load or during downtimes. You could run the API call after your application
performs a large set of data operations. You could run sqlf compact-all-disk-stores every night
when system use is very low.
To follow a strategy like this, you need to set aside enough disk space to accommodate all non-compacted disk
data. You might need to increase system monitoring to make sure you do not overrun your disk space. You may
be able to run only ofine compaction. If so, you can set ALLOWFORCECOMPACTION to false and avoid storing
the information required for manual online compaction.
Directory Size Limits
If you reach the disk directory size limits during compaction:
For automatic compaction, the system logs a warning, but does not stop.
For manual compaction, the operation stops and returns a DiskAccessException to the calling process,
reporting that the system has run out of disk space.
Example Compaction Run
In this example ofine compaction run listing, the disk store compaction had nothing to do in the *_3.* les,
so they were left alone. The *_4.* les had garbage records, so the oplog from them was compacted into the
new *_5.* les.
bash-2.05$ ls -ltra backupDirectory
total 28
-rw-rw-r-- 1 jpearson users 3 Apr 7 14:56 BACKUPds1_3.drf
vFabric SQLFire User's Guide82
Managing Your Data in vFabric SQLFire