• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • blueocean-plugin
    • None
    • 1.0-beta-1, 1.0-b05/b-06

      See https://groups.google.com/forum/#!topic/jenkinsci-dev/wcoXynHvSIE

      Andreas has sent us HAR files and thread dumps out-of-band to investigate

          [JENKINS-38079] Investigate performance degradation report

          James Dumay created issue -
          James Dumay made changes -
          Epic Link New: JENKINS-37957 [ 174099 ]
          James Dumay made changes -
          Rank New: Ranked higher
          James Dumay made changes -
          Sprint Original: 1.0-beta-1 [ 96 ] New: 1.0-beta-1, 1.0-b05/b-06 [ 96, 111 ]
          James Dumay made changes -
          Rank New: Ranked higher
          Vivek Pandey made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Vivek Pandey added a comment -

          I am summarizing here the findings, there are problems in different areas: favorites API is taking longer than usual and then SSE /configure API takes really long time. search API also takes long time, we can improve it but I am not too sure given how we want flattened/sorted list.

          Key Findings (actionable/'to be investigated' items)

          SSE

          • SSE configure call takes really long time (~10sec) for job channel subscription
            (there are two job subscriptions)
            "subscribe": [
            { "jenkins_channel": "job" }

            ,

            { "jenkins_channel": "job" }

            ],

          • SSE configure for pipeline channel is relatively less but still long time (3-4 sec)
          • Avoid redirection by appending ‘/‘. GET /js-extensions costs 61ms
          • Run details page calls SSE configure API 5 times each taking on average ~2secs.

          Favorites API (page limit 26)

          • GET takes unreasonably long time 5.56 sec and there is only one favorited item!!!
          • Favorite item is a pipeline object that includes latest Run. It also includes actions (changeset, branch details) so interacting with git (file IO, hope it doesn’t go all the way to github for that)? Needs investigation

          Search API (page limit 26)

          • Took 7 sec on average
          • To address sorting by name and exclude certain items from flattening all possible items are loaded in memory
            • jenkins.getAllItems()
            • Exclude items that are children of multi-branch and matrix project
            • Don’t see how we can avoid it unless the jobs are stored in some kind of db with indexed column to speed up sorting and only give limited records instead of all
          • new PipelineContainerImpl().getPipelines(items) should be pagination aware
            • At present it creates BluePipeline object for all possible items (ouch!)

          Static Resources

          • blueocean.js (642KB), 370 ms to load: is loaded on each page (dashboard, run details, pipeline)
          • An so are most other JS files
          • If these are cached (not fetched for each page can easily save few secs)

          Further details:

          Dashboard

          GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec

          This should be ok as this is SSE channel to get server side events, this connection remains opened for server to send events whenever there is data.

          POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
          GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec
          GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec

          Js-extensions
          GET http://10.10.1.130:8080/blue/js-extensions 61ms (redirect)
          GET http://10.10.1.130:8080/blue/js-extensions/ *8ms *

          append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms.

          Project/Pipeline page

          POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
          GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec

          GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
          GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!!

          GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXXX/activities/ 18.99 sec

          append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms.

          Run page

          http://10.10.1.130:8080/adjuncts/807c3957/io/jenkins/blueocean/blueocean.js (642.28KB) 370 ms (why is it loaded on this page)?

          GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec
          GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!!

          GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec
          POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec
          GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec

          SSE Job Channel
          POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec

          Why 5 subscription calls to ‘pipeline’ channel?

          POST http://10.10.1.130:8080/sse-gateway/configure 3.03 sec (channel pipeline)
          POST http://10.10.1.130:8080/sse-gateway/configure 19 ms (channel pipeline)
          POST http://10.10.1.130:8080/sse-gateway/configure 2.03 sec (channel pipeline)
          POST http://10.10.1.130:8080/sse-gateway/configure 2.77 sec (channel pipeline)
          POST http://10.10.1.130:8080/sse-gateway/configure 4.45 sec (channel pipeline)

          GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXX/branches/XXX/runs/1/log/ 90ms

          Gives 500 as there are no log file for this job.

          Vivek Pandey added a comment - I am summarizing here the findings, there are problems in different areas: favorites API is taking longer than usual and then SSE /configure API takes really long time. search API also takes long time, we can improve it but I am not too sure given how we want flattened/sorted list. Key Findings (actionable/'to be investigated' items) SSE SSE configure call takes really long time (~10sec) for job channel subscription (there are two job subscriptions) "subscribe": [ { "jenkins_channel": "job" } , { "jenkins_channel": "job" } ], SSE configure for pipeline channel is relatively less but still long time (3-4 sec) Avoid redirection by appending ‘/‘. GET /js-extensions costs 61ms Run details page calls SSE configure API 5 times each taking on average ~2secs. Favorites API (page limit 26) GET takes unreasonably long time 5.56 sec and there is only one favorited item!!! Favorite item is a pipeline object that includes latest Run. It also includes actions (changeset, branch details) so interacting with git (file IO, hope it doesn’t go all the way to github for that)? Needs investigation Search API (page limit 26) Took 7 sec on average To address sorting by name and exclude certain items from flattening all possible items are loaded in memory jenkins.getAllItems() Exclude items that are children of multi-branch and matrix project Don’t see how we can avoid it unless the jobs are stored in some kind of db with indexed column to speed up sorting and only give limited records instead of all new PipelineContainerImpl().getPipelines(items) should be pagination aware At present it creates BluePipeline object for all possible items (ouch!) Static Resources blueocean.js (642KB), 370 ms to load: is loaded on each page (dashboard, run details, pipeline) An so are most other JS files If these are cached (not fetched for each page can easily save few secs) Further details: Dashboard GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec This should be ok as this is SSE channel to get server side events, this connection remains opened for server to send events whenever there is data. POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec Js-extensions GET http://10.10.1.130:8080/blue/js-extensions 61ms (redirect) GET http://10.10.1.130:8080/blue/js-extensions/ *8ms * append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms. Project/Pipeline page POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!! GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXXX/activities/ 18.99 sec append ‘/‘ in initial GET http://10.10.1.130:8080/blue/js-extensions can save 61ms. Run page http://10.10.1.130:8080/adjuncts/807c3957/io/jenkins/blueocean/blueocean.js (642.28KB) 370 ms (why is it loaded on this page)? GET http://10.10.1.130:8080/blue/rest/search/ 7.10 sec GET http://10.10.1.130:8080/blue/rest/search/ 2.16 sec (Why second call)!!! GET http://10.10.1.130:8080/sse-gateway/listen/jenkins_blueocean-1473319896763-1yloru4qt6xwe32wewmi 30.08 sec POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec GET http://10.10.1.130:8080/blue/rest/users/XXX/favorites/ 5.56 sec SSE Job Channel POST http://10.10.1.130:8080/sse-gateway/configure 9.87 sec Why 5 subscription calls to ‘pipeline’ channel? POST http://10.10.1.130:8080/sse-gateway/configure 3.03 sec (channel pipeline) POST http://10.10.1.130:8080/sse-gateway/configure 19 ms (channel pipeline) POST http://10.10.1.130:8080/sse-gateway/configure 2.03 sec (channel pipeline) POST http://10.10.1.130:8080/sse-gateway/configure 2.77 sec (channel pipeline) POST http://10.10.1.130:8080/sse-gateway/configure 4.45 sec (channel pipeline) GET http://10.10.1.130:8080/blue/rest/organizations/jenkins/pipelines/XXX/branches/XXX/runs/1/log/ 90ms Gives 500 as there are no log file for this job.

          James Dumay added a comment -

          Thanks vivek - where are you going to start?

          James Dumay added a comment - Thanks vivek - where are you going to start?

          Vivek Pandey added a comment -

          jamesdumay it touches several aspects of BO. See key findings above. For example UI should stop sending redundant calls costing multiple of seconds, cache JS scripts across pages, investigate why SSE configure for job subscription is expensive, Favourite and search API performance etc. you should split it in to multiple tickets and assign right people to it.

          For favorite Ivan or me should look in to. I plan to take on search for sure.

          Vivek Pandey added a comment - jamesdumay it touches several aspects of BO. See key findings above. For example UI should stop sending redundant calls costing multiple of seconds, cache JS scripts across pages, investigate why SSE configure for job subscription is expensive, Favourite and search API performance etc. you should split it in to multiple tickets and assign right people to it. For favorite Ivan or me should look in to. I plan to take on search for sure.
          Vivek Pandey made changes -
          Status Original: In Progress [ 3 ] New: Open [ 1 ]

            vivek Vivek Pandey
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: