Customizing Net I/O Thread States For CPU Recording

perfino offers you the possibility to record natively sampled CPU data with minimum overhead and stability risk for the entire VM. The resulting snapshot files can be viewed in JProfiler.

One pre-condition for useful sampling data is that all thread states where the thread is waiting are separate from the default "Runnable" thread state. If that is not the case, the top hotspots usually consist of methods that wait, block or perform network input and output (net I/O).

While waiting and blocking are comprehensively handled by the perfino sampling library, network I/O is often performed via native libraries that perfino does not know about. To mitigate this problem, perfino offers a mechanism to specify a list of additional methods that will be considered as net I/O.

To do that, you can specify the system property -Dperfino.netioMethods=[path to text file] in the Java invocation of the monitored VM. The referenced text file must be located on the machine where the monitored VM is running. Alternatively, perfino looks for the file $HOME/.perfino/netio.txt on Linux/Unix or %USERPROFILE%\.perfino\netio.txt on Windows.

In the netio.txt file, add your net I/O method definitions, one definition per line. A method definition can have one of three forms: