如何解读分析结果? [英] How to interpret profiling results?
问题描述
我使用NetBeans和VisualVM运行了内存Profiler并收到了结果但是没有线索如何分析其结果,我研究了这个文章但它没有教导或提供如何解释结果的线索。
I ran memory Profiler using NetBeans and VisualVM and received the results but do not have a clue how to analyze its results, I studied this article but it does not teach or give a clue on how to interpret the results.
我也发现了这个文章,但我正在寻找一篇包含更多细节的文章,或者是一种解释以下结果的方法。
I have also found this article about interpreting results on Netbeans 4 but am looking for an article with more details,or a way to interpret the following results to learn.
推荐答案
您在问题中粘贴的遥测图表中传达的信息确实不多。
There really isn't much information conveyed in the telemetry graphs you've pasted in your question.
传达的是什么
- 您的程序受到监控约3分钟
- 您的堆利用率略有下降少于200mb(没什么特别的)
- 你有大约90个线程(这必须是一个应用服务器)
- 你的花费少于GC中的平均值为5%(正常)
- Your program was monitored for about 3 minutes
- Your heap utilization is slightly less than 200mb (nothing special)
- You've got about 90 threads (this must be an app server)
- You're spending less than 5% on average in GC (normal)
我打赌在记忆中可视化传达的锯齿状图案zer是你的程序启动 - 否则为什么事情似乎在最后一分钟左右平滑。您的申请是否在您的问题中显示的3分钟内处于任何负载状态?
I bet the saw-tooth pattern conveyed in the memory visualizer is your program booting - otherwise why do things seem to smooth other in the last minute or so. Was your application under any load during the 3 minute period shown in your question?
作为起点,我会查看您的计划在GC中花费的时间(相对于GC中的时间)当您的程序执行繁重的工作时。如果它超过5%,您可以考虑调整堆或进一步挖掘以找出分配发生的位置。
As a starting point I'd look at how much time your program spends in GC (Relative Time in GC) when your program is doing some heavy lifting. If it's more than 5%, you may consider tuning your heap or digging further to find out where the allocations are occuring.
接下来我会寻找瓶颈。找出您的应用程序花费大部分时间的位置,看看您是否可以以某种方式优化该代码。
Next I would look for a bottleneck. Find out where your application is spending most of it's time, and see if you can somehow optimize that code.
这篇关于如何解读分析结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!