Title:
cachegetallids() is very slow when ehcache is configured to overflow to disk
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Mike Grove / Mike Grove (mgrove40)
Created: 11/15/2013
Components: Caching
Versions: 10.0
Failure Type: Performance Issue
Found In Build/Fixed In Build: Final /
Priority/Frequency: Major / Most users will encounter
Locale/System: English / Platforms All
Vote Count: 1
Problem Description:
When configured to overflow to disk, calling cachegetallids() is very slow with only a few thousand items in cache. Review the ehcache configuration in the "Test Configuration" section.
Steps to Reproduce:
<cfset start = getTickCount()>
<cfset cacheids = cachegetallids('mycache')>
<cfdump var="#ArrayLen(cacheids)#" />
<cfdump var="#getTickCount() - start#" />
Actual Result:
With 4000 items in the cache, I'm benchmarking 23583ms response times.
Expected Result:
Using the workaround below on the same dataset and calling the ehcache java object directly, it responds in only 5ms. I would expect the ColdFusion method to be comparable.
Any Workarounds:
Yes, call the getKeys() method off of the core ehcache java object:
<cfset cache = cacheGetSession('mycache', 'true')>
<cfdump var="#ArrayLen(cache.getKeys())#"/>
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3669336
External Customer Info:
External Company:
External Customer Name: mgrove40
External Customer Email:
External Test Config: My Hardware and Environment details:
ehcache.xml configuration:
name="mycache"
maxElementsInMemory="1"
eternal="false"
timeToIdleSeconds="86400"
timeToLiveSeconds="86400"
overflowToDisk="true"
diskSpoolBufferSizeMB="30"
maxElementsOnDisk="100000"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="3600"
memoryStoreEvictionPolicy="LRU"
/>
Attachments:
Comments: