Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

The old golden Question - Cpu load vs utilization

Solaris


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-07-2017   -   Original Discussion by javanoob
javanoob javanoob is offline
Registered User
 
Join Date: Nov 2014
Last Activity: 10 April 2017, 2:00 PM EDT
Posts: 84
Thanks: 63
Thanked 0 Times in 0 Posts
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.Linux

Regards,
Noob
Sponsored Links
    #2  
Old Unix and Linux 01-07-2017   -   Original Discussion by javanoob
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 17 November 2017, 6:09 PM EST
Location: NM
Posts: 11,238
Thanks: 570
Thanked 1,116 Times in 1,030 Posts
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.
Sponsored Links
    #3  
Old Unix and Linux 01-08-2017   -   Original Discussion by javanoob
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 18 November 2017, 10:05 AM EST
Location: Outside Paris
Posts: 4,872
Thanks: 18
Thanked 635 Times in 554 Posts
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 Unix and Linux 01-09-2017   -   Original Discussion by javanoob
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 17 November 2017, 6:09 PM EST
Location: NM
Posts: 11,238
Thanks: 570
Thanked 1,116 Times in 1,030 Posts
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.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Place bits! - 2013 Golden Globe Awards Yoda What is on Your Mind? 0 12-16-2012 02:09 AM
Memory utilization question skotapal UNIX for Dummies Questions & Answers 1 06-29-2007 07:33 AM
Need help in wrting Load Script for a Load-Resume type of load. ankitgupta Shell Programming and Scripting 1 11-10-2006 12:46 AM



All times are GMT -4. The time now is 11:59 AM.