10.9.1 Performing compaction on cache data files
This subsection explains how to perform compaction on cache data files.
- Organization of this subsection
(1) Checking the compaction effects
Execute the eztool listecf -s command to check the compaction effects.
eztool listecf -s
Command execution example
-
The UnusedFC column displays the number of unused cache data files. Monitor this column when you store (put) or delete (remove) data randomly without regard to the order in which the data was stored (put).
-
The MaxCE column displays the maximum compaction effects for the cache data files in each range. If you delete (remove) data in the order in which the data was stored (put) and this column displays 100% or a value close to 100%, you need to perform compaction.
(2) Close the cluster (optional)
If necessary, execute the eztool close command to close the cluster.
- Reference note
-
You can perform compaction while the EADS servers are running, but performance might be affected adversely.
eztool close
Command execution example
(3) Verify that the cluster is closed (optional)
If you closed the cluster in 10.9.1(2) Close the cluster (optional), execute the eztool status command to check the cluster status.
eztool status
Command execution example
If the cluster is closed, closed is displayed in the State column.
(4) Perform compaction on the cache data files
Execute the eztool compaction command to perform compaction.
eztool compaction
Command execution example
- Important note
-
Because compaction processing might take a long time, design a timeout value, if necessary.
(a) When you delete data in the order in which the data was stored
When you delete (remove) data in the order in which the data was stored (put), invalid data is created in cache data files each time data is deleted. In such a case, perform compaction on the cache data files whose entire contents are invalid data. Execute the eztool compaction command with the --threshold option specifying a threshold of 100%.
- Reference note
-
If the order in which the data was stored (put) does not exactly match the order in which data is deleted (remove), set the threshold to a value that is smaller than 100%.
(b) When you store or delete data randomly without regard to the order in which the data was stored
When you store (put) or delete (remove) data randomly without regard to the order in which data is stored (put), the file usage rate will differ from one cache data file to another. For this reason, you need to allocate unused files so that data can be added and deleted. In this case, perform compaction periodically based on the number of unused files. Execute the eztool compaction command with the --unused_fc option specifying the number of unused files to be allocated.
If the planned number of unused files cannot be obtained after compaction processing, reduce the threshold with the --threshold option and then perform compaction again.
(c) Allocating space to cache data files immediately
When the number of unused files is very small and you need to allocate space to the cache data files immediately, perform compaction with a smaller threshold specified in the --threshold option. Execute the eztool compaction command with the priority for caches and ranges specified in the --cache and --range options.
If compaction is already underway, stop the compaction processing and then re-execute the eztool compaction command. For details about how to stop compaction processing, see 10.9.2 Stopping compaction processing.
- Reference note
-
If the amount of available space in the cache data files is very small, we recommend that you close the cluster before performing compaction processing, if possible.
(5) Open the cluster (optional)
If you closed the cluster in 10.9.1(2) Close the cluster (optional), execute the eztool open command to open the cluster.
eztool open
Command execution example
(6) Verify that the EADS servers have been opened
If you closed the cluster in 10.9.1(2) Close the cluster (optional), execute the eztool status command to verify that all EADS servers have been opened.
eztool status
Command execution example
If the EADS servers have been opened, running is displayed in the State column.