linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* incorrect CPU usage readings in 2.2.19prex?
@ 2001-03-08 21:56 safemode
  2001-03-08 22:21 ` Jonathan Morton
  2001-03-09 13:36 ` Pavel Machek
  0 siblings, 2 replies; 3+ messages in thread
From: safemode @ 2001-03-08 21:56 UTC (permalink / raw)
  To: linux-kernel

Is there something generally wrong with how linux determines total cpu
usage (via procmeter3 and top) when dealing with applications that are
threaded?   I routinely get 0% cpu usage when playing mpegs and mp3s and
some avi's even (Divx when using no software enhancement) ... Somehow i
doubt that the decoders are so streamlined that they produce <1% cpu
usage on the computer.  Does anyone know what's going on with this?
ps shows nearly 0% cpu usage in the threads as well.
    i've seen it in these programs
        freeamp
        mplayer

I've seen it in earlier 2.2.19 kernels but i'm using pre14 right now.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: incorrect CPU usage readings in 2.2.19prex?
  2001-03-08 21:56 incorrect CPU usage readings in 2.2.19prex? safemode
@ 2001-03-08 22:21 ` Jonathan Morton
  2001-03-09 13:36 ` Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Morton @ 2001-03-08 22:21 UTC (permalink / raw)
  To: safemode, linux-kernel

\>Is there something generally wrong with how linux determines total cpu
>usage (via procmeter3 and top) when dealing with applications that are
>threaded?   I routinely get 0% cpu usage when playing mpegs and mp3s and
>some avi's even (Divx when using no software enhancement) ... Somehow i
>doubt that the decoders are so streamlined that they produce <1% cpu
>usage on the computer.  Does anyone know what's going on with this?
>ps shows nearly 0% cpu usage in the threads as well.

If you're using a fairly new processor, this isn't at all new or surprising
- and yes, your MP3 decoders are really using under 1% CPU.  In general,
most processors with on-die or 'backside' L2 cache are capable of this.
The reason why older CPUs cannot manage this (eg. 486's and very early
Pentiums) is mostly due to memory bandwidth and thrashing the tiny L1
caches found on those processors - the lack of speed of the 486 itself is
also a factor, but not the only one.  Remember that a 486DX2/66 is
just-about capable of real-time MP3 decoding, and that CPU power has
increased around 50-fold from that point to the present day, not counting
improvements in memory and cache technology.

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi@cyberspace.org  (not for attachments)
big-mail: chromatix@penguinpowered.com
uni-mail: j.d.morton@lancaster.ac.uk

The key to knowledge is not to rely on people to teach you it.

Get VNC Server for Macintosh from http://www.chromatix.uklinux.net/vnc/

-----BEGIN GEEK CODE BLOCK-----
Version 3.12
GCS$/E/S dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS
PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r- y+
-----END GEEK CODE BLOCK-----



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: incorrect CPU usage readings in 2.2.19prex?
  2001-03-08 21:56 incorrect CPU usage readings in 2.2.19prex? safemode
  2001-03-08 22:21 ` Jonathan Morton
@ 2001-03-09 13:36 ` Pavel Machek
  1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2001-03-09 13:36 UTC (permalink / raw)
  To: safemode; +Cc: linux-kernel

Hi!

> Is there something generally wrong with how linux determines total cpu
> usage (via procmeter3 and top) when dealing with applications that are
> threaded?   I routinely get 0% cpu usage when playing mpegs and mp3s and
> some avi's even (Divx when using no software enhancement) ... Somehow i
> doubt that the decoders are so streamlined that they produce <1% cpu
> usage on the computer.  Does anyone know what's going on with this?
> ps shows nearly 0% cpu usage in the threads as well.

CPU usage of programs that sleep after short computation is incorrectly computed

See badboy examples for code that gets 70% of cpu and is reported as getting
0%.

>     i've seen it in these programs
>         freeamp
>         mplayer
> 
> I've seen it in earlier 2.2.19 kernels but i'm using pre14 right now.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-03-12  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-08 21:56 incorrect CPU usage readings in 2.2.19prex? safemode
2001-03-08 22:21 ` Jonathan Morton
2001-03-09 13:36 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).