When should a heap dump be taken











up vote
1
down vote

favorite












We have a java application and my query here is to know when I should be taking a heap dump for a particular JVM. On what basis should I look at the memory usage details and take the heap dump to analyse it.



I understand that each Java process has a pid, which when found using the ps command be used with the jstat. From the Jstat Docs, I see the below four ways to know the memory and garbage utilization details -



gc: Displays statistics about the behavior of the garbage collected heap.

gccapacity: Displays statistics about the capacities of the generations and their corresponding spaces.

gccause: Displays a summary about garbage collection statistics (same as -gcutil), with the cause of the last and current (when applicable) garbage collection events.

gcutil: Displays a summary about garbage collection statistics.


From these 4 commands and the data they give, what parameters should i look at and take a heap dump when some of the metrics change. Kindly clarify.










share|improve this question






















  • Quick answer: you would do a deeper analysis if you have a memory related problem (memory leak, excessive memory usage, ...).
    – Henry
    Nov 8 at 6:22












  • agree, but i would like to understand on what parameters are looked at for taking a heap dump. Also, can memory leak be identified by the commands mentioned in the document?
    – sdgd
    Nov 8 at 6:27










  • @sdgd- One factor when you would want to take a heap dump is when you realize that there is a Full gc happening in the gc logs which takes sometime to complete and hence slow downs your application's response time. Also if you already suspect your application is having memory related issues, you can have a VM argument which automatically generates heap dump on out of memory error.
    – Gsab
    Nov 8 at 7:21










  • the above commands i mentioned in the question give two output parameters - FGC: Number of full GC events FGCT: Full garbage collection time. can this help in what you told? the time it takes to do a full GC and the number of full GC events keep increasing ?
    – sdgd
    Nov 8 at 7:25















up vote
1
down vote

favorite












We have a java application and my query here is to know when I should be taking a heap dump for a particular JVM. On what basis should I look at the memory usage details and take the heap dump to analyse it.



I understand that each Java process has a pid, which when found using the ps command be used with the jstat. From the Jstat Docs, I see the below four ways to know the memory and garbage utilization details -



gc: Displays statistics about the behavior of the garbage collected heap.

gccapacity: Displays statistics about the capacities of the generations and their corresponding spaces.

gccause: Displays a summary about garbage collection statistics (same as -gcutil), with the cause of the last and current (when applicable) garbage collection events.

gcutil: Displays a summary about garbage collection statistics.


From these 4 commands and the data they give, what parameters should i look at and take a heap dump when some of the metrics change. Kindly clarify.










share|improve this question






















  • Quick answer: you would do a deeper analysis if you have a memory related problem (memory leak, excessive memory usage, ...).
    – Henry
    Nov 8 at 6:22












  • agree, but i would like to understand on what parameters are looked at for taking a heap dump. Also, can memory leak be identified by the commands mentioned in the document?
    – sdgd
    Nov 8 at 6:27










  • @sdgd- One factor when you would want to take a heap dump is when you realize that there is a Full gc happening in the gc logs which takes sometime to complete and hence slow downs your application's response time. Also if you already suspect your application is having memory related issues, you can have a VM argument which automatically generates heap dump on out of memory error.
    – Gsab
    Nov 8 at 7:21










  • the above commands i mentioned in the question give two output parameters - FGC: Number of full GC events FGCT: Full garbage collection time. can this help in what you told? the time it takes to do a full GC and the number of full GC events keep increasing ?
    – sdgd
    Nov 8 at 7:25













up vote
1
down vote

favorite









up vote
1
down vote

favorite











We have a java application and my query here is to know when I should be taking a heap dump for a particular JVM. On what basis should I look at the memory usage details and take the heap dump to analyse it.



I understand that each Java process has a pid, which when found using the ps command be used with the jstat. From the Jstat Docs, I see the below four ways to know the memory and garbage utilization details -



gc: Displays statistics about the behavior of the garbage collected heap.

gccapacity: Displays statistics about the capacities of the generations and their corresponding spaces.

gccause: Displays a summary about garbage collection statistics (same as -gcutil), with the cause of the last and current (when applicable) garbage collection events.

gcutil: Displays a summary about garbage collection statistics.


From these 4 commands and the data they give, what parameters should i look at and take a heap dump when some of the metrics change. Kindly clarify.










share|improve this question













We have a java application and my query here is to know when I should be taking a heap dump for a particular JVM. On what basis should I look at the memory usage details and take the heap dump to analyse it.



