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.
java linux memory heap
add a comment |
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.
java linux memory heap
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 eventsFGCT: 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
add a comment |
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.
java linux memory heap
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
java linux memory heap
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 eventsFGCT: 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
add a comment |
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 eventsFGCT: 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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 eventsFGCT: 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