Operating System - HP-UX
1833832 Members
1922 Online
110063 Solutions
New Discussion

Processes using more than 100% cpu???

 
SOLVED
Go to solution
support_5
Super Advisor

Processes using more than 100% cpu???

Hi folks,

I noticed some strange behaviour the other day, I had a process that was running (according to glance) at 170% cpu, on a 4 cpu L class. It was a java thread (native_thread is the process name). I was wondering if someone could shed some light on the issue as to why it showed as having 170% cpu to the process, and perhaps shed some light on how HP-UX handles threads vs processes and how that affects metrics such as cpu usage.

My guess into the matter is that there were a few threads running on multiple cpu's, and cumulatively, it was consuming 170% of 400% (for the 4 cpus). Is this correct?

I look forward to hearing about how threads and processes differ and how that affects performance measurment etc.

Thank you!

- Andrew Gray
1 REPLY 1
James Murtagh
Honored Contributor
Solution

Re: Processes using more than 100% cpu???

Hi Andrew,

Depending on the exact metric you are refering to your assumption is correct. You can find out exactly what each section is reporting using the tooltip on the graphical version of glance (gpm). Click on the question-mark box on the top right of the screen and place the cursor over the desired field, which will bring up the description. For the process list tables "CPU %" field for example, the tooltip discusses kernel threads on MP systems that can lead to this condition.

Threads and processes is a rather large and complex topic. :-) I'll give you a (very) brief description and point you to the process management white paper I think. A process is the container for a set of threads, one (kernel thread) is always created by default. The You have two types of threads - kernel threads which are created and scheduled in the kernel, hence can use the parallelism of multiple CPUs on an MP system - and user threads which are created and scheduled by a library. Within a particular process user threads cannot run simultaneously as the kernel doesn't schedule them, the library does. Hence your java process has at least two kernel threads as they are the only ones that can run simultaneously and hence accumulate > 100% per-process cpu time.

There is a lot of documentation on the web about threads and in books covering OS internals. However, this document should be a very good start :

http://www.docs.hp.com/hpux/onlinedocs/5965-4642/5965-4642.html

Cheers,

James.