LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-15-2016, 06:38 AM   #1
S_Kho
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Rep: Reputation: Disabled
how it is possible that ldavg-15 is more than ldavg-1 in sar -q output?


May be I am missing something, but can anybody explain me how it is possible that ldavg-15 is more than ldavg-1? I just can't understand. I never seen the like

this is sar -q
Code:
Linux 2.6.32-431.el6.x86_64 (serv1) 	02/01/16 	_x86_64_	(16 CPU)

01:00:01      runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
01:10:01            1      1746      7.83      8.14      8.48
01:20:01            6      1765      7.45      8.89     10.21
01:30:01            3      1766      6.66      8.28     10.75
01:40:01            3      1742      4.39      6.93     10.42
01:50:01            3      1753      3.64      5.30      9.36
02:00:01            2      1752      3.84      5.02      8.71
02:10:01            4      1732      3.14      4.55      8.23
02:20:01            2      1733      1.71      3.56      7.51
02:30:01            2      1747      2.49      3.25      6.87
02:40:01            0      1733      2.06      3.18      6.56
02:50:01            0      1739      0.92      2.46      6.07
03:00:01            3      1743      0.80      2.19      5.67
03:10:01            2      1731      1.64      2.45      5.53
03:20:01            0      1726      0.86      1.98      5.26
03:30:01            3      1742      0.70      1.84      5.08
03:40:01            0      1740      0.44      1.74      4.95
03:50:01            0      1727      0.54      1.80      4.90
04:00:01            3      1738      0.69      1.75      4.85
and sar -u
Code:
Linux 2.6.32-431.el6.x86_64 (serv1) 	02/01/16 	_x86_64_	(16 CPU)

01:00:01        CPU     %user     %nice   %system   %iowait    %steal     %idle
01:10:01        all      6.85      0.00      2.06     18.76      0.00     72.32
01:20:01        all     11.31      0.00      2.65     20.94      0.00     65.10
01:30:01        all     15.40      0.00      3.56     20.18      0.00     60.86
01:40:01        all     15.47      0.00      3.14     15.18      0.00     66.21
01:50:01        all     12.17      0.00      1.97      9.75      0.00     76.12
02:00:01        all     12.83      0.00      1.83      9.11      0.00     76.23
02:10:01        all     11.90      0.00      1.74      8.00      0.00     78.36
02:20:01        all      8.40      0.00      1.30      6.04      0.00     84.27
02:30:01        all      6.06      0.00      1.05      3.93      0.00     88.96
02:40:01        all      5.92      0.00      1.03      3.92      0.00     89.14
02:50:01        all      3.73      0.00      0.88      2.45      0.00     92.93
03:00:01        all      1.87      0.00      0.58      0.87      0.00     96.68
03:10:01        all      2.45      0.00      0.49      1.80      0.00     95.27
03:20:01        all      1.55      0.00      0.33      0.61      0.00     97.50
03:30:01        all      1.01      0.00      0.25      0.48      0.00     98.26
03:40:01        all      1.11      0.00      0.29      0.35      0.00     98.25
03:50:01        all      0.88      0.00      0.28      0.42      0.00     98.43
04:00:01        all      0.84      0.00      0.23      0.28      0.00     98.65
excerpt from cron.d
Code:
*/10 * * * * root /usr/lib64/sa/sa1 1 1
On another my server sar -q is even more illustrative:
Code:
Linux 2.6.32-431.el6.x86_64 (serv2) 	01/13/16 	_x86_64_	(8 CPU)

00:00:01      runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
00:10:01            0       963      0.31      1.54      4.61
00:20:01            0       963      0.30      1.47      4.56
00:30:01            3       972      0.34      1.50      4.55
00:40:01            0       963      0.37      1.51      4.54
00:50:01            0       963      0.34      1.50      4.53
01:00:01            2       972      0.31      1.49      4.53
01:10:01            0       963      0.51      1.63      4.62
01:20:01            0       963      0.44      1.63      4.65
01:30:01            2       972      0.61      1.67      4.68
 
Old 02-15-2016, 07:20 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Load Average is some diffuse subject. Might want to read up on it. But lets see if i can untagle this a bit.

Average per definition means to take a specific count of numbers, add them all up and divide by the specific count. As you have more numbers in a 15minute range than you have in a 1 minute range the numbers will definitely differ. Also as you can have one minute of real high load as well as 1 minute of nearly nothing. But the 15minute range will have both states. And normaly high values also raise the average.

Hope it makes sense. Here are 2 links i found:
http://blog.scoutapp.com/articles/20...-load-averages
http://www.howtogeek.com/194642/unde...-like-systems/
 
Old 02-15-2016, 08:14 AM   #3
S_Kho
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
Well, unfortunately it is very hard to find explanatory information except man's. I understand the calculation of average in common. But in this particular case my math skill just betrays me.
Let's look at 3:00-4:00 span. According to sar -u my CPUs are nearly idle (96-98%). But ldavg-15 of sar -q says me N0! One third of your CPUs are doing something! (5/16 cores = ~31% load)
OK, let's look at 1:20-1:40. There is load - sar -u shows me 60-65% idle CPUs. But ldavg-15 is 10-11, what is equal to 60% BUSY.
Of course I see a theoretical possibility when load (and the load must be high) occurs in 5-minute period at 1:00-1:05 and occurs every 10 minutes. But does anybody believe in such possibility?
So I start to doubt if sar -q works correctly.
Can anybody propose another reasonable explanation?
I hope you can rub me in my mistake.

Last edited by S_Kho; 02-15-2016 at 08:18 AM.
 
Old 02-15-2016, 09:46 AM   #4
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
If I recall correctly loadavg is a kernel number and such is computed quite frequent. Thus frequent that I would put it in the "real time" basket. sar only captures moments. Or at least only gets numbers that are averaged by themself. Like some programs return counters based on the diff to the last time they where requested. This Delta thing. This might also lead to some quirks in the numbers. Kinda like the average of an average to over exegerate it.
I also read that the loadavg number is only to be taken as a hint and if the server can handle the load it can be ignored. Cant find the link to the page right know. No real need to worry if loadavg seems high. To get a feel for sar. Maybe compare numbers from lower and higher time steps. Right now you use the default 10minute to gather data. You could run a 5 minute step for gathering and a 10 minute. Then compare the numbers. Might get different results?
 
1 members found this post helpful.
Old 02-15-2016, 09:49 AM   #5
S_Kho
LQ Newbie
 
Registered: Feb 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
OK. I see the point
Thanks a lot
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sar output LinuGeek Linux - General 1 05-22-2014 09:04 AM
sar output fernfrancis Linux - Newbie 3 03-21-2011 10:57 AM
sar output for a particular day ZAMO Linux - General 2 03-08-2010 02:39 PM
output of SAR yusufs Linux - Newbie 7 11-03-2007 04:10 AM
long runq-sz, low ldavg markus.miller Linux - Enterprise 0 12-13-2005 09:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration