• Bug
  • Status: Resolved
  • 2 Major
  • Resolution: As Designed
  • ehcache-terracotta
  • ljacomet
  • Reporter: omkreddy
  • February 06, 2015
  • 0
  • Watchers: 2
  • February 06, 2015
  • February 06, 2015

Attachments

Description

We are observing high disk usage with localRestartable persistence strategy.

Attaching a sample test code to reproduce the issue. In this test key is string object and value is Set object. We are generating a single cache entry and updating the value Set. Run the test for multiple times and observe the disk space size.

Cache configuration:

	<cache name="testcache" maxEntriesLocalHeap="10000" eternal="true"
		overflowToOffHeap="true" maxBytesLocalOffHeap="800m">
		<persistence strategy="localRestartable"
			synchronousWrites="true" />
	</cache>

Comments

Kumar Reddy 2015-02-06

disk usage for one cache entry:

$$$>>du -sh cache/persistence/cachedata/*
0	cache/persistence/cachedata/frs.backup.lck
0	cache/persistence/cachedata/FRS.lck
513M	cache/persistence/cachedata/seg000000004.frs
314M	cache/persistence/cachedata/seg000000005.frs

Louis Jacomet Jacomet 2015-02-06

Your test is a bit too simplistic to draw any conclusion. By default disk space is allocated in segments of 500MB in size. Also, concluding that since one entry takes that amount of space, then 100 entries will take 100 times more space is wrong.

Cache with a disk tier is to accommodate large amounts of data. Do relevant testing in that case and if you find a problem, please file a new issue.

Also please limit issue in this tracker to open source topics.