[infinispan-dev] ISPN-863 - Thoughts / Questions

david marion dlmarion at hotmail.com
Thu Jan 20 11:01:40 EST 2011


Yes, but its because I changed the meaning of maxEntries == -1. It used to create a ConcurrentHashMap that has a max size of 2^30. In my fork, when -1 is used it creates a BoundedConcurrentHashMap with a max size of 2^30. My guess is that a ConcurrentHashMap grows as items are placed into the map, whereas the BoundedConcurrentHashMap pre-allocates structures for that designated size. So, I am thinking that I need to account for the size of the JVM to determine the maximum entries for the BoundedConcurrentHashMap. 
 


Date: Thu, 20 Jan 2011 12:34:22 -0300
From: vblagoje at redhat.com
To: infinispan-dev at lists.jboss.org
Subject: Re: [infinispan-dev] ISPN-863 - Thoughts / Questions


On 11-01-20 9:52 AM, david marion wrote: 


I did exactly that last night. I built a test that allocated HashEntry<K,V>[] just like it does in the Segment constructor. I don't have the numbers in front of me right now, but at the maximum size (2^30) and without specifying concurrency it was trying to allocate 32 Segment objects each having a HashEntry<K,V>[] with 2^25 elements. Each one of these HashEntry<K,V>[] takes up around 128MB of memory.
Ok, let me just make sure I understand you. You are saying that BCHM is allocating too much memory if a certain constructor is used? 

_______________________________________________ infinispan-dev mailing list infinispan-dev at lists.jboss.org https://lists.jboss.org/mailman/listinfo/infinispan-dev 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20110120/cea1979b/attachment.html 


More information about the infinispan-dev mailing list