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

Performance of rebuildDependencyGraph for MavenModule

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin
    • None
    • maven plugin 3.12

      We have a large Jenkins installation with > 4000 MavenModuleSet builds and each one has about 10-20 MavenModule childs.

      When we see the line "Modules changed, recalculating dependency graph" in our build log it can take 30-120 minutes till the dependency graph is calculated. 

      The Build Job is executed on a build slave.

      In our Jenkins Master we did a jstack to get thread dumps during the calculation of the dependency graph.

       

      The thread dumps look like this for most of the time:

      "Executor #0 for Slave201 : executing test-modularisierung #7" #10378302 daemon prio=5 os_prio=0 tid=0x00007f1ead3c5800 nid=0x91a runnable [0x00007f1ebe461000]

         java.lang.Thread.State: RUNNABLE

              at com.google.common.collect.AbstractMultimap.put(AbstractMultimap.java:203)

              at com.google.common.collect.AbstractSetMultimap.put(AbstractSetMultimap.java:117)

              at com.google.common.collect.HashMultimap.put(HashMultimap.java:49)

              at hudson.maven.MavenModule$MavenDependencyComputationData.byName(MavenModule.java:703)

              at hudson.maven.MavenModule$MavenDependencyComputationData.access$100(MavenModule.java:682)

              at hudson.maven.MavenModule.buildDependencyGraph(MavenModule.java:555)

              at hudson.model.DependencyGraph.build(DependencyGraph.java:92)

              at jenkins.model.Jenkins.rebuildDependencyGraph(Jenkins.java:4709)

              at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:1059)

              at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:691)

              at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)

              at hudson.model.Run.execute(Run.java:1880)

              at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)

              at hudson.model.ResourceController.execute(ResourceController.java:97)

              at hudson.model.Executor.run(Executor.java:428)

       

       

      MavenDependencyComputationData.byName is very expensive in our case. Would it be possible to cache the MultiMap in MavenDependencyComputationData?

       
       
       

            cloudbees_security_members CloudBees Security Developers
            aubele Martin Aubele
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: