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

Record heap histograms

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      (Thought this was already filed, but cannot find it now.)

      There should be a component which records heap histograms using jmap -histo:live or something equivalent in-process. This can offer at least a guess as to the cause of increasing memory usage, pending an actual heap dump to pinpoint the problem.

        Attachments

          Issue Links

            Activity

            Hide
            evernat evernat added a comment - - edited

            If you have the Monitoring plugin installed in your Jenkins server, then the "/monitoring?part=heaphisto" page will display the same thing to guess the cause of increasing memory usage, and it will offer to take a heap dump for you.

            The "/monitoring?part=heaphisto&format=pdf" will give you the same data as pdf.

            OK, that's not the same as recording heap histograms over time.
            But, you could also use the groovy plugin in a periodic job, to execute the following script and record heap histogram for each execution of your job:
            https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+Scripts#MonitoringScripts-Displayheaphistogram%28objectinstancesperclass%29

            (sorry for groovy)

            Show
            evernat evernat added a comment - - edited If you have the Monitoring plugin installed in your Jenkins server, then the "/monitoring?part=heaphisto" page will display the same thing to guess the cause of increasing memory usage, and it will offer to take a heap dump for you. The "/monitoring?part=heaphisto&format=pdf" will give you the same data as pdf. OK, that's not the same as recording heap histograms over time. But, you could also use the groovy plugin in a periodic job, to execute the following script and record heap histogram for each execution of your job: https://wiki.jenkins-ci.org/display/JENKINS/Monitoring+Scripts#MonitoringScripts-Displayheaphistogram%28objectinstancesperclass%29 (sorry for groovy)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Emilio Escobar
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/HeapHisto.java
            http://jenkins-ci.org/commit/support-core-plugin/6e0769a119ea7746efc4da4d33b337f3fdf6eff8
            Log:
            JENKINS-22791 Added heap histogram generation component

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Emilio Escobar Path: src/main/java/com/cloudbees/jenkins/support/impl/HeapHisto.java http://jenkins-ci.org/commit/support-core-plugin/6e0769a119ea7746efc4da4d33b337f3fdf6eff8 Log: JENKINS-22791 Added heap histogram generation component
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Emilio Escobar
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/HeapHisto.java
            http://jenkins-ci.org/commit/support-core-plugin/cfd0268183c7cac25acecb84b8a98a219c55561d
            Log:
            JENKINS-22791 ;

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Emilio Escobar Path: src/main/java/com/cloudbees/jenkins/support/impl/HeapHisto.java http://jenkins-ci.org/commit/support-core-plugin/cfd0268183c7cac25acecb84b8a98a219c55561d Log: JENKINS-22791 ;
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Emilio Escobar
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/HeapHisto.java
            http://jenkins-ci.org/commit/support-core-plugin/d940fd12dd8bbbe73e2308d0e7c05ad28e0d8f28
            Log:
            JENKINS-22791 The file should be truncated to the first 200 entries, not 500.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Emilio Escobar Path: src/main/java/com/cloudbees/jenkins/support/impl/HeapHisto.java http://jenkins-ci.org/commit/support-core-plugin/d940fd12dd8bbbe73e2308d0e7c05ad28e0d8f28 Log: JENKINS-22791 The file should be truncated to the first 200 entries, not 500.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Emilio Escobar
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/HeapUsageHistogram.java
            http://jenkins-ci.org/commit/support-core-plugin/42fae57ec6092aa0a822f38feb3b19cbe9d213b9
            Log:
            JENKINS-22791 cache is no longer used

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Emilio Escobar Path: src/main/java/com/cloudbees/jenkins/support/impl/HeapUsageHistogram.java http://jenkins-ci.org/commit/support-core-plugin/42fae57ec6092aa0a822f38feb3b19cbe9d213b9 Log: JENKINS-22791 cache is no longer used
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Emilio Escobar
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/HeapUsageHistogram.java
            http://jenkins-ci.org/commit/support-core-plugin/256310135ad3ecd237f0ce2ccf82a84e84f4473a
            Log:
            JENKINS-22791 removed unused parameter and redundant line

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Emilio Escobar Path: src/main/java/com/cloudbees/jenkins/support/impl/HeapUsageHistogram.java http://jenkins-ci.org/commit/support-core-plugin/256310135ad3ecd237f0ce2ccf82a84e84f4473a Log: JENKINS-22791 removed unused parameter and redundant line
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Steven Christou
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/HeapUsageHistogram.java
            http://jenkins-ci.org/commit/support-core-plugin/ea8b5b929a0cd7196f70018e8ae3e1e5845809d1
            Log:
            Merge pull request #119 from escoem/JENKINS-22791

            JENKINS-22791 Record heap histograms

            Compare: https://github.com/jenkinsci/support-core-plugin/compare/6cb4198b778a...ea8b5b929a0c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Steven Christou Path: src/main/java/com/cloudbees/jenkins/support/impl/HeapUsageHistogram.java http://jenkins-ci.org/commit/support-core-plugin/ea8b5b929a0cd7196f70018e8ae3e1e5845809d1 Log: Merge pull request #119 from escoem/ JENKINS-22791 JENKINS-22791 Record heap histograms Compare: https://github.com/jenkinsci/support-core-plugin/compare/6cb4198b778a...ea8b5b929a0c
            Hide
            escoem Emilio Escobar added a comment -

            PR has been merged and the feature will be probably included with support-core-plugin:2.42

            Show
            escoem Emilio Escobar added a comment - PR has been merged and the feature will be probably included with support-core-plugin:2.42

              People

              • Assignee:
                escoem Emilio Escobar
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: