[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]
big memory max large objects - pinning not working  XML
Forum Index -> BigMemory
Author Message
gadams00

journeyman

Joined: 02/04/2013 10:00:28
Messages: 13
Offline

I've got a particular cache of metadata that contains very large objects (32.7MB for a single entry in heap). This cache is extremely expensive to flush out and fault back into L1, and performance actually seems worse on BigMemory Max 4.0.0 than it was on Terracotta open source 3.7.2. I've tried pinning the cache to local memory like this:

Code:
 <cache name="categoryTree" maxEntriesInCache="50"
 		timeToLiveSeconds="604800">
 		<pinning store="localMemory" />
 		<terracotta>
 			<nonstop immediateTimeout="true">
 				<timeoutBehavior type="noop" />
 			</nonstop>
 		</terracotta>
 	</cache>
 


The issue I'm seeing is that once L1 fills up, I still see this cache getting faulted in from L2. I would think that ehcache should prefer to evict other stuff from L1 that isn't pinned, but that doesn't appear to be happening. I also get the warning about object depth in the logs whenever this cache gets faulted in from L2, like this:

terracotta-client.log:
Code:
 2013-04-23 10:49:00,129 [http-bio-8080-exec-107] WARN com.tc.net.core.TCConnection - 
 Warning: Attempting to send a message (com.tc.net.protocol.delivery.OOOProtocolMessageImpl) of size 9201445 bytes
 


terracotta-server.log:
Code:
 2013-04-23 10:48:58,583 [WorkerThread(apply_changes_stage, 5, 5)] WARN com.tc.object.dna.impl.BaseDNAEncodingImpl - 
 Attempt to read a byte array of len: 9200950; threshold=8000000
 


tomcat.log:
Code:
 2013-04-23 10:49:01,355 [WorkerThread(local_cache_transaction_complete_stage, 2, 0)] WARN  .pool.sizeof.ObjectGraphWalker - 
 The configured limit of 1,000 object references was reached while 
 attempting to calculate the size of the object graph. Severe performance 
 degradation could occur if the sizing operation continues. This can be 
 avoided by setting the CacheManger or Cache <sizeOfPolicy> elements 
 maxDepthExceededBehavior to "abort" or adding stop points with 
 @IgnoreSizeOf annotations. 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 any good way to deal with large/deep objects when using BigMemory Max?
gyan10

ophanim

Joined: 06/28/2011 23:15:25
Messages: 701
Offline

"Attempting to send a message (com.tc.net.protocol.delivery.OOOProtocolMessageImpl) of size 9201445 bytes
"It means client is trying to send objects of size 92 mb to server. you have multiple messages like this. it means that you are sending large objects to the server multiple times, which means it eats up the server heap.
Pinning to Local memory means Cache data is pinned to the local heap or local off-heap. Unexpired entries can never be flushed to a lower tier or be evicted.I can see in your config that you are not using BigMemory (Ofheap). I would suggest to pin the data to "localHeap".

Cheers!!

Gyan Awasthi
Terracotta -A Software AG company
gadams00

journeyman

Joined: 02/04/2013 10:00:28
Messages: 13
Offline

I'm using BigMemory Max 4.0.0, which does not support pinning configuration value "localHeap". When I try to use pinning store="localHeap", I get the following stacktrace on CacheManager initialization:

Code:
 net.sf.ehcache.CacheException: Error configuring from file:/C:/devel_experimental/bigmemory-pinning/target/classes/ehcache.xml. Initial cause was Error configuring from input stream. Initial cause was null:11: Could not set attribute "store".. Message was: java.lang.IllegalArgumentException: No enum const class net.sf.ehcache.config.PinningConfiguration$Store.LOCALHEAP
 	at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:105)
 	...
 


See
http://terracotta.org/documentation/bigmemorymax/configuration/data-life#pinning-data

I do have BigMemory enabled, but it's on the TSA in tc-config.xml:

Code:
 <?xml version="1.0" encoding="UTF-8" ?>
 
 <tc:tc-config xmlns:tc="http://www.terracotta.org/config">
 
 	<servers>
 		<server>
 			<data>c:/bigmemory-max-4.0.0/server/data</data>
 			<index>c:/bigmemory-max-4.0.0/server/index</index>
 			<logs>c:/bigmemory-max-4.0.0/server/logs</logs>
 			<offheap>
 				<enabled>true</enabled>
 				<maxDataSize>512M</maxDataSize>
 			</offheap>
 		</server>
 		<restartable enabled="false" />
 	</servers>
 
 </tc:tc-config>
 


I've opened a JIRA for this issue https://jira.terracotta.org/jira/browse/EHC-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 
Forum Index -> BigMemory
Go to:   
Powered by JForum 2.1.7 © JForum Team