[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
SizeOf on a Cluster  XML
Forum Index -> Terracotta Platform
Author Message
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?
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
[WWW]
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>
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
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?
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)
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/


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)
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team