TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Most Sampling Java Profilers Are Terrible

54 pointsby dmitabout 9 years ago

8 comments

TYPE_FASTERabout 9 years ago
I&#x27;ve had good results using DynaTrace for profiling .NET code. They have a Java version that I would try if I needed such a thing: <a href="http:&#x2F;&#x2F;www.dynatrace.com&#x2F;en&#x2F;technology&#x2F;java.html" rel="nofollow">http:&#x2F;&#x2F;www.dynatrace.com&#x2F;en&#x2F;technology&#x2F;java.html</a><p>What is really helpful is that you can run DynaTrace in production without impacting performance. DynaTrace agents run on the production web&#x2F;app servers and send data to DynaTrace collectors.<p>This makes resolving production issues way easier. You sort by CPU time in descending order and work down the list. You already have the stack trace and data associated with the request or SQL query.
评论 #11418334 未加载
评论 #11418057 未加载
imtringuedabout 9 years ago
Sampling profilers in general are terrible. Unfortunately I can&#x27;t get code instrumenting profilers to work on the eclipse process.<p>The worst thing about the JVM aprofiler won&#x27;t tell you about how much time the JVM spends JITing&#x2F;class loading. For short running processes you might be surprised to find that the profiler tells you everything is okay but in my case the program still needed one second to start.<p>I was pleasantly suprised that the equivalent python programm merely needs 100ms from start to finish (essentially feeling instant) even though it should be slower overall.
评论 #11420425 未加载
评论 #11420769 未加载
评论 #11419944 未加载
j_sabout 9 years ago
Was trying to dig up the HN discussion for this article from last summer, but haven&#x27;t found it yet:<p><a href="http:&#x2F;&#x2F;techblog.netflix.com&#x2F;2015&#x2F;07&#x2F;java-in-flames.html" rel="nofollow">http:&#x2F;&#x2F;techblog.netflix.com&#x2F;2015&#x2F;07&#x2F;java-in-flames.html</a><p><i>Java mixed-mode flame graphs provide a complete visualization of CPU usage and [...] can identify all CPU consumers and issues, including those that are hidden from other profilers.</i>
grandinjabout 9 years ago
For me, this is a storm in a teacup. I use Netbeans Profiler regularly, and it produces decent results for me.<p>It&#x27;s only when the profile starts getting pretty flat that the inaccuracies of this method start showing up, but for run of the mill performance problems where you have nice fat spikes sticking up here and there, it is perfectly adequate.
zamalekabout 9 years ago
Throw .Net into this category. Spent weeks of my life and our clients&#x27; lives wasting time with, not inaccurate, but grossly incorrect results from a paid product. It either confused locks for CPU time (obscuring real hotspots) or simply reported CPU time where there was none.<p>So far, only VTune has resulted in actionable profiler results (there may be others); within hours (not weeks) we had solved many issues by switching to it. A profiler is as indispensable as a compiler, don&#x27;t skimp on it - you&#x27;re going to end up spending that money one way or another.
norswapabout 9 years ago
I&#x27;ve never ever gotten any good results with a Java profiler. HPROF runs, but its results are garbage. Yourkit and VisualVM are apparently not able to handle the heat of a CPU intensive application and crash or are generally unusable (and this on two different computers with different OSes). If you must know, I was trying to profile a parser.
评论 #11419214 未加载
评论 #11420990 未加载
CJeffersonabout 9 years ago
I&#x27;ve only started profiling Java code this week, and I&#x27;ve been shocked by the poor state of affairs.<p>Does anyone have any recommendations, preferably that can tell you (some) information at the line level. I never realised how spoilt I was with C&#x2F;C++ options (gcov and valgrind aren&#x27;t great, but they mostly do the job).
评论 #11420756 未加载
ysleepyabout 9 years ago
Well, a bit click-baity.<p>Yes sampling profilers are inaccurate, and most users know the limitations. It is deliberately a profiler on the one side of the trade-off.<p>The google paper was more interesting.
评论 #11417691 未加载