Disk Store Configuration Parameters

Disk Store Configuration Parameters

You define your disk stores by using the gfsh create
disk-store command or in
<disk-store> subelements of your cache
declaration in cache.xml. All disk stores are available
for use by all of your regions and queues.

These <disk-store> attributes and subelements have
corresponding gfsh create disk-store command-line
parameters as well as getter and getter methods in the
com.gemstone.gemfire.cache.DiskStoreFactory and
com.gemstone.gemfire.cache.DiskStore APIs.

Disk Store Configuration Attributes and Elements

disk-store attribute

Description

Default

name

String used to identify this disk store. All
regions and queues select their disk store by
specifying this name.

DEFAULT

allow-force-compaction

Boolean indicating whether to allow manual
compaction through the API or command-line
tools.

false

auto-compact

Boolean indicating whether to automatically
compact a file when it reaches the
compaction-threshold.

true

compaction-threshold

Percentage of garbage allowed in the file
before it is eligible for compaction. Garbage is
created by entry destroys, entry updates, and
region destroys and creates. Surpassing this
percentage does not make compaction occur—it
makes the file eligible to be compacted when a
compaction is done.

50

disk-usage-critical-percentage

Disk usage above this threshold generates an
error message and shuts down the member's cache.
For example, if the threshold is set to 99%,
then falling under 10 GB of free disk space on a
1 TB drive generates the error and shuts down
the cache.

Set to "0" (zero) to
disable.

99

disk-usage-warning-percentage

Disk usage above this threshold generates a
warning message. For example, if the threshold
is set to 90%, then on a 1 TB drive falling
under 100 GB of free disk space generates the
warning.

Set to "0" (zero) to
disable.

90

max-oplog-size

The largest size, in megabytes, to allow an
operation log to become before automatically
rolling to a new file. This size is the combined
sizes of the oplog files.

1024

queue-size

For asynchronous queueing. The maximum number
of operations to allow into the write queue
before automatically flushing the queue.
Operations that would add entries to the queue
block until the queue is flushed. A value of
zero implies no size limit. Reaching this limit
or the time-interval limit will cause the queue
to flush.

0

time-interval

For asynchronous queueing. The number of
milliseconds that can elapse before data is
flushed to disk. Reaching this limit or the
queue-size limit causes the queue to flush.

1000

write-buffer-size

Size of the buffer used to write to disk.

32768

disk-store subelement

Description

Default

<disk-dirs>

Defines the system directories where the
disk store is written and their maximum
sizes.

. with no size limit

disk-dirs Element

The <disk-dirs> element defines the host
system directories to use for the disk store. It contains one or
more single <disk-dir> elements with the
following contents:

The directory
specification, provided as the text of the
disk-dir element.

An optional
dir-size attribute specifying the
maximum amount of space, in megabytes, to use for the
disk store in the directory. By default, there is no
limit. The space used is calculated as the combined
sizes of all oplog files.

You can specify any number of disk-dir
subelements to the disk-dirs element. The data
is spread evenly among the active disk files in the directories,
keeping within any limits you set.