Does anyone here have a favorite memory profiling/

2019-02-07 06:02发布

问题:

I'm looking for a good tool to profile a java webapp. I'd like to get performance information and memory usage if possible.

Any suggestions?

回答1:

JProfiler is a really good one. It integrates with all the major IDEs and application servers.



回答2:

The Eclipse Memory Analyzer is the best tool for analysing the memory usage of java applications



回答3:

I use Netbeans Profiler:

alt text http://www.netbeans.org/images/v6/1/features/profiler-java-cut.png

Its free, has task based profiling, a heap walker, allows the insertion of profiling points, tracks memory usage and threading, but best of all it allows you to profile remote JVM's. You can even attach to ones which are already running.

Oh, and it works really well if you've a maven build for your project too.



回答4:

I've used YourKit Java Profiler 7.5 and was reasonably happy with it. Java has some pretty good tools included with recent releases that are worth looking into. (e.g., jmap -histo <pid>)



回答5:

I like to use SAP Memory Analyzer, which is based in Eclipse. It works very well, also for large heap dumps!



回答6:

For initial investigation, you can start jconsole and attach it to a running process. This will allow you to see memory usage over time even in production, including garbage collections without the full impact of a profiler setup.



回答7:

SmartInspect is a profiler and logger. Not specific to memory, but you might want to take a look. It works with a variety of languages too, including Delphi, Java and .NET. Includes other more advanced features.