Understanding & Monitoring CPU performance (Load vs SAR)


 
Thread Tools Search this Thread
Operating Systems Solaris Understanding & Monitoring CPU performance (Load vs SAR)
# 1  
Old 06-04-2016
Understanding & Monitoring CPU performance (Load vs SAR)

Hi all,

Been reading a lot of the cpu load and its "analogy of it to car traffic path of expressway"

From wiki
Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states (usually waiting for disk activity)

q1) what about Solaris (I am on 10) ? Does load include (waiting for disk activity) ?


q2) On a 6 core server , for the past 1 minute -> what does it meant to have a

a) avg load of 6 -- using uptime;
b) cpu idle % of more then 70% ? -- using sar -u 10 6

I issue sar -u 10 6 && uptime (looking at its 1 minute load)

Does it meant that -> for the past 1 minute - my cpu/cores are fully utilized, but the tasks are so simple, the cpu only spent 30% of its time to execute them ?

Regards,
Noob
# 2  
Old 06-04-2016
The load is actually the number of "overdue" threads.
Most obvious is the run queue, threads that are waiting for a free CPU.
But there are threads waiting for something else, e.g. for an I/O driver or another blocked thread. If in user land they show up with state D, but there are also kernel threads that can "pile up" and add to the load.
This User Gave Thanks to MadeInGermany For This Post:
# 3  
Old 06-04-2016
Hi MadeInGermany,

Thanks for your reply and explanation.

So this bring us back to the question, does Solaris consider process waiting for I/O in (D state) as a load ?

Regards,
Noob
# 4  
Old 06-04-2016
Yes.
And it's an explanation for having high load while CPU is not fully used.
This User Gave Thanks to MadeInGermany For This Post:
# 5  
Old 06-04-2016
Quote:
Originally Posted by javanoob
So this bring us back to the question, does Solaris consider process waiting for I/O in (D state) as a load ?
Quote:
Originally Posted by MadeInGermany
Yes
I beg to differ.

There is no D state (uninterruptible) state under Solaris.

My understanding is the S process state (waiting for an event to complete) is not considered as load under Solaris. One or more processes waiting for I/Os to complete do not use any CPU anyway.

Processes in the running and the waiting states (i.e. either using a CPU or runnable but waiting in the run queue) are the only one taken into account.

Last edited by jlliagre; 06-04-2016 at 07:36 PM..
This User Gave Thanks to jlliagre For This Post:
# 6  
Old 06-05-2016
Quote:
Originally Posted by jlliagre
I beg to differ.

There is no D state (uninterruptible) state under Solaris.

My understanding is the S process state (waiting for an event to complete) is not considered as load under Solaris. One or more processes waiting for I/Os to complete do not use any CPU anyway.

Processes in the running and the waiting states (i.e. either using a CPU or runnable but waiting in the run queue) are the only one taken into account.
Hi jlliagre, MadeInGermany

Thanks for all your replies. I believe in linux, IOWait, are actually contributing to the load ( though not reflecting in the run-q ) but Solaris might differ.

Notwithstanding the above, I am trying to understand the co-relationship between cpu-load and cpu utilization

q1) Can I say in a 1 cpu (no core, no hyperthread) environment ->
if the loadavg is 1 (for the last 1 minute) and that 1 thread isn't waiting for any I/O or any other stuff., I would expect to see a near 100% CPU utitlization as well for the last 1 minute?

q2) What could be the scenario whereby i have high amount of load average, but minimum CPU utilization ? (assuming there's no I/O wait).
Could it be the case whereby there are high amount of threads that require CPU time , but getting processed in a very very short time ?

Regards,
Noob

Last edited by javanoob; 06-05-2016 at 02:52 AM..
# 7  
Old 06-05-2016
Yes, Linux is well known to include uninterruptible I/O in its load average calculation.

q1) The so called 1 min load average will tend to reach 1 but if the initial load was negligible, you'll need to wait for several minutes for it to get close to 1. It will be about 0.6 instead of 1 after one minute. Reciprocally, if the initial load was higher than one, you'll need to wait long enough (and likely more than 1 minute) to get close enough to it.

