Troubleshoot > Troubleshooting Administration > Troubleshooting UCMDB Server Performance with Thread Sampler

Troubleshooting UCMDB Server Performance with Thread Sampler

UCMDB Server includes a thread sampler that can be used to troubleshoot performance related problems without the use of an external tool like VisualVM or YourKit. This will sample all threads and include the collected information in the slow.log as part of the logged threads.

After enabling the thread sampler, when a new entry is created in slow.log, a list of top 10 methods in which the most time was spent will be logged with the thread. By default the sampling is done at a rate of 100 milliseconds.

To enable the thread sampler,

  1. On the UCMDB server, launch the Web browser and access JMX console by providing the following address: https://localhost:8443/jmx-console.

    You may have to log in with a user name and password.

  2. Locate the setGlobalSettingValue operation in the UCMDB:service=Settings Services category.
  3. Provide the following parameter values:

    name: thread.sampling.enabled

    value: true

  4. Click Invoke.
  5. Restart the UCMDB server.

To change the sampling rate value,

  1. On the UCMDB server, launch the Web browser and access JMX console by providing the following address: https://localhost:8443/jmx-console.

    You may have to log in with a user name and password.

  2. Locate the setGlobalSettingValue operation in the UCMDB:service=Settings Services category
  3. Provide the following parameter values:

    name: thread.sampling.frequency

    value: <specify a value in milliseconds>

  4. Click Invoke.
  5. Restart the UCMDB server.

Example entry in slow.log

Top 10 sampled methods (name, own time, total time) ordered by own time:

java.net.SocketInputStream.socketRead0(Native Method), 34400ms, 34400ms
java.util.zip.Inflater.inflateBytes(Native Method), 17400ms, 17400ms
java.io.FileInputStream.readBytes(Native Method), 9900ms, 9900ms
java.lang.Object.wait(Native Method), 4200ms, 4200ms
java.util.Arrays.copyOf(Arrays.java:3332), 1100ms, 1100ms
java.util.Arrays.copyOf(Arrays.java:3236), 1000ms, 1000ms
java.util.zip.ZipFile.getEntry(Native Method), 900ms, 900ms
java.net.SocketOutputStream.socketWrite0(Native Method), 900ms, 900ms
java.lang.Class.forName0(Native Method), 800ms, 900ms
appilog.common.utils.packaging.PackagesFileUtils.inputStreamToBytes(PackagesFileUtils.java:350), 800ms, 1500ms