day91-performance pressure measurement-performance monitoring-jvisualvm use

1. What can jvisualvm do

jvisualvm is equivalent to the upgraded version of jconsole

2. Startup method

Because it comes with jdk

cmd window enter jvisualvm

The opening interface is as follows, on the left is the running local process

After double-clicking a process on the left, the interface is as follows

The garbage collection cannot be monitored by default, and a plugin needs to be installed 

3. Configure the plug-in center address

 

View jdk version

Open the following link

http://visualvm.github.io/pluginscenters.html

Find the link corresponding to the jdk version range and copy it

Update plug-in center address

Click again to check and update, no error is reported, indicating that the address is configured

4. Install the garbage collection monitoring plug-in

5. What we need to pay attention to

After restarting, you can see that Visual GC appears on the far right

At this point, we can observe the garbage collection process in real time 

Through the following comparison, we can see that the time of full GC is much longer than that of YGC 

In addition, the monitoring interface is also what we need to pay attention to during stress testing.

 You can look at the CPU usage, heap memory usage, heap size and used number, number of classes and number of threads to determine where we need to tune, such as often stuck in cpu calculations, or memory is often easy Full, or the number of threads is not enough to run too slow

It can be seen here that the cpu is still very idle

Later, we will analyze it in detail through pressure testing.

Guess you like

Origin blog.csdn.net/JavaCoder_juejue/article/details/113187227