Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28127

The Jenkins master should not re-calculate jar hashes each time a slave connects

      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.

          [JENKINS-28127] The Jenkins master should not re-calculate jar hashes each time a slave connects

          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-28127 Checksum caching to improve performance when dealing with high number of slaves

          Compare: https://github.com/jenkinsci/remoting/compare/2d7c982d0479...383a19ee3642

          SCM/JIRA link daemon added a comment - 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-28127 Checksum caching to improve performance when dealing with high number of slaves Compare: https://github.com/jenkinsci/remoting/compare/2d7c982d0479...383a19ee3642

          Oleg Nenashev added a comment -

          Fixed in remoting-2.53

          Oleg Nenashev added a comment - Fixed in remoting-2.53

            akshay_abd akshay_abd
            akshay_abd akshay_abd
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: