-
1. Re: How to manage infinispan memory in jboss?
galder.zamarreno Jun 4, 2018 4:20 AM (in response to alireza.alallah)Did it run out of memory? You can get heap dumps when OutOfMemoryException happens and you can inspect with tools like Eclipse MAT.
-
2. Re: How to manage infinispan memory in jboss?
alireza.alallah Jun 4, 2018 10:06 AM (in response to galder.zamarreno)Yes, I have analyzed with Jconsole but,I can't see infinispan how many used heap memory , totally my cache have 6 keys and add millions items to them, may be problem for this archtitecture?
my code as below:
Cache<String,Queue<T>> infinispanCache = new ConcurrentLinkedQueue<>();
infinispanCache.get("key1"),add(item);
Totally my cache have 6 keys and add millions items to them same above example and Poll item in another threads.
After several minutes jboss reached to max heap.
-
3. Re: How to manage infinispan memory in jboss?
alireza.alallah Jun 7, 2018 7:42 AM (in response to alireza.alallah)new ConcurrentLinkedQueue<>(); was my typo , i means new Cache for it's data type
-
4. Re: How to manage infinispan memory in jboss?
galder.zamarreno Jun 7, 2018 8:15 AM (in response to alireza.alallah)1 of 1 people found this helpful-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/heapdump/oom.hprof
^ to standalone.conf
Then:
-
5. Re: How to manage infinispan memory in jboss?
alireza.alallah Jun 11, 2018 4:36 AM (in response to galder.zamarreno)I analyzed heap dump with eclipse mat and get memory leaks as below
One instance of "org.infinispan.container.DefaultDataContainer" loaded by "org.jboss.modules.ModuleClassLoader @ 0x80c08270" occupies 295,314,008 (17.81%) bytes. The memory is accumulated in one instance of "org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8$Node[]"loaded by "org.jboss.modules.ModuleClassLoader @ 0x80d338a8".
Keywords
org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8$Node[]
org.jboss.modules.ModuleClassLoader @ 0x80c08270
org.jboss.modules.ModuleClassLoader @ 0x80d338a8
org.infinispan.container.DefaultDataContainer -
6. Re: How to manage infinispan memory in jboss?
alireza.alallah Jun 11, 2018 4:39 AM (in response to alireza.alallah)I increase number of cache and i have 5 cache , and I get same result
Also, i only way to avoid this memory increase max heap size?
-
7. Re: How to manage infinispan memory in jboss?
galder.zamarreno Jun 11, 2018 11:03 AM (in response to alireza.alallah)Hmm, maybe you just need more memory for the data you're using? If you don't need all the data, you could always set expiration for the data and eviction.