The best way to check the GC status
2013-09-12 10:56
399 查看
$ jstat -gcutil 21719 1s
S0 S1 E O P YGC YGCT FGC FGCT GCT
48.66 0.00 48.10 49.70 77.45 3428 172.623 3 59.050 231.673
48.66 0.00 48.10 49.70 77.45 3428 172.623 3 59.050 231.673
Here, check the values of YGC and YGCT. Divide YGCT by YGC. Then you get 0.050 seconds (50 ms). It means that it takes average 50 ms to execute GC in the Young area. With that result, you don't need to care about GC for the Young area.
And now, check the values of FGCT and FGC. Divide FGCT by FGC. Then you get 19.68 seconds. It means that it takes average 19.68 seconds to execute GC. It may take 19.68 seconds to execute GC three times. Otherwise, it takes 1 second to execute GC two times
and 58 seconds for once. In both cases, GC tuning is required.
You can easily check GC status by using the jstat command; however, the best way to analyze GC is by generating logs with the –verbosegc option. For a detailed description on how to generate and tools to analyze logs, I have explained it the previous article.
HPJMeter is my favorite among tools that are used to analyze the -verbosegc log. It is easy to use and analyze. With HPJmeter you can easily check the distribution of GC execution times and the frequency of GC occurrence.
see: http://www.cubrid.org/blog/dev-platform/how-to-tune-java-garbage-collection/
S0 S1 E O P YGC YGCT FGC FGCT GCT
48.66 0.00 48.10 49.70 77.45 3428 172.623 3 59.050 231.673
48.66 0.00 48.10 49.70 77.45 3428 172.623 3 59.050 231.673
Here, check the values of YGC and YGCT. Divide YGCT by YGC. Then you get 0.050 seconds (50 ms). It means that it takes average 50 ms to execute GC in the Young area. With that result, you don't need to care about GC for the Young area.
And now, check the values of FGCT and FGC. Divide FGCT by FGC. Then you get 19.68 seconds. It means that it takes average 19.68 seconds to execute GC. It may take 19.68 seconds to execute GC three times. Otherwise, it takes 1 second to execute GC two times
and 58 seconds for once. In both cases, GC tuning is required.
You can easily check GC status by using the jstat command; however, the best way to analyze GC is by generating logs with the –verbosegc option. For a detailed description on how to generate and tools to analyze logs, I have explained it the previous article.
HPJMeter is my favorite among tools that are used to analyze the -verbosegc log. It is easy to use and analyze. With HPJmeter you can easily check the distribution of GC execution times and the frequency of GC occurrence.
see: http://www.cubrid.org/blog/dev-platform/how-to-tune-java-garbage-collection/
相关文章推荐
- What is the best way to implement a heartbeat in C++ to check for socket connectivity?
- What is the best way to calculate a checksum for a file that is on my machine?
- The Best Way to Learn Python(学习Python最好的方法)
- Bing Beats Google for the Best Way to X-Ray Search LinkedIn
- The best way to Outfit Rich in Junior high school
- The best way to give medicine Pet
- ADF: The best way to indicate for records in a table the existence of details
- The best way to convert and burn videos to dvd
- The best way to predict the future is to invent it,预测未来最好的方法是创造它!
- Bing Beats Google for the Best Way to X-Ray Search LinkedIn
- The Best Way to Learn
- The best way to fix a bug
- What is the best way to handle Invalid CSRF token found in the request when session times out in Spring security
- Failed to check the status of the service com.taotao.service.ItemService.
- Visual C the best way to get the contents of a file directory into a list
- The best way to improve your listening
- know how it works is the best way to understand all
- The best way to be "right once" is to have the ability to envision what things are going to look like three weeks, three months
- dubbo异常:Failed to check the status of the service . No provider available for the service 解决
- WampDeveloper Pro is the best (and fastest) way to create and run multiple websites on Windows, usin