[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Combined codec and packet
trustin
do-not-reply at jboss.com
Fri May 9 11:21:51 EDT 2008
"clebert.suconic at jboss.com" wrote : anonymous wrote : Yes. The default attribute map is a synchronized hash map because concurrent hash map consumes more memory as the number of the connections grows.
|
| Is it really relevant? It will just provide partitioned almost empty HashMaps to avoid the concurrency on a single object.
|
| And.. isn't this synchronization limiting the number of connection you can reach up to as it is a contention point?
Yes, the memory consumption matters when the number of connection becomes very large (e.g. 10000.) MINA team got complaints as soon as we switched to ConcurrentHashMap and that's why we switched back to synchronized HashMap. In most cases, the number of threads which accesses the synchronized map will be less than 3, so it is often OK to use a synchronized map.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149798#4149798
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149798
More information about the jboss-dev-forums
mailing list