LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-22-2006, 10:41 PM   #1
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
top - uptime - %CPU


I am using debian 3.1. Since the last upgrade, the fan of my laptop is almoust always running. I'm trying to figure out whether it is due to some demons taking cpu power, or because some ACPI/config issues.

Unfortunately 'top' command seems to be pretty uninformative w.r.t what processes are causing high load average. A typical picure looks like:

Code:
top - 06:39:22 up 1 day, 7 min,  8 users,  load average: 1.45, 0.98, 0.50
Tasks: 109 total,   1 running, 108 sleeping,   0 stopped,   0 zombie
Cpu(s):  4.8% us,  1.6% sy,  0.0% ni, 91.9% id,  1.5% wa,  0.1% hi,  0.0% si
Mem:    507920k total,   500464k used,     7456k free,    14380k buffers
Swap:   995988k total,   133508k used,   862480k free,   102700k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                         
 2440 root      17   0  1528  412 1376 S  4.0  0.1  14:11.50 cpufreqd                                         
    1 root      16   0  1504  284 1352 S  0.0  0.1   0:01.30 init                                             
    2 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0                                      
    3 root       5 -10     0    0    0 S  0.0  0.0   0:06.37 events/0
Can anyone explain my how are load average and %CPU fields related? My bet was that in order to have load avg = 1 you should have CPU usage close to 100%

Thanks in advance,
Ott
 
Old 03-22-2006, 10:51 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I can't tell you what a specific load average maps to in terms of CPU usage, because it's not a one-to-one ratio.

Load average is a guide to how hard your computer is working and is calculated as a function of processes waiting for the CPU. There's a more technical discussion of this at http://www.teamquest.com/resources/g...ay/5/index.htm. I've seen load averages around 12 on my boxes and there's another thread here where someone had theirs at 17.

None of which helps you with your problem - do you have your top output sorted by CPU usage?
 
Old 03-23-2006, 12:45 AM   #3
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Original Poster
Rep: Reputation: 45
Thanks for the link. Yes, the process list is in %cpu order. So: Does high load and no cpu usage mean that there are many processes waiting but none running? How is it possible? What is the short-term sleep state (TASK_UNINTERRUPTIBLE) mentioned in the artcle?

It is a custom 2.6.7 kernel.

Best,
Ott
 
Old 03-23-2006, 02:27 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,188

Rep: Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130
Load averages include tasks waiting on I/O.
TASK_UNINTERUPTABLE are sleeping but will not respond to a signal. Better be a short term situation.
 
Old 03-23-2006, 03:04 AM   #5
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Original Poster
Rep: Reputation: 45
waiting for I/O -- OK. it explains why the load average was such a high (there was much disk activity when I took the sample).

Usually, load avg is around 0.3 without any disk activity. What is included in the I/O? Does it include waiting for internet packages (I have often bittorrent running)? May e.g. openoffice be waiting for keyboard input? Can someone give me any referenes?

Thanks,
Ott
 
Old 03-24-2006, 12:33 PM   #6
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Original Poster
Rep: Reputation: 45
Well, I am going to answer myself.

ooffice is not the problem (does affect neither the load avg nor fan).

There is a simple description of process states at http://cuneo.linux.it/materiale/inde...t=fhrp/fhrp_en

Still trying to find what my high load avg is caused of.
Ott
 
Old 03-24-2006, 04:55 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,188

Rep: Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130Reputation: 4130
Not my idea of a high load average - and that certainly *won't* be driving fans crazy.
High CPU might, but not a reasonably low load average.

If you want to chase it, why not use top, and (reverse) sort the process status field (S). You're looking for a "D" for tasks in uninterruptable (disk) wait.
Educational exercise no doubt, but I doubt it'll get you anywhere.
 
  


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
high cpu utilization 'top' analysis saarb16 Linux - General 2 03-09-2006 09:58 AM
Top CPU usage explanation penguinco Fedora 3 11-30-2004 01:01 PM
need top clone- to measure CPU usage pao Linux - Software 4 10-07-2004 09:46 AM
Individual CPU usage not showing in ps/top hulli Linux - General 2 08-24-2004 02:44 AM
see one cpu instead 2 with hyperthreading in top? balki Linux - Hardware 5 06-22-2004 03:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:21 AM.

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