[JIRA] (JENKINS-59956) Support Core should log memory stats regularly

4 views
Skip to first unread message

owen@nerdnetworks.org (JIRA)

unread,
Oct 27, 2019, 8:58:04 PM10/27/19
to jenkinsc...@googlegroups.com
Owen Mehegan updated an issue
 
Jenkins / New Feature JENKINS-59956
Support Core should log memory stats regularly
Change By: Owen Mehegan
Memory/GC issues are one of the most common causes of Jenkins performance issues in production environments. It is difficult to diagnose these issues without GC logs, and GC logging is not enabled by default in any of the Jenkins packages we distribute. While working with another Java application I support, I noticed that it writes statistics about application memory use to the service log on a regular basis. I realized that if Jenkins did this by default, it could enable debugging of many common memory issues without the need to enable GC logging and restart the JVM. Here's a sample of the log output I'm talking about:

 
{noformat}
Pool                 Type             Used  Committed       Init        Max
Code Cache           usage       129.08 MB  133.75 MB    2.44 MB  240.00 MB
Code Cache           peak        132.27 MB  133.75 MB    2.44 MB  240.00 MB
Metaspace            usage       195.06 MB  238.02 MB       0  B      -1  B
Metaspace            peak        195.06 MB  238.02 MB       0  B      -1  B
Compressed Class Space usage        27.42 MB   34.52 MB       0  B 1024.00 MB
Compressed Class Space peak         27.42 MB   34.52 MB       0  B 1024.00 MB
G1 Eden Space        usage        1.091 GB   1.538 GB   83.00 MB      -1  B
G1 Eden Space        collection       0  B   1.538 GB   83.00 MB      -1  B
G1 Eden Space        peak         1.680 GB   1.765 GB   83.00 MB      -1  B
G1 Survivor Space    usage        35.00 MB   35.00 MB       0  B      -1  B
G1 Survivor Space    collection   35.00 MB   35.00 MB       0  B      -1  B
G1 Survivor Space    peak         96.00 MB   96.00 MB       0  B      -1  B
G1 Old Gen           usage       938.52 MB   1.234 GB   1.478 GB   3.117 GB
G1 Old Gen           collection       0  B       0  B   1.478 GB   3.117 GB
G1 Old Gen           peak        957.21 MB   2.659 GB   1.478 GB   3.117
GBCollector GB

Collector
                     Count            Time
G1 Young Generation                  1216           46143
G1 Old Generation                     0               0{noformat}
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

owen@nerdnetworks.org (JIRA)

unread,
Oct 27, 2019, 8:58:04 PM10/27/19
to jenkinsc...@googlegroups.com
Owen Mehegan created an issue
Issue Type: New Feature New Feature
Assignee: Emilio Escobar
Components: support-core-plugin
Created: 2019-10-28 00:57
Priority: Major Major
Reporter: Owen Mehegan

Memory/GC issues are one of the most common causes of Jenkins performance issues in production environments. It is difficult to diagnose these issues without GC logs, and GC logging is not enabled by default in any of the Jenkins packages we distribute. While working with another Java application I support, I noticed that it writes statistics about application memory use to the service log on a regular basis. I realized that if Jenkins did this by default, it could enable debugging of many common memory issues without the need to enable GC logging and restart the JVM. Here's a sample of the log output I'm talking about:

 

Pool                 Type             Used  Committed       Init        Max
Code Cache           usage       129.08 MB  133.75 MB    2.44 MB  240.00 MB
Code Cache           peak        132.27 MB  133.75 MB    2.44 MB  240.00 MB
Metaspace            usage       195.06 MB  238.02 MB       0  B      -1  B
Metaspace            peak        195.06 MB  238.02 MB       0  B      -1  B
Compressed Class Space usage        27.42 MB   34.52 MB       0  B 1024.00 MB
Compressed Class Space peak         27.42 MB   34.52 MB       0  B 1024.00 MB
G1 Eden Space        usage        1.091 GB   1.538 GB   83.00 MB      -1  B
G1 Eden Space        collection       0  B   1.538 GB   83.00 MB      -1  B
G1 Eden Space        peak         1.680 GB   1.765 GB   83.00 MB      -1  B
G1 Survivor Space    usage        35.00 MB   35.00 MB       0  B      -1  B
G1 Survivor Space    collection   35.00 MB   35.00 MB       0  B      -1  B
G1 Survivor Space    peak         96.00 MB   96.00 MB       0  B      -1  B
G1 Old Gen           usage       938.52 MB   1.234 GB   1.478 GB   3.117 GB
G1 Old Gen           collection       0  B       0  B   1.478 GB   3.117 GB
G1 Old Gen           peak        957.21 MB   2.659 GB   1.478 GB   3.117 GBCollector                           Count            Time
G1 Young Generation                  1216           46143
G1 Old Generation                       0               0
Add Comment Add Comment
 

aburdajewicz@cloudbees.com (JIRA)

unread,
Jan 1, 2020, 11:21:03 PM1/1/20
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ commented on New Feature JENKINS-59956
 
Re: Support Core should log memory stats regularly

We should be able to get a lot of info from the GarbageCollectorMXBean.

aburdajewicz@cloudbees.com (JIRA)

unread,
Jan 1, 2020, 11:21:03 PM1/1/20
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ assigned an issue to Allan BURDAJEWICZ
 
Change By: Allan BURDAJEWICZ
Assignee: Emilio  Escobar Allan BURDAJEWICZ
Reply all
Reply to author
Forward
0 new messages