I understand that each Java process has a pid, which when found using the ps command be used with the jstat. From the Jstat Docs, I see the below four ways to know the memory and garbage utilization details -



gc: Displays statistics about the behavior of the garbage collected heap.

gccapacity: Displays statistics about the capacities of the generations and their corresponding spaces.

gccause: Displays a summary about garbage collection statistics (same as -gcutil), with the cause of the last and current (when applicable) garbage collection events.

gcutil: Displays a summary about garbage collection statistics.


From these 4 commands and the data they give, what parameters should i look at and take a heap dump when some of the metrics change. Kindly clarify.







java linux memory heap






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 8 at 6:16









sdgd

311214




311214












  • Quick answer: you would do a deeper analysis if you have a memory related problem (memory leak, excessive memory usage, ...).
    – Henry
    Nov 8 at 6:22












  • agree, but i would like to understand on what parameters are looked at for taking a heap dump. Also, can memory leak be identified by the commands mentioned in the document?
    – sdgd
    Nov 8 at 6:27










  • @sdgd- One factor when you would want to take a heap dump is when you realize that there is a Full gc happening in the gc logs which takes sometime to complete and hence slow downs your application's response time. Also if you already suspect your application is having memory related issues, you can have a VM argument which automatically generates heap dump on out of memory error.
    – Gsab
    Nov 8 at 7:21










  • the above commands i mentioned in the question give two output parameters - FGC: Number of full GC events FGCT: Full garbage collection time. can this help in what you told? the time it takes to do a full GC and the number of full GC events keep increasing ?
    – sdgd
    Nov 8 at 7:25


















  • Quick answer: you would do a deeper analysis if you have a memory related problem (memory leak, excessive memory usage, ...).
    – Henry
    Nov 8 at 6:22












  • agree, but i would like to understand on what parameters are looked at for taking a heap dump. Also, can memory leak be identified by the commands mentioned in the document?
    – sdgd
    Nov 8 at 6:27










  • @sdgd- One factor when you would want to take a heap dump is when you realize that there is a Full gc happening in the gc logs which takes sometime to complete and hence slow downs your application's response time. Also if you already suspect your application is having memory related issues, you can have a VM argument which automatically generates heap dump on out of memory error.
    – Gsab
    Nov 8 at 7:21










  • the above commands i mentioned in the question give two output parameters - FGC: Number of full GC events FGCT: Full garbage collection time. can this help in what you told? the time it takes to do a full GC and the number of full GC events keep increasing ?
    – sdgd
    Nov 8 at 7:25
















Quick answer: you would do a deeper analysis if you have a memory related problem (memory leak, excessive memory usage, ...).
– Henry
Nov 8 at 6:22






Quick answer: you would do a deeper analysis if you have a memory related problem (memory leak, excessive memory usage, ...).
– Henry
Nov 8 at 6:22














agree, but i would like to understand on what parameters are looked at for taking a heap dump. Also, can memory leak be identified by the commands mentioned in the document?
– sdgd
Nov 8 at 6:27




agree, but i would like to understand on what parameters are looked at for taking a heap dump. Also, can memory leak be identified by the commands mentioned in the document?
– sdgd
Nov 8 at 6:27












@sdgd- One factor when you would want to take a heap dump is when you realize that there is a Full gc happening in the gc logs which takes sometime to complete and hence slow downs your application's response time. Also if you already suspect your application is having memory related issues, you can have a VM argument which automatically generates heap dump on out of memory error.
– Gsab
Nov 8 at 7:21




@sdgd- One factor when you would want to take a heap dump is when you realize that there is a Full gc happening in the gc logs which takes sometime to complete and hence slow downs your application's response time. Also if you already suspect your application is having memory related issues, you can have a VM argument which automatically generates heap dump on out of memory error.
– Gsab
Nov 8 at 7:21












the above commands i mentioned in the question give two output parameters - FGC: Number of full GC events FGCT: Full garbage collection time. can this help in what you told? the time it takes to do a full GC and the number of full GC events keep increasing ?
– sdgd
Nov 8 at 7:25




the above commands i mentioned in the question give two output parameters - FGC: Number of full GC events FGCT: Full garbage collection time. can this help in what you told? the time it takes to do a full GC and the number of full GC events keep increasing ?
– sdgd
Nov 8 at 7:25

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53202387%2fwhen-should-a-heap-dump-be-taken%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53202387%2fwhen-should-a-heap-dump-be-taken%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Academy of Television Arts & Sciences

L'Équipe

1995 France bombings