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

Slow performance of /pluginManager/available rendering

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/model/UpdateSite.java
            core/src/main/resources/hudson/PluginManager/table.jelly
            http://jenkins-ci.org/commit/jenkins/3b61b96119b9fd8c80b1fa79a19f8f770af434b7
            Log:
            JENKINS-51205 Improve performance of /pluginManager/available service.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/UpdateSite.java core/src/main/resources/hudson/PluginManager/table.jelly http://jenkins-ci.org/commit/jenkins/3b61b96119b9fd8c80b1fa79a19f8f770af434b7 Log: JENKINS-51205 Improve performance of /pluginManager/available service.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/model/UpdateSite.java
            core/src/main/resources/hudson/PluginManager/table.jelly
            http://jenkins-ci.org/commit/jenkins/6bb85ec23bf824515f65616f72527ba784a54adc
            Log:
            Merge pull request #3428 from jglick/perf-JENKINS-51205

            JENKINS-51205 Improve performance of /pluginManager/available service

            Compare: https://github.com/jenkinsci/jenkins/compare/d004eea0caf7...6bb85ec23bf8
            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/UpdateSite.java core/src/main/resources/hudson/PluginManager/table.jelly http://jenkins-ci.org/commit/jenkins/6bb85ec23bf824515f65616f72527ba784a54adc Log: Merge pull request #3428 from jglick/perf- JENKINS-51205 JENKINS-51205 Improve performance of /pluginManager/available service Compare: https://github.com/jenkinsci/jenkins/compare/d004eea0caf7...6bb85ec23bf8 * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/PluginManager.java
            core/src/main/java/hudson/model/UpdateSite.java
            core/src/main/resources/hudson/PluginManager/table.jelly
            http://jenkins-ci.org/commit/jenkins/7bd6d1e80c40fc2117ab713bd9e3d9e7707dd394
            Log:
            JENKINS-51205 Improve performance of /pluginManager/available service.

            (cherry picked from commit 3b61b96119b9fd8c80b1fa79a19f8f770af434b7)

            *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

            Functionality will be removed from GitHub.com on January 31st, 2019.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/UpdateSite.java core/src/main/resources/hudson/PluginManager/table.jelly http://jenkins-ci.org/commit/jenkins/7bd6d1e80c40fc2117ab713bd9e3d9e7707dd394 Log: JENKINS-51205 Improve performance of /pluginManager/available service. (cherry picked from commit 3b61b96119b9fd8c80b1fa79a19f8f770af434b7) * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: