[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]
Performance Issue with maxBytesLocalHeap  XML
Forum Index -> Ehcache
Author Message
anil2012

neo

Joined: 09/17/2012 02:36:37
Messages: 4
Offline

Hi,
I am doing performance analysis of standalone ehcache. I am analyzing it for 10,000 put operations.
I created cache of size maxElementsInMemory = 50000, with default LRU policy with eternal set to true and no disk persistence. Program runs normally and I found average time for 10 test as 130 ms

Later I changed the setting as follows and performed the same,
Cache Manager maxBytesLocalHeap="100m" under it created single cache with maxBytesLocalHeap = "30m"
I found average time as 340 ms.
For this case program runs with this message

Dec 17, 2012 10:12:26 PM net.sf.ehcache.pool.sizeof.filter.AnnotationSizeOfFilter <clinit>
INFO: Using regular expression provided through VM argument net.sf.ehcache.pool.sizeof.ignore.pattern for IgnoreSizeOf annotation : ^.*cache\..*IgnoreSizeOf$
Dec 17, 2012 10:12:26 PM net.sf.ehcache.pool.sizeof.AgentLoader <clinit>
INFO: Unavailable or unrecognised attach API : java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine
Dec 17, 2012 10:12:26 PM net.sf.ehcache.pool.sizeof.JvmInformation <clinit>
INFO: Detected JVM data model settings of: 64-Bit HotSpot JVM with Compressed OOPs
Dec 17, 2012 10:12:26 PM net.sf.ehcache.pool.impl.DefaultSizeOfEngine <init>
INFO: using Unsafe sizeof engine


Why this happens? Is there any way to remove this message? What should i do to get same results as maxElementsInMemory case.

I want to use this both features in my project. Please Reply.
Thanks.
alexsnaps

consul

Joined: 06/19/2009 09:06:00
Messages: 484
Offline

The logging you see is because we try to figure out what is the best stragety to measure object graphs that you put into the cache.
For some reason we're not able to find and/or load the AttachAPI and use the preferred AgentSizeOf engine that we have. You're install falls back to the UnsafeSizeOf. It'd be interesting to know what exact version of the jre/jdk you use and on what exact platform.

As to you perf impact, it is known to us that measuring object graphs come a price, actually walking the object graph mainly. Could it be the object graph measured is too big (e.g. all entries have a shared sub graph) ?

Also, only write operations should be impacted by the sizing approach you choose, not gets... can you confirm ?

Alex Snaps (Terracotta engineer)
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team