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

Rebuilding dependency graph slow on large installations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Apache Software Foundation, Hudson 1.376, Ubuntu server, Sun 1.6 JDK, 4Gb RAM

      In the ASF Hudson installation, rebuilding the dependency graph is quite slow (minutes). As rebuilding seems to happen twice on saving project configuration (AbstractProject.doConfigSubmit()), working with the project configuration is very slow and will frequently time out.

      We have a large number of jobs (>300) and from a quick look at the code, it seems like building the dependency graph is done even if there are no changes to the dependencies. Also, building the graph seems to be done by iterating over all jobs which will in turn iterator over all other jobs. This doesn't seem to scale to our size

      Here's a typical thread dump from saving a project configuration:

      "Handling POST /hudson/job/ftpserver-trunk-jdk1.6-osx/configSubmit : http-8090-27" daemon prio=10 tid=0x000000004340a000 nid=0x4576 runnable [0x00007f2fa8e48000]
      java.lang.Thread.State: RUNNABLE
      at java.lang.String.intern(Native Method)
      at hudson.maven.ModuleDependency.<init>(ModuleDependency.java:48)
      at hudson.maven.ModuleDependency.<init>(ModuleDependency.java:54)
      at hudson.maven.MavenModule.asDependency(MavenModule.java:296)
      at hudson.maven.MavenModule.buildDependencyGraph(MavenModule.java:385)
      at hudson.maven.MavenModuleSet.buildDependencyGraph(MavenModuleSet.java:487)
      at hudson.model.DependencyGraph.<init>(DependencyGraph.java:100)
      at hudson.model.Hudson.rebuildDependencyGraph(Hudson.java:3346)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:588)
      at sun.reflect.GeneratedMethodAccessor1225.invoke(Unknown Source)
      ...

            kutzi kutzi
            protocol7b protocol7b
            Votes:
            14 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: