Re: Relieving some ClassLoader contention in PreferredClassProvider

Peter Jones <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <20070122185431.GD25418@east>
On Wed, Jan 03, 2007 at 02:11:19PM +0100, Mark Brouwer wrote:
> Hi Peter,
>
> Peter Jones wrote:
>
>> And I think that the challenge with using ConcurrentHashMap here is in
>> correctly dealing with all of the weak references, in both the keys
>> and the values (see above problem).  For comparison, I might suggest
>> looking at the static "localDescs" table of java.io.ObjectStreamClass:
>> prior to JDK 6, it was a regular synchronized HashMap that used a
>> custom internal "EntryFuture" class to accomplish (A); for JDK 6, it
>> was changed to a ConcurrentHashMap for this RFE (which was encouraged
>> by Doug Lea):
>>
>>         http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5056445

I forgot to point out that this change was backported to 5.0u7 as
well.

> Very interesting! I can't find any details in the release notes of Java
> SE 6 that indicates what kind of performance gains can be achieved. I
> realize there is no official benchmark, but just an indication of the
> range of performance gains with Jini ERI would be very nice.

My recollection is that the responsible engineer (not me, I was a code
reviewer) ran a custom multithreaded serialization benchmark (the
normal internal serialization benchmarks are single-threaded) to
verify that the change provided the same or better performance in a
variety of configurations.  I can't quote numbers, but I recall that
the difference (improvement) varied widely depending on the platform,
number and kind of CPUs, etc.  I don't think that the impact on RMI
(JRMP or JERI) was explicitly measured.

-- Peter

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.