-
Improvement
-
Resolution: Fixed
-
Minor
Each time a slave connects to the master there is an interaction where jars are transferred to the slave if needed. This is done by looking at the slave's jar cache and comparing the hashes against the master's jars.
The master does not have a shared cache, so it is has to re-calculate the hashes for every slave it deals with. This is done even when no jars need to be transferred (ie. the slave jar cache is already up-to-date).
If there are a lot of ephemeral slaves that come and go then this becomes wasteful for the master.
Ideally the master's cache should be a singleton that can be accessed for interactions with any slave. There is even a TODO in the JarLoaderImpl that talks about this.
Code changed in jenkins
User: Kohsuke Kawaguchi
Path:
src/main/java/hudson/remoting/Channel.java
src/main/java/hudson/remoting/Checksum.java
src/main/java/hudson/remoting/JarLoaderImpl.java
src/test/java/hudson/remoting/ChecksumTest.java
http://jenkins-ci.org/commit/remoting/383a19ee36420a70aa5330a25d7209f80890303a
Log:
Merge pull request #52 from akshayabd/checksum_cache
JENKINS-28127Checksum caching to improve performance when dealing with high number of slavesCompare: https://github.com/jenkinsci/remoting/compare/2d7c982d0479...383a19ee3642