Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VisualVM CPU graph on multicore machines

Tags:

jvisualvm

On a multicore machine, does the JVisualVM CPU usage graph show total machine CPU capacity or something else?

As an example, on a machine with 16 cores, if I see CPU usage in JVisualVM going up to 50 percent, does that mean the equivalent of 8 cores fully in use?

like image 830
Rich Avatar asked Dec 20 '11 09:12

Rich


People also ask

What is the difference between JConsole and VisualVM?

JConsole uses only JMX, but VisualVM uses other monitoring technologies like Jvmstat, Attach API and SA in addition to JMX. It can merge data from all those monitoring technologies in one place and the user does not need to think which technology he should use in particular situation.

How does VisualVM connect to remote JVM?

There are two ways to connect a remote JVM application to VisualVM: Either using jstatd or Java Management Extensions (JMX). The jstatd program is an RMI server that bundled with the JDK and monitors JVM and provides an interface to allow remote monitoring tools to attach to JVM running on the localhost.

What is perform GC in VisualVM?

GC (Garbage Collection) is a automatic process of clamming unused allocated memory which was previously allocated. It is an important process to make room for further memory allocation and developer need not to explicitly deallocate memory. it helps in eliminating memory leaks and other memory-related problems.

What is profiler in VisualVM?

The Profiler tab of an application enables you to start and stop the profiling session of a local application. Profiling results are displayed in the Profiler tab. You can use the toolbar to refresh the profiling results, invoke garbage collection and save the profiling data.


1 Answers

I just tested with VisualVM 1.3.2 and the CPU display is calibrated so that 100% is 100% of all cores.

I tested by creating a simple application that entered a tight while loop upon launch. I verified using Activity Monitor that Java was using 100% of one core. In VisualVM it showed approximately 12% CPU usage.

like image 131
Ben Baron Avatar answered Jan 03 '23 14:01

Ben Baron