Re: Relieving some ClassLoader contention in PreferredClassProvider
Dan Creswell <[email protected]>
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <[email protected]> |
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 > > 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. > Unless we're going to define a set of platforms across which to make judgements/perform benchmarks, I don't see how to get a useful indication. ConcurrentHashMap is very clear about how it will cope better under concurrent load than a standard synchronized hashmap. So it's going to come down to just how many threads are present, how much reading versus updating they do and how many processors you have to run those threads. This all reminds me of discussions over the relative performance of Niagara versus Opterons etc. The above would seem to improve scalability and indirectly performance (in some cases) and measuring indirect (but positive) side-effects is challenging..... It also reminds me of Blitz users - "how fast is Blitz?" to which my response is always "dunno, write a benchmark that simulates your application, run it on your chosen hardware and see if it meets your needs!" >> [3] Would anyone like to sell me their JDC/SDN votes for this bug? >> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4429536 >> (I'm only barely joking.) > > Contrary to Gregg's you won't get mine Peter, because every bug I vote > for tends to stall forever so for 5 years I've nothing to sell anymore > to anyone. > -- > Mark > Two cents, Dan. -------------------------------------------------------------------------- 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]