• Icon: Task Task
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin
    • None

      Various people reported over time that Maven job type builds considerably slowly compared to the freestyle projects.

      The feature does have some overhead, in that it definitely does more (for example, artifacts get archived while Maven runs, whereas freestyle projects do that after Maven has run), but it's also good to take a deep look into where the overhead is and see if anything appears out of place.

      This issue tracks my investigation of this.

          [JENKINS-22354] Maven job type performance improvement

          This pattern of switching from pull to push is something the remoting library should support. This change is added to https://github.com/jenkinsci/remoting/commit/42ed097929beac8b588d90e7df092847e10c0a67 and several following commits.

          Kohsuke Kawaguchi added a comment - This pattern of switching from pull to push is something the remoting library should support. This change is added to https://github.com/jenkinsci/remoting/commit/42ed097929beac8b588d90e7df092847e10c0a67 and several following commits.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/FilePath.java
          core/src/main/java/hudson/Launcher.java
          core/src/main/java/hudson/cli/ClientAuthenticationCache.java
          core/src/main/java/hudson/os/SU.java
          core/src/main/java/hudson/slaves/SlaveComputer.java
          core/src/main/java/hudson/util/ProcessTree.java
          core/src/main/java/jenkins/model/Jenkins.java
          core/src/test/java/hudson/LauncherTest.java
          http://jenkins-ci.org/commit/jenkins/0b27f364f99ec98cb616d4f0cfc0858ecf339852
          Log:
          JENKINS-22354

          Avoid having FilePath to depend on Jenkins, which increases the amount of classloading that has to happen during remoting

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/FilePath.java core/src/main/java/hudson/Launcher.java core/src/main/java/hudson/cli/ClientAuthenticationCache.java core/src/main/java/hudson/os/SU.java core/src/main/java/hudson/slaves/SlaveComputer.java core/src/main/java/hudson/util/ProcessTree.java core/src/main/java/jenkins/model/Jenkins.java core/src/test/java/hudson/LauncherTest.java http://jenkins-ci.org/commit/jenkins/0b27f364f99ec98cb616d4f0cfc0858ecf339852 Log: JENKINS-22354 Avoid having FilePath to depend on Jenkins, which increases the amount of classloading that has to happen during remoting

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          core/src/main/java/hudson/model/Result.java
          http://jenkins-ci.org/commit/jenkins/8a530bb14b4325ff1a75ce89b63b53b7271a6702
          Log:
          JENKINS-22354

          Reduce classloader activities.

          This brings in Stapler and commons bean-utils that we don't need on the
          slaves.

          Compare: https://github.com/jenkinsci/jenkins/compare/dcfeaf3c2a12...8a530bb14b43

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/model/Result.java http://jenkins-ci.org/commit/jenkins/8a530bb14b4325ff1a75ce89b63b53b7271a6702 Log: JENKINS-22354 Reduce classloader activities. This brings in Stapler and commons bean-utils that we don't need on the slaves. Compare: https://github.com/jenkinsci/jenkins/compare/dcfeaf3c2a12...8a530bb14b43

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3280
          JENKINS-22354 (Revision 0b27f364f99ec98cb616d4f0cfc0858ecf339852)
          JENKINS-22354 (Revision 8a530bb14b4325ff1a75ce89b63b53b7271a6702)

          Result = UNSTABLE
          kohsuke : 0b27f364f99ec98cb616d4f0cfc0858ecf339852
          Files :

          • core/src/main/java/jenkins/model/Jenkins.java
          • core/src/main/java/hudson/FilePath.java
          • core/src/main/java/hudson/cli/ClientAuthenticationCache.java
          • core/src/main/java/hudson/slaves/SlaveComputer.java
          • core/src/test/java/hudson/LauncherTest.java
          • core/src/main/java/hudson/util/ProcessTree.java
          • core/src/main/java/hudson/os/SU.java
          • core/src/main/java/hudson/Launcher.java

          kohsuke : 8a530bb14b4325ff1a75ce89b63b53b7271a6702
          Files :

          • core/src/main/java/hudson/model/Result.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3280 JENKINS-22354 (Revision 0b27f364f99ec98cb616d4f0cfc0858ecf339852) JENKINS-22354 (Revision 8a530bb14b4325ff1a75ce89b63b53b7271a6702) Result = UNSTABLE kohsuke : 0b27f364f99ec98cb616d4f0cfc0858ecf339852 Files : core/src/main/java/jenkins/model/Jenkins.java core/src/main/java/hudson/FilePath.java core/src/main/java/hudson/cli/ClientAuthenticationCache.java core/src/main/java/hudson/slaves/SlaveComputer.java core/src/test/java/hudson/LauncherTest.java core/src/main/java/hudson/util/ProcessTree.java core/src/main/java/hudson/os/SU.java core/src/main/java/hudson/Launcher.java kohsuke : 8a530bb14b4325ff1a75ce89b63b53b7271a6702 Files : core/src/main/java/hudson/model/Result.java

          Max Wahler added a comment -

          Hi Kohsuke,

          any updates to this issue? We have a large project where we want all 24 cores of our machine to build on but it get always stuck with that race condition at SplittableBuildListener. The only "solution" is to disable parallel maven builds.

          Thanks in advance!

          Max

          Max Wahler added a comment - Hi Kohsuke, any updates to this issue? We have a large project where we want all 24 cores of our machine to build on but it get always stuck with that race condition at SplittableBuildListener. The only "solution" is to disable parallel maven builds. Thanks in advance! Max

          Daniel Beck added a comment -

          maxzilla: It's not resolved in Maven plugin 2.2? The commit seems to indicate that the issue is fixed.

          Daniel Beck added a comment - maxzilla : It's not resolved in Maven plugin 2.2? The commit seems to indicate that the issue is fixed.

          Max Wahler added a comment -

          No, unfortunately it doesn't seem to fix it. We use Jenkins 1.562 and Maven plugin 2.3, so the fix should be deployed. Is there anything I have to keep in mind for the slave's configuration? We restarted the master and the slaves but issue still exists.

          Max Wahler added a comment - No, unfortunately it doesn't seem to fix it. We use Jenkins 1.562 and Maven plugin 2.3, so the fix should be deployed. Is there anything I have to keep in mind for the slave's configuration? We restarted the master and the slaves but issue still exists.

          Andrew Bayer added a comment -

          Yeah, this is still the case in Maven plugin 2.4-SNAPSHOT as of today - I opened JENKINS-23340 but then found this.

          Andrew Bayer added a comment - Yeah, this is still the case in Maven plugin 2.4-SNAPSHOT as of today - I opened JENKINS-23340 but then found this.

          Jesse Glick added a comment -

          JENKINS-23098 is fixed. So is there more to do here?

          Jesse Glick added a comment - JENKINS-23098 is fixed. So is there more to do here?

          No replies - closing.

          Kanstantsin Shautsou added a comment - No replies - closing.

            kohsuke Kohsuke Kawaguchi
            kohsuke Kohsuke Kawaguchi
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: