LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-22-2010, 12:10 PM   #1
talla
LQ Newbie
 
Registered: Jan 2010
Location: Berlin
Posts: 16

Rep: Reputation: 1
CPU Usage Windows vs. Linux


Hey guys,

I'm new here. I'm a computer science student from berlin and a fresh linux user

I have a question concerning CPU usage in Linux/Windows. First of all: This is NOT meant as a discussion "windows is better oder linux is better"!

In my perception many applications seem (according to the task manager / top under linux) to use more CPU on a linux machine than on a windows machine.

Lets make an example:

When I play an mp3 file using winamp on windows, the task manager shows around 1% cpu usage (for winamp).
When I play an mp3 file using for example audacious (XMMS) (or any other player) on linux, top shows me a cpu usage around 10%.

Now my question is: Is this due to different scheduling techniques? Or is it due to the measurement of cpu usage? (maybe the windows task manager doesn't show the "real" usage?)

Or is it really the case, that playing an mp3 file on linux uses (much!) more CPU than playing it on a windows machine?

I have been thinking about this a lot and would be really happy to have a convenient answer to this issue

Cheers,

talla

Last edited by talla; 01-22-2010 at 12:14 PM.
 
Old 01-22-2010, 12:58 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by talla View Post
is it due to the measurement of cpu usage? (maybe the windows task manager doesn't show the "real" usage?)
There are many situations in which windows task manager seriously under reports CPU usage. I don't know if that is a major factor in your example.

Quote:
Or is it really the case, that playing an mp3 file on linux uses (much!) more CPU than playing it on a windows machine?
Maybe. I don't know.
 
Old 01-22-2010, 08:48 PM   #3
talla
LQ Newbie
 
Registered: Jan 2010
Location: Berlin
Posts: 16

Original Poster
Rep: Reputation: 1
but would be interesting to know right?
 
Old 01-22-2010, 10:32 PM   #4
normang
LQ Newbie
 
Registered: Dec 2007
Posts: 4

Rep: Reputation: 0
Features or speed?

Talla -
You can't really compare top and Windoes Task Manager for a whole raft of reasons, the simplest being the TM doesn't show everything, and the more complex being that what it shows may not be real.
But Audacious and XMMS are two different applications forked from a common project. Audacious is famous as a ram hog. XMMS is no longer being maintained, so it's not really safe. There are lots of alternatives (thank you FOSS), including some that are *very* lightweight like MPD, if CPU is your greatest concern. But "if you're looking for features, you're not looking for the fastest software" (actual quote from a Microsoft rep).
A much better CPU comparison would be to match Windoes against Linux by load-testing MySQL, for instance. That'll make you feel better!
 
Old 08-26-2012, 08:46 PM   #5
Zuu
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
I'm made some graphics apps with processing. There was ~30 CPU on WIN and ~ 70 on Linux. Though memory usage is slightly better on linux.
 
Old 08-26-2012, 08:55 PM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by Zuu View Post
I'm made some graphics apps with processing. There was ~30 CPU on WIN and ~ 70 on Linux. Though memory usage is slightly better on linux.
1) This thread is 2 and a half years old

2) Windows TM reports CPU usage as a percentage of the total capacity of the system. Linux reports CPU usage as a percentage of one CPU core's worth of time. So a single-threaded application that uses one complete CPU core is going to show 100% CPU usage in top on Linux, and only one core's worth of usage in Windows TM (if it's a dual core machine then 50%, if it's a quad core machine then 25%).

I have a 12-core system at work with HyperThreading, which means 24 virtual cores. If I use one complete core for a process, it will show 100% in top in Linux, and 4% in Windows TM. Meanwhile, if I use a 24-proc multithreaded application, it will show 2400% in top in Linux, and 100% in Windows TM.

Last edited by suicidaleggroll; 08-26-2012 at 08:57 PM.
 
Old 08-28-2012, 08:56 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Exactly so: you're comparing apples to oranges. Statistics are like laws and sausages ... you have to know how they're made. (But you really don't want to know.)

I think that WTM's designers were trying to produce a more easily "comparable" statistic. In other words, to dampen the influence of "hardware differences" in the reported numbers, so that two different computers could be meaningfully compared side-by-side as long as the hardware differences weren't too extreme. The Linux/Unix versions are more rooted in how Unix originally did it, and as such they really aren't so comparable among systems. But there are hardware-monitoring tools (command line and otherwise) which more or less follow WTM's approach.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
processes/CPU Usage/Mem Usage desktop wallpaper ceantuco Linux - Newbie 2 04-13-2009 01:14 PM
Can we monitor CPU & Memory usage of Windows boxes through RRDtool on Linux (RHEL 3)? sandeepgupte Linux - Software 1 09-19-2007 10:35 AM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
CPU usage in windows LinuxTiro Programming 2 02-27-2004 07:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:37 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