Apache Geode disk store seems to ignore "dir-size" property

37 Views Asked by At

I am creating a disk store in Geode using the code below, where the maximum size of 100MB is used to limit the size of the disk store:

int diskMaxSize = 100;
DiskStoreFactory factory = cache.createDiskStoreFactory();

// Set up disk store properties here.
        
if(!StringUtils.isEmpty(diskLoc) && diskMaxSize > 0) {
    factory.setDiskDirsAndSizes(new File[] {new File(diskLoc)}, new int[] {diskMaxSize});
}
        
diskStore = factory.create(name == null ? DiskStoreFactory.DEFAULT_DISK_STORE_NAME : name);

Everything seems to work and the disk store is created. However, I noticed that under load, the overflow files get created even after the 100MB limit is reached in the disk store directory. The Geode documentation states that dir-size is:

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.

Why do the overflow files continue to get created even after 100MB of disk space has been taken up?

1

There are 1 best solutions below

0
On

Answer provided by @Zak in the comments:

I had auto-compaction enabled, and the documentation states that dir-size is ignored.

Note: When auto-compaction is enabled, dir-size does not limit how much disk space is used. Geode will perform auto-compaction, which should free space, but the system may go over the configured disk limits.