I've been noodling over this, and I'm not convinced that optimistic
prefetching of classes is going to lead to an overall win. In the end this
is about latency, and the hypothesis is that you save on the latency of
round trip calls for loading a single class at a time by sending many
classes up front. The only way this would be true is if the amount of
latency you add by increasing the size of the original payload is less
than the sum of the latency for each round trip call that is saved. You
also reduce the amount you could save if you wind up sending more classes
than is actually needed as part of the remote calling chain. I find it
hard to believe that you can achieve the necessary savings, at lease
purely from the remoting layer. It seems that you'd need some code in
Jenkins to help tune the prefetch algorithm.

  -- Dean

On 5/12/13 8:08 AM, "Dean Yu" <[email protected]> wrote:

>Do you also prefetch inherited classes? I wonder if that would help.
>Also, can you measure the number of classes that were prefetched but
>never used?
>
>  -- Dean
>
>On Saturday, May 11, 2013 2:10:18 PM UTC-7, Kohsuke Kawaguchi wrote:
>> (Context: see https://github.com/jenkinsci/remoting/pull/10)
>> 
>> 
>> I've got the new code working under the Maven job type to see the
>>effect of prefetching. Here is the summary of classloader activities in
>>building 
>>https://svn.jenkins-ci.org/trunk/jenkins/test-projects/model-maven-projec
>>t/
>> 
>> 
>> 
>> Class loading count=801
>> Class loading prefetch hit=372 (46%)
>> Resource loading count=11
>> 
>> 
>> 
>> The new code manages to avoid sending individual class/resource file
>>images on the wire completely, and they are instead all retrieved from
>>locally cached jar files.
>> 
>> 
>> 
>> The prefetch hit ratio 46% means we were able to cut the number of
>>roundtrips to 54% of what it was before. Interestingly, this 46% number
>>is very consistent across different call patterns --- the slave itself
>>had 48% prefetch hit ratio.
>> 
>> 
>> 
>> I haven't measured the difference in the number of bytes transferred.
>> 
>> 
>> I wonder what can be done to further improve the prefetch hit ratio.
>> 
>> 
>> 
>> The complete call sequence details at
>>https://gist.github.com/kohsuke/5561414
>> 
>> 
>> -- 
>> Kohsuke Kawaguchi
>
>-- 
>You received this message because you are subscribed to the Google Groups
>"Jenkins Developers" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to [email protected].
>For more options, visit https://groups.google.com/groups/opt_out.
>
>


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to