Return-Path: X-Original-To: apmail-river-dev-archive@www.apache.org Delivered-To: apmail-river-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4DEB211FFE for ; Tue, 13 May 2014 03:25:19 +0000 (UTC) Received: (qmail 86919 invoked by uid 500); 12 May 2014 23:25:19 -0000 Delivered-To: apmail-river-dev-archive@river.apache.org Received: (qmail 86884 invoked by uid 500); 12 May 2014 23:25:19 -0000 Mailing-List: contact dev-help@river.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@river.apache.org Delivered-To: mailing list dev@river.apache.org Received: (qmail 86873 invoked by uid 99); 12 May 2014 23:25:19 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2014 23:25:19 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [207.57.65.70] (HELO zeus.net.au) (207.57.65.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 May 2014 23:25:13 +0000 Received: (qmail 3869 invoked by uid 16710); 12 May 2014 23:24:47 -0000 Received: from unknown (HELO [10.124.41.110]) ([49.180.112.165]) (envelope-sender ) by 207.57.65.70 (qmail-ldap-1.03) with SMTP for ; 12 May 2014 23:24:47 -0000 From: Peter Reply-To: Peter To: dev@river.apache.org, Simon Roberts Subject: Re: JERI Scalability Testing X-Mailer: Modest 3.2 References: <5370DDF0.2000302@zeus.net.au> In-Reply-To: Content-Type: multipart/alternative; boundary="=-Fgd+pRLWAZren10Zkn3y" Date: Tue, 13 May 2014 09:17:41 +1000 Message-Id: <1399936661.23111.5.camel@Nokia-N900> Mime-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --=-Fgd+pRLWAZren10Zkn3y Content-Type: text/plain; charset=utf-8 Content-ID: <1399936661.23111.2.camel@Nokia-N900> Content-Transfer-Encoding: 8bit Hi Simon, http://svn.apache.org/viewvc/river/jtsk/skunk/qa_refactor/trunk/src/net/jini/loader/ClassLoading.java?view=markup During stress test profiling I found Class.forName to be heavily contended (the method with a ClassLoader parameter). Uncontended synchronization is very fast, so rather than employ parallel ClassLoading (which requires a lock for every class and isn't part of the jvm or lang specs), I decided to try thread confinement instead (for each ClassLoader). Before I found class loading to be a bottle neck, I had to fix a number of other throughput bottlenecks however: 1. Security Policy provider would cause contention while it performed dns calls. Dns calls are still made, but far fewer and concurrent security checks are now non blocking. The new policy provider takes advantage of immutability, how often do you change your policy files? 2. SecureClassLoader uses CodeSource in a loader map as keys, causing multiple dns lookup calls, fixed that with a RFC3986 compliant URI class to replace URL based keys in maps. 3. PreferredClassLoader also used URL's as keys in maps. 4. Exising thread pools didn't take advantage of concurrent utilities and TaskManager performed very poorly when it's task queue became large, since dependant tasks had to synchronize and iterate over the whole queue to find preceeding tasks. All fixed now, just need to reduce network traffic as Sockets are now the bottleneck. After I finish with latent bugs, I'll investigate using a provider to plug in various serialization frameworks that are available now. That and codebase provisioning should make River really sing. The stress tests were devised by the original Jini team, they're probably the closest thing I've got to deployment scenario's. Regards, Peter. ----- Original message ----- > Peter, > > With apologies that this it totally off-topic, but you made a comment > here that I'd really like to understand better: > >      * ClassLoading is thread confined for each classloader to avoid > > contention. > > > Without impinging on your time unduly, are you able to point me at > something that would allow me to discover what this is about? It sounds > interesting, but I have no idea how this would work. > > And, I quite understand if you remain silent :) > > Cheers, > Simon --=-Fgd+pRLWAZren10Zkn3y--