LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-25-2005, 10:38 AM   #1
sandeep2005
LQ Newbie
 
Registered: Oct 2005
Location: nepal
Posts: 4

Rep: Reputation: 0
loadavg info


hi
well i want to know what factors are included in the dynamic calculation of loadavg in /proc file system. factors like cpu,memory,disk usage, i/o etc.

suppose i have a web server running on the linux sytem. does loadavg gives the statistics including the performance of the server?

also suppose i have current loadvg of 0.20 (considering only 1 minute usage)and after some time when i check it again it goes up to say 1.5
what can i infer from that .

also what is the optimum value that leads me to conclude that yeah the system is really overloaded.

If i have a linux system running only a web server and no other daemons , if the loadavg shows that the system is overloaded, can i conclude that the overloaded system is due to overloading of web server due to large number of requests?

any suggestions will be appreciated.

if someone can suggest me a man page for loadavg which is more descriptive , i would be very thankful
 
Old 10-26-2005, 01:47 AM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
From "man proc":

"The first three fields in this file are load average figures giving the number of jobs in the run queue (state R) or waiting for disk I/O (state D) averaged over 1, 5, and 15 minutes. They are the same as the load average numbers given by uptime(1) and other programs. The fourth field consists of two numbers separated by a slash (/). The first of these is the number of currently executing kernel scheduling entities (processes, threads); this will be less than or equal to the number of CPUs. The value after the slash is the number of kernel scheduling entities that currently exist on the system. The fifth field is the PID of the process that was most recently created on the system."

I have been chasing after how these figures are computed for a while myself. All man proc has to say about the issue is what I posted here. Even reading the kernel source which contains the source for get_loadavg() didn't help much. All I can gleam is that it uses clock ticks (jiffies) to compute it, and these vary by machine (some are 100HZ, and some 1000HZ...).

Have a look at /usr/src/kernel/timer.c lines 550 - 950, and see if you can make more sense of it than me
 
Old 11-16-2005, 05:23 AM   #3
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Rep: Reputation: 15
help someone

is there any why by which we can calculate it
look i am getting load avg as
0.06 0.60 0.43 3/94 8650
in this 3/94 is not possible because i have only one cpu

so 3 may be taken as thread
am i right
tell me please if someone has runnig program bout it

by
 
Old 11-16-2005, 09:09 AM   #4
fvgestel
LQ Newbie
 
Registered: Oct 2005
Location: Netherlands
Posts: 21

Rep: Reputation: 15
There are complete bibles written about capacity and performance management on UNIX, so I'm not going to deep into the subject.
To answer your question about which factors make up the system load : the average number of runnable processes during a fixed period of time; that is, processes actually fighting for CPU time, not running processes. And maybe processes waiting for IO are also counted with that, but don't know for sure.
If you want a more total picture of your system's performance, you'd better use sar or vmstat.
 
Old 11-16-2005, 09:18 AM   #5
fvgestel
LQ Newbie
 
Registered: Oct 2005
Location: Netherlands
Posts: 21

Rep: Reputation: 15
Re: help someone

Quote:
[i]
in this 3/94 is not possible because i have only one cpu
[/B]
Note that hyperthreading makes your machine look like a dual CPU machine...
And yes, the 3 could be a running thread, or some other process which is fighting for CPU time. If you want to know how a process gets into the runqueue, you should spend some time studying the scheduler to understand the concepts of time-share computing
 
Old 11-17-2005, 11:09 AM   #6
shukla_chanchal
Member
 
Registered: Oct 2005
Location: banglore(india)
Posts: 62

Rep: Reputation: 15
nice to get answer

thanks

i was also thinking in that line only

but i have gone through scheduling and all these
but i am really worried about how the real things are done
although i have got some answers form vmstat but not clear

can u suggest how i can access the time slice of the linux
what about kernal module programming how it is done.....if someone will give me something on this topic i will be highly gateful to him or her
 
Old 11-17-2005, 05:27 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try some of the links on this page:
http://www.advancedlinuxprogramming.com/resources.html
 
  


Reply



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
info boneman1231 Solaris / OpenSolaris 3 10-20-2005 11:17 AM
Convert an info file(bash.info.gz) to a single html file Darwish Linux - Software 2 09-24-2005 06:51 AM
loadavg? tpark Linux - General 1 08-10-2004 03:03 AM
just for the info jayakrishnan Linux - Newbie 0 12-09-2003 03:13 AM
Can anybody explain results of /proc/loadavg Grzegorz Linux - General 1 10-01-2003 07:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:35 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
Open Source Consulting | Domain Registration