Get your CodeRanch badge!*
The moose likes Performance and the fly likes Use OptimizeIt for ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Use OptimizeIt for ..." Watch "Use OptimizeIt for ..." New topic
Author

Use OptimizeIt for ...

Steve Wong
Greenhorn

Joined: Oct 15, 2002
Posts: 5
I use OptimizeIt just when I find clear memory leak.
Unclear memory leak or a minor code tuning for performance like replacing String by StringBuffer is not easily reflected in OptimizeIt. Do you agree?
When will you all use OptimizeIt then?
Also, I find that simultaneous tomcat requests on JSP increases memory usage a lot more than what your codes can be tuned.
Mark Herschberg
Sheriff

Joined: Dec 04, 2000
Posts: 6037
I disagree. If you use it the right way, and the issue is big enough, you can find it. Maybe not in a single case, but if it's in highly used code, the difference will show if looked at correctly.
The trickiest part of the tool is using it the first few times, seeing thousands of objects and not knowing if its too many. :-)
--Mark
Steve Wong
Greenhorn

Joined: Oct 15, 2002
Posts: 5
And I am performance tuning a web application. The memory used by tomcat(e.g. Handling the server thread) is always a lot more than what my code does. So, it is further difficult for me to spot if there's memory problem.
Jack Shirazi
Author
Ranch Hand

Joined: Oct 26, 2000
Posts: 96
OptimizeIt! is a full featured profiler, and you can use it to find unintentionally retained objects (memory leaks), objects created too often, and execution bottlenecks.
It can take a little while to get used to using a profiler. You might want to run through the tutorial that comes with it (at least it used to have a tutorial accessible from the help option)
--Jack Shirazi
JavaPerformanceTuning.com
Steve Wong
Greenhorn

Joined: Oct 15, 2002
Posts: 5
And I have used ab to concurrently retrieve a static page or dynamic blank page from tomcat. The memory used shown by the top utility increases a lot. The memory graph in OptimizeIt changes a lot and GC activity graph shows much activities. Because of the GC activity, the CPU time shown by the top utility is at a high value.
I can't notice that tomcat is so bad compared to other application servers. Is that the only way to get around it is using another application servers?
Jack Shirazi
Author
Ranch Hand

Joined: Oct 26, 2000
Posts: 96
You may need to analyze the GC statistics, generated using -verbosegc or -Xloggc
--Jack Shirazi
JavaPerformanceTuning.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use OptimizeIt for ...
 
Similar Threads
Detecting memory leak with Junit
java.lang.outofmemory Error
Memory Leaks
any class that is made up of byte array?
FileInputStream large files