Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
07-31-2012, 03:29 PM
|
#1
|
LQ Newbie
Registered: Jul 2012
Posts: 3
Rep:
|
Questions on measuring CPU on Windows and Linux (for comparison)
Hello
I am a happy linux user since over one year now. I am getting happier and happier with every release of my favorite linux distribution and so I am thinking of completely switching to linux, as everything despite my fingerprint scanner works perfect on my install. Although there is one thing left that worries me: If I run top in the shell and compare the cpu percentage of an individual process to the same process running on windows, there seems to be a big difference (In windows I look at the processes Tab in Taskmanager). But if I compare the percentage value (general, meaning not of a special process) shown in top under the line CPU(s) with the value shown by Windows under Performance they are approximately the same. So my question now would be:
How does Windows Task Manager measures CPU usage and how does top? What does the CPU(s) line say? Is it relative to the maximal clock speed of all processor cores?
The only theory I have that would explain this ist, that Windows measures under the process tab always relative to the maximum performance of the processor while the cpu percentage shown by top is always relative to the current clock speed of the core the process is running at the moment. Is this theory true? If not, how can I compare CPU usage between these two platforms?
I hope someone could explain these things to me and I hope you understand what I mean, because my English is not the best, I am sorry for that.
Thanks in advance!
Last edited by Gödel; 07-31-2012 at 03:32 PM.
|
|
|
07-31-2012, 03:38 PM
|
#2
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
CPU usage in top, when looking at an individual process, is relative to one CPU's worth of power. So 100% means it's using one CPU core to the fullest. Therefore a quad core CPU can be running happily at 400% CPU usage according to top, when looking at the individual process. Multi-threaded processes will often do this, in fact, and report a "CPU Usage" of 3-400% or higher, depending on how many cores they're consuming.
Windows Task Manager shows values relative to the total power of all CPU cores.
In other words, if you had a dual core CPU, and one process consuming one complete core, top would show 100% CPU usage for that process, while Windows TM would show 50%.
I have a 12-core machine here with hyper threading (24 virtual cores). When it's really loaded up, you'll often see 10-12 processes in top each consuming 100% CPU. Doing the same in Windows would only show about 4% CPU for each process.
Last edited by suicidaleggroll; 07-31-2012 at 03:41 PM.
|
|
2 members found this post helpful.
|
08-01-2012, 02:51 AM
|
#3
|
LQ Newbie
Registered: Jul 2012
Posts: 3
Original Poster
Rep:
|
Thank you for your reply!
Is there a way to measure cpu in linux similar to the windows way of measuring? So that I can compare results better?
What about the clock speed of one core? Is the percent value relative to the maximal clock speed of the core or to the current?
more /proc/cpuinfo | grep MHz often shows me all cores (4 with hyper theading 8) running on 800Mhz, while the maximum is 2,3 Ghz for each.
I would be very thankful if you could show me an exact way of comparing cpu consumption between Windows and Linux (for both, all processes together and individual processes)
I have often seen reviews where the author compared the percentage shown in top for a processes with the percentage shown in task manager! No wonder that Linux always looses in these comparisons!
Thank you in advance!
Last edited by Gödel; 08-01-2012 at 02:54 AM.
|
|
|
08-01-2012, 04:11 AM
|
#4
|
Member
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332
Rep:
|
I think the percentage you see on top is relative to max core clock and not the current.
Also, on task manager there is an option to display one graph per cpu. That will give you a more accurate image of cpu consumption.
|
|
|
08-01-2012, 04:18 AM
|
#5
|
LQ Newbie
Registered: Jul 2012
Posts: 3
Original Poster
Rep:
|
Thank you for reply!
Thats no option to determine the cpu consumption exactly.
|
|
|
All times are GMT -5. The time now is 09:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|