q2) The load average is derived from the run queue size which is sampled at 10 ms interval. The CPU load is computed from micro-state accounting with "exact" precision (i.e. several degrees of magnitude better, in the nanosecond range). A dtrace script should allow to figure out what is the cause of the discrepancy but in any case, the CPU utilization values are accurate, the average load is a rough approximation.
This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Help me Solaris 10&11 cpu load average states for 24 hours report

need to capture the following data on an hourly basis without cronjob scheduling in Solaris 5.10/5.11:- 1. load averages 2. Total no. of processes. 3. CPU state 4. Memory 5. Top 3 process details. any other third-party tool is available? (7 Replies)
Discussion started by: thoranam
7 Replies

2. UNIX for Dummies Questions & Answers

CPU load in video decoding using SAR

Hi, I'm John_giova and I'm new in this Forum. Sorry my english, it's not my first language. So, I'm trying to check the CPU utlization during the video encoding and decoding (making a comparison between SW and HW ) using the SAR tool. According to a past thread I saw as CPU utilization I should... (4 Replies)
Discussion started by: John_giova
4 Replies

3. Shell Programming and Scripting

One script for Linux Monitoring-free, sar, vmstat, mpstat

HI , I am wrirting a script for checking the performance monitoring on Linux System when my application is running. I have to run a test for 30 minutes on some server and while the test is running i have to capture the perfromance metrics of Linux through vmstat , sar, mpstat, free. here is the... (3 Replies)
Discussion started by: Anamica
3 Replies

4. AIX

Using sar to get CPU utilization for WPARs

Based on the documentation (Help - AIX 6.1 Information Center), I should be able to get the CPU utilization on a WPAR. But when I ran sar on the LPAR, I don't see the -@ option: Usage: sar { -A | } ]] ]] | ALL] ] ] I'm on AIX 6.1. ... (0 Replies)
Discussion started by: PPPP
0 Replies

5. SuSE

SUSE 11.4 sar monitoring not run by default.

Hi, I had installed sysstat package below on a SUSE 11.4 box. I can see the sysstat cron file listed under the directory /etc/sysstat. However, it looks like the sysstat sar monitor is never run at all and the daily sar files are not created under the directory /var/log/sa. The cron daemon is also... (1 Reply)
Discussion started by: devtakh
1 Replies

6. Shell Programming and Scripting

Setup of sar command for CPU measures

I receive on a daily basis CPU measures on a UNIX Server (AIX 5.3 version, korn shell). These CPU measures are provided by Omnivision tool. We could see that Omnivision daily stats are not always equal to NMON stats regarding CPU level. On my side (I work in an IT Production Support Team, not... (0 Replies)
Discussion started by: Scofield38
0 Replies

7. Shell Programming and Scripting

awk & CPU Load

Deal All, I'm writing a simple awk to generate some sort of report. The awk will check 24 files (file generated each one hour in a wholoe day) and then it will print one field to another file for counting purposes. The script is working fine but the problem is that the CPU load is very high... (10 Replies)
Discussion started by: charbel
10 Replies

8. Solaris

sar : insufficient address space to load xxxx device records

Hello, i am using Solaris 10, The sar running in my system might be corrupted, but not sure why as there has been no updates to it ( to the best of my knowledge) and it was working fine until few days back. If i try to get sar reports using sar -o <filename> 60 180 there is no error but the... (2 Replies)
Discussion started by: nimi20
2 Replies

9. UNIX for Dummies Questions & Answers

CPU utilization: sar vs ps

Any reason why the "sum of all" average cpu utilization numbers collected from ps during any given time sample are "consistently" lower than the corresponding numbers reported by sar (%usr, %sys). We have a Solaris O/S 2.8. We have been trying to correlate the CPU numbers from the sar, to the... (0 Replies)
Discussion started by: sevpert
0 Replies

10. HP-UX

sar output gives 98% idle CPU

Dear All, Our HPUX 8 GB 8CPU database server is behaving abnormally for the last 4+ weeks. I have generated a sar output and it is here- 11:46:52 %usr %sys %wio %idle 11:46:53 1 1 6 92 11:46:54 0 1 0 99 11:46:55 0 1 0... (3 Replies)
Discussion started by: Ashrunil
3 Replies
Login or Register to Ask a Question