If necessary, MapMaker can help you create a CCHM with parameters relevant for your deployment schema.<br><br><a href="http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/MapMaker.html">http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/MapMaker.html</a><br>
<br>-A<br><br><div class="gmail_quote">On Tue, Sep 15, 2009 at 9:59 AM, Christian Vest Hansen <span dir="ltr"><<a href="mailto:karmazilla@gmail.com">karmazilla@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Using NonBlockingHashMap from highscalelib could be another option.<br>
<div><div></div><div class="h5"><br>
On Tue, Sep 15, 2009 at 5:59 PM, Bela Ban <<a href="mailto:bban@redhat.com">bban@redhat.com</a>> wrote:<br>
> FYI,<br>
><br>
> This might be important for you guys as well (if you haven't done so):<br>
> I'll add code to configure ConcurrentHashMaps based on system<br>
> properties, e.g. capacity, load factory etc.<br>
><br>
> This will be important for large clusters. E.g. when we have 1000 nodes<br>
> in the cluster, most hashmaps in JGroups will contain 1000 entries, and<br>
> if we only have 16 buckets (the default IIRC), there would be a lot of<br>
> contention.<br>
><br>
><br>
> <a href="https://jira.jboss.org/jira/browse/JGRP-1049" target="_blank">https://jira.jboss.org/jira/browse/JGRP-1049</a><br>
><br>
> ConcurrentHashMap<br>
> -----------------<br>
><br>
> CCHMs have a default initial capacity (16), load factor (0.75) and<br>
> concurrency level (16). These are OK for most<br>
> scenarios, but we have to investigate whether these values are<br>
> sufficient for 1000 node clusters.<br>
><br>
> When for example 1000 threads from different senders access the same<br>
> CCHM, we need to make sure we don't have high<br>
> contention, ie. by spreading a 1000 senders over 16 buckets.<br>
><br>
> Investigate whether we should add CCHM initial sizes, load factors and<br>
> concurrency levels as properties.<br>
><br>
> With ergonomics [1], we could for example set bucket sizes for CCHMs<br>
> dynamically, e.g. based on cluster size.<br>
><br>
><br>
><br>
> [1] <a href="https://jira.jboss.org/jira/browse/JGRP-1037" target="_blank">https://jira.jboss.org/jira/browse/JGRP-1037</a><br>
><br>
> --<br>
> Bela Ban<br>
> Lead JGroups / Clustering Team<br>
> JBoss<br>
><br>
> _______________________________________________<br>
> infinispan-dev mailing list<br>
> <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
Venlig hilsen / Kind regards,<br>
<font color="#888888">Christian Vest Hansen.<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br>