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

Vladimir Blagojevic vblagoje at redhat.com
Thu Jan 20 11:45:15 EST 2011


BCHM creates segment array and for each segment it creates HashEntry 
array just like the ConcurrentHashMap. The difference is that BCHM has 
EvictionPolicy instance per segment.

On 11-01-20 1:01 PM, david marion wrote:
> 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
>
>
> _______________________________________________
> 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/b5aa3017/attachment.html 


More information about the infinispan-dev mailing list