http://www.yourkit.com/docs/10/help/agent.jsp
see also http://www.torsten-horn.de/techdocs/jee-oracleweblogic.htm#YourKit
In brief, if you are lazy:
in YourKit, Tools/Integrate with standalone Application Server, choose WebLogic 9/10,
provide location of the startup script (not necessarily startWebLogic.cmd, if you are profiling a Managed Server you will provide C:\bea1035\user_projects\domains\osb_domain\startms1.cmd )
(I choose JVM 32bit)
YourKit will generate a C:\bea1035\user_projects\domains\osb_domain\startms1_with_yjp.bat
who simply inserts a
set JAVA_OPTIONS=-agentpath:C:\PROGRA~2\YOURKI~1.0\bin\win32\yjpagent.dll=disablestacktelemetry,disableexceptiontelemetry,builtinprobes=none,delay=10000,sessionname=WebLogic %JAVA_OPTIONS%
before my startManagedWebLogic.cmd
Make sure that in the agentpath parameters you specify also port=11001 if port 10001 is already in use. YourKit says that it dynamically chooses another port but this didn't work for me.
Remove disablestacktelemetry (anyway you can still disable it runtime with a button).
In "Capture Memory Snapshot", enable HPROF format.
Showing posts with label yourkit. Show all posts
Showing posts with label yourkit. Show all posts
Sunday, October 2, 2011
Friday, March 18, 2011
Hibernate Cascading on flushing
this snapshot (taken with YourKit profiler) shows the tremendous performance impact of cascading the flush to dependent objects - even if nothing has to be written to the DB.
Basically if you have
Employee {
String name;
Company company;
}
and you update/flush Employee, the blessed hibernate will try to flush also Company; And if Company contains other dependent objects, the process will go on forever and eat all your CPU.
CascadeType should be NONE by default.
As you can see here
http://www.docjar.com/docs/api/org/hibernate/event/def/AbstractFlushingEventListener.html
there are quite a lot of operations involved when persisting stuff.
So the message is: avoid as much as you can doing "find" operation in a transaction where you do updates (this will autoflush at every find). Also avoid cascading operations on dependent objects.
Monday, March 14, 2011
YourKit Java Profiling
it's really neat and very easy to install and use:
http://www.yourkit.com
how to add an agent to your application:
http://www.yourkit.com/docs/95/help/running_with_profiler.jsp
To profile an application running in JBoss is very easy:
do Tools/Integrate with JEE server and provide location of your run.bat file,
it will create a run_with_yjp.bat for you.
To profile Java 5, you must use the old version (8).
http://www.yourkit.com
how to add an agent to your application:
http://www.yourkit.com/docs/95/help/running_with_profiler.jsp
To profile an application running in JBoss is very easy:
do Tools/Integrate with JEE server and provide location of your run.bat file,
it will create a run_with_yjp.bat for you.
To profile Java 5, you must use the old version (8).
Subscribe to:
Posts (Atom)