FreenetWiki : HowToProfileFred

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Oldest known version of this page was edited on 2007-04-26 23:36:03 by MatthewToseland [how to profile fred]
Page view:

How to profile the node (with hprof)


Shut down the node.

Edit wrapper.conf to add the profiling options and turn off various timeouts:

wrapper.java.additional.3=-Xloggc:freenet.loggc
wrapper.java.additional.4=-Xrunhprof:heap=all,format=a,depth=12,lineno=y,doe=y,gc_okay=y
wrapper.startup.timeout=0
wrapper.shutdown.timeout=0
wrapper.jvm_exit.timeout=0
wrapper.ping.timeout=0
wrapper.disable_restarts=true

In freenet.ini, enable minimal logging and turn off hang checkers (this is another kind of timeout):

logger.priority=NORMAL
logger.priorityDetail=
node.disableHangCheckers=true

Or turn it off altogether:

logger.enabled=false
node.disableHangCheckers=true

And disable any logger.logLevelDetails

This will produce a file called java.hprof.txt on shutdown (which may take some time), and when you kill -QUIT the node.

Search for SITES BEGIN within the file, the main table follows. The stack trace numbers refer to traces earlier on in the file - search from the beginning of the file for TRACE < number i got from the main table >
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.0399 seconds