Author |
Message |
06/15/2012 11:00:35
|
sfeldman
neo
Joined: 06/15/2012 10:57:13
Messages: 4
Offline
|
I am getting the following Warnings
Code:
Jun 15, 2012 1:55:41 PM net.sf.ehcache.config.CacheConfiguration warnSizeOfPolicyConfiguration
[b]WARNING: Terracotta clustered cache: packageCache has a sizeOf policy configuration specificed. SizeOfPolicyConfiguration is unsupported for Terracotta clustered caches.[/b]
Jun 15, 2012 1:55:41 PM net.sf.ehcache.store.offheap.EhcacheConcurrentOffHeapClockCache create
INFO: Creating Off-Heap Area Using Config
Heuristic Configuration: local-shadow-cache-for-packageCache-uuid-W7-2UA13310HT/172.16.188.28-6cabdc51-478f-484b-baa2-1d61ee029339
Maximum Size (specified) : 512MB
Minimum Chunk Size : 128MB
Maximum Chunk Size : 512MB
Concurrency : 16
Initial Segment Table Size : 1K slots
Segment Data Page Size : 1MB
Code:
WARNING: The configured limit of 1,000 object references was reached while attempting to calculate the size of the object graph. This can be avoided by adding stop points with @IgnoreSizeOf annotations. Since the CacheManger or Cache <sizeOfPolicy> elements maxDepthExceededBehavior is set to "abort", the sizing operation has stopped and the reported cache size is not accurate. If performance degradation is NOT an issue at the configured limit, raise the limit value using the CacheManager or Cache <sizeOfPolicy> elements maxDepth attribute. For more information, see the Ehcache configuration documentation.
Is there a way to adjust the SizeOfPolicy on a Terracotta cluster cache?
|
|
|
06/15/2012 20:10:38
|
ari
seraphim
Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline
|
Does this link help?
http://www.ehcache.org/documentation/configuration/cache-size#built-in-sizing-computation-and-enforcement
--Ari
|
|
|
06/18/2012 06:43:37
|
sfeldman
neo
Joined: 06/15/2012 10:57:13
Messages: 4
Offline
|
The article does help a little, but not with dealing with the warnings.
I should have mentioned earlier that I am storing arrayList of objects. So i am not sure the if the suppression using @IgnoreSizeOf is an option.
Weirdly, after building my cache, on my rackRateCache it says 4000 instead of 1000, like the rest, here is my echache xml
Any ideas why only that one cache has a different MaxDepth?
Code:
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
maxBytesLocalHeap="2g" maxBytesLocalOffHeap="2g" maxBytesLocalDisk="2g">
<sizeOfPolicy maxDepth="4000" maxDepthExceededBehavior="continue"/>
<diskStore path="java.io.tmpdir" />
<cache name="rateGridCache" maxBytesLocalOffHeap="512m" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="1800" overflowToDisk="false"
maxElementsOnDisk="10000" >
<terracotta />
</cache>
<cache name="packageCache" maxBytesLocalOffHeap="512m" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="1800" overflowToDisk="false"
maxElementsOnDisk="10000">
<sizeOfPolicy maxDepth="3000" />
<terracotta />
</cache>
<cache name="cache_pkgsRateCode" maxBytesLocalOffHeap="32m" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="1800" overflowToDisk="false"
maxElementsOnDisk="10000">
<terracotta />
</cache>
<cache name="cache_translation" maxBytesLocalOffHeap="32m" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="1800" overflowToDisk="false"
maxElementsOnDisk="10000">
<terracotta />
</cache>
<cache name="cache_rackRate" maxBytesLocalOffHeap="32m" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="1800" overflowToDisk="false"
maxElementsOnDisk="10000">
<terracotta />
</cache>
<cache name="cache_prodAttributeMap" maxBytesLocalOffHeap="32m" eternal="false"
timeToIdleSeconds="3600" timeToLiveSeconds="1800" overflowToDisk="false"
maxElementsOnDisk="10000">
<terracotta />
</cache>
<terracottaConfig url="localhost:9510,localhost:9540" />
</ehcache>
|
|
|
06/18/2012 08:01:21
|
steve
ophanim
Joined: 05/24/2006 14:22:53
Messages: 619
Offline
|
Their are two reasons that someone might get that warning.
1) An object that is being put in the cache has a reference to a graph of objects that was larger than expected and or referring to something unintentionally.
2) You may just have large object graphs
The warning is intended for people with situation 1. If you are in situation 2 then just raise the limit and the warning will go away.
It can be configured with this:
<sizeOfPolicy maxDepth="100" maxDepthExceededBehavior="abort"/>
more details in this doc:
http://ehcache.org/documentation/configuration/cache-size
|
Want to post to this forum? Join the Terracotta Community |
|
|
06/18/2012 08:04:00
|
sfeldman
neo
Joined: 06/15/2012 10:57:13
Messages: 4
Offline
|
I read through the document but as mentioned I get the following warning as well
WARNING: Terracotta clustered cache: packageCache has a sizeOf policy configuration specificed. SizeOfPolicyConfiguration is unsupported for Terracotta clustered caches.'
Am I configuring the wrong xml?
|
|
|
06/20/2012 10:21:49
|
alexsnaps
consul
Joined: 06/19/2009 09:06:00
Messages: 484
Offline
|
AFAICT, you are not and this is a "bug".
I've created EHC-948 to address this asap!
|
Alex Snaps (Terracotta engineer) |
|
|
06/21/2012 06:10:23
|
sfeldman
neo
Joined: 06/15/2012 10:57:13
Messages: 4
Offline
|
Just my luck to find a bug, o well, thanks for the prompt response and I look forward to the patch.
This made me think of this xkcd: http://xkcd.com/979/
|
|
|
06/21/2012 06:12:53
|
alexsnaps
consul
Joined: 06/19/2009 09:06:00
Messages: 484
Offline
|
Will make sure I update this thread when this is fixed then... hopefully before 2021 ;)
|
Alex Snaps (Terracotta engineer) |
|
|
|