You are not logged in.

#1 2007-03-03 19:52:26

dyzdyz
Banned
Registered: 2007-01-22
Posts: 20

CPU usage observations

When my system is idle (running only X, OpenBox, Conky, Visibility and autocutsel),  the CPU usage is 5-7%. When I run Audacious - just open it without playing music - the usage goes to about 20%. AFAIR under Windows XP on the same machine idle CPU usage was 0-2% and around 5-6% when playing music with Foobar2000.

My question is: does Linux use more CPU than Windows when performing similar tasks, or the difference is caused by different methods of measuring CPU usage?

Here's a list of daemons, that run on my system's start:

syslog-ng network netfs crond autofs acpid sensors

Here's a list of programs in my .xinitrc:

autocutsel -selection PRIMARY -fork &
autocutsel -selection CLIPBOARD -fork &
conky &
visibility &
openbox

My CPU is Athlon 2000 XP.

I also noticed other thing, that I don't understand. When I check system load under htop, the sum of CPU usages of particular programs (2.1%) doesn't add up to overall CPU usage (7.3%). Here's an example screenshot of htop:
htopcpuusagesumshq0.th.png

How to explain above observations?

Some time passes...

OK, I already figured out answer for above questions. top displays the following information:

Cpu(s):  3.3%us,  3.0%sy,  0.0%ni, 70.2%id,  0.0%wa,  0.0%hi, 23.5%si,  0.0%st

So I assume, that Task Manager under Windows XP displays only "us" and under Linux htop by default shows total CPU usage in the meter in top left corner and "us" for particular processes.

But now I have other questions:

1. What do those abbreviations like "us", "sy" etc. stand for? I'm guessing, that us = user, sy = system, ni = nice and id = idle, but the others?

2. What those different usages really mean?

3. Which CPU usage is most relevant from perspective of desktop system user?

Last edited by dyzdyz (2007-03-03 20:37:23)

Offline

#2 2007-03-03 21:06:08

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: CPU usage observations

As far as I understand it, us indeed stands for user (i.e. time taken by processes in userpace), sy for system (kernelspace), nice represents niced processes, wait denotes CPU time spent waiting for I/O operations, si and hi stand for soft and hard interrupts. idle is (100% - all the others), I don't know what st is.

Such high %si might denote some problem, unless you were doing something peculiar that time.

Offline

#3 2007-03-03 21:35:35

dyzdyz
Banned
Registered: 2007-01-22
Posts: 20

Re: CPU usage observations

lucke wrote:

Such high %si might denote some problem, unless you were doing something peculiar that time.

When I run Firefox with one open tab (this thread) and download one file with wget at 50 kb/s, %si is 5-6%. When I additionally play music with Audacious, %si goes to 20-25%. When I play music with mplayer instead, %si goes to ~8%. Above figures were measured by top.

Update #1:
htop shows 0% si while top shows 25% si. Now I'm really confused.

Update #2:
I installed xosview, which shows active interrupts. Here's a screenshot:
20070303230759203x216scmg8.th.png

LEDs #1, #17 & #21 are on all the time, #2 & #13 blink rarely. #19 blinks 2-3 times a second, when music is being played with Audacious and is on constantly, when music is being played with mplayer.

Last edited by dyzdyz (2007-03-03 22:23:04)

Offline

Board footer

Powered by FluxBB