Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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!
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.