The old golden Question - Cpu load vs utilization


 
Thread Tools Search this Thread
Operating Systems Solaris The old golden Question - Cpu load vs utilization
# 1  
Old 01-07-2017
The old golden Question - Cpu load vs utilization

Hi all,

Load = run queue, process utilizing cpu or waiting for cpu
Cpu utilization = % of time that the cpu is busy.

Naturally, I am thinking that if I have 1 cpu and my load=1 all the time, my CPU is 100% busy.

Now I have 2 CPU thread running and doing prstat -Z, this is what I saw

Code:
 
 ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU    ZONE
     3           164       11G   11G   8.7%      0:46:43 8.8% xzone1
 Total: 164 processes, 617 lwps, load averages: 1.43, 1.29, 1.30

I have a load of ard >1 for the past 15 minutes, it means I have 1 out of the 2 available CPUs busy all the time -> isn't it ?

But my CPU% is only 8.8%, and not 50%..

What does this imply, I have run queue of 1 on average, but they are executed too fast (taking too little %cputime ?) ?

But the load shows that I have avg >1 for the past 15min, this means I am utilizing 50% (1 out of 2 cpu available ) of the cputime all the time isn't it ?

This is draining my brain juice.Smilie

Regards,
Noob
# 2  
Old 01-07-2017
As shown -- You do not have a cpu resource problem. Period.
Cpu queues may (note the "may") be caused by a lot of process context switching. LWP's (Solaris threads) can do this. I think that is your issue. But I do no think you have a real problem. Yet.

So, if you want to learn about your system context switches try dtrace using cswstat.d I am definitely not saying this is your perceived issue, but dtrace is your best window into the kernel. And it looks like you want to learn.

Books like this one are very much in order for learning dtrace:
DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD: Brendan Gregg, Jim Mauro: 9780132091510: Amazon.com: Books

Ok. If your system has problems, always consider starting your problem solving with I/O. I/O request queue length for example. You may have one disk device that is being hammered. Or the device has problems.

iostat is your friend here. So is dtrace:
Tutorial: DTrace by Example

Checkout the dtrace toolkit.
# 3  
Old 01-08-2017
You seem to be running these commands from a non global zone. You are missing CPU usage generated in other zones, including the global one. Monitoring need to be done from the global zone, as long as dtrace analysis.

Quote:
Naturally, I am thinking that if I have 1 cpu and my load=1 all the time, my CPU is 100% busy.
That is an oversimplification. CPU load is indeed based on measures of the run queue size and the number of running processes, but as it is a floating average, a load of 1 doesn't necessarily mean one CPU is 100% busy.
CPU utilization might be smaller if for example, two processes are competing for the same CPU 50% of the time and then are idle for the remaining 50% of the time. You'll have a load of 1 and a CPU 50% busy.
Should you have 10 processes competing for a single CPU 10% of the time, then idling for 90% of the time, you will still be observing a load of 1 but a CPU 10% busy.

Last edited by jlliagre; 01-08-2017 at 10:09 AM..
# 4  
Old 01-09-2017
jlliagre may be correct. If you ran the command in the global zone versus ran in the zone itself then the interpretation is different. As he stated. where did you run prstat?

dtrace should be run in the root (global) zone.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

CPU Utilization and Memory Utilization of Services and Applications

Hi, i am new to linux/RHEL 6.0 and i have two questions. 1) How to get the CPU utilization and Memory Utilization of all Services running currently? 2) How to get the CPU utilization and Memory Utilization of all Applications running currently? Please help me to find the script. ... (2 Replies)
Discussion started by: nossam
2 Replies

2. UNIX for Advanced & Expert Users

CPU utilization

Hi, any commande on AIX 6.1 that shows me total CPU utilization ? I saw curt in documentation but there should be a trace file before. Thank you. (1 Reply)
Discussion started by: big123456
1 Replies

3. Shell Programming and Scripting

CPU Utilization

I know how to check the CPU utilization and memory space like: vmstat top free What i want ot check on my linux system is... how much CPU are available on my system and do i need to put extra CPU. Also need to check the hardware configuration and the space related to the same ... (3 Replies)
Discussion started by: j_panky
3 Replies

4. AIX

CPU Utilization

Hi All, Can some one help me in finding % CPU Utilization ? From VMSTAT command, How we can find % utilization ? Thanks (3 Replies)
Discussion started by: VBudatha
3 Replies

5. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

6. Shell Programming and Scripting

CPU Utilization

Hi to All, Would you please help me. I would like to know, In Unix How to know CPU utilization for every process. Thanks in Advance. Thanks, Divyang (3 Replies)
Discussion started by: div_Neev
3 Replies

7. Shell Programming and Scripting

CPU Utilization

Dear friends, I am doing a report daily for all most 30 more serves... i need to check out CPU utlization bu (top command, 100 - (ideal value)) and Memory utilization too could some one help me how can i get it directly, if scripts also no problem.. i will very thankful if some one... (3 Replies)
Discussion started by: bullz26
3 Replies

8. UNIX for Dummies Questions & Answers

% CPU utilization

Hi, iam new to AIX and had a basic question. I was asked to give a chart of CPU utilization in percentage for every hour. where can i look for information and which column should i look at? I would be very thankful if somebody could respond. Thanks! karthik (1 Reply)
Discussion started by: karthikosu
1 Replies

9. UNIX for Advanced & Expert Users

CPU Utilization

On user complains about the performance of web application, as a part application support, we use following commands to see the CPU utilization in the UNIX using ‘sar' command. Some times it goes below 20 and even reaches 0. HLW$~> sar -u 10 60 SunOS HLW 5.8 Generic_117350-14 sun4u ... (2 Replies)
Discussion started by: thinakarmani
2 Replies

10. UNIX for Dummies Questions & Answers

CPU Utilization

What command do you use to verify if the CPU utilization. Example. If the CPU is at 98%? Thanks (4 Replies)
Discussion started by: kimosilk
4 Replies
Login or Register to Ask a Question