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

Slow performance of /pluginManager/available rendering

      raul_arabaolaza found that the /pluginManager/available page is slow to render, causing timeouts in ATH (JENKINS-50790), and that this became especially bad as of 2.112. That seems to have been caused by the JENKINS-22367 split of jdk-tool at that time. Example thread dump:

      "Handling GET /pluginManager/available from 127.0.0.1 : RequestHandlerThread[#12] PluginManager/available.jelly" ... runnable ...
         java.lang.Thread.State: RUNNABLE
          at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
          at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
          at java.io.File.exists(File.java:819)
          at hudson.util.TextFile.exists(TextFile.java:60)
          at hudson.model.UpdateSite.getData(UpdateSite.java:322)
          at hudson.model.UpdateSite.getPlugin(UpdateSite.java:382)
          at hudson.model.UpdateCenter.getPlugin(UpdateCenter.java:612)
          at hudson.model.UpdateSite$Plugin.getNeededDependencies(UpdateSite.java:1030)
          at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1112)
          at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1113)
          at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1113)
          at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1113)
          at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1113)
          at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1113)
          at hudson.model.UpdateSite$Plugin.isNeededDependenciesCompatibleWithInstalledVersion(UpdateSite.java:1113)
      

      It seems that there are two problems:

      • Every call to getData is checking a file timestamp, causing a lot of I/O, which is silly since the Jenkins master is in control of reading and writing this file so it can just keep information in memory.
      • Some of the methods called from table.jelly can involve deep recursion, especially when detached plugins are involved.

          [JENKINS-51205] Slow performance of /pluginManager/available rendering

          Jesse Glick created issue -
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-50790 [ JENKINS-50790 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-22367 [ JENKINS-22367 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 3428 (Web Link)" [ 20639 ]
          Jesse Glick made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Jesse Glick made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Raul Arabaolaza made changes -
          Link New: This issue is related to JENKINS-50790 [ JENKINS-50790 ]
          Oliver Gondža made changes -
          Labels Original: performance testing New: 2.121.2-fixed performance testing
          Oliver Gondža made changes -
          Labels Original: 2.121.2-fixed performance testing New: 2.121.1-fixed performance testing

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: