Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Testing CPU's performance

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Mr. Alex
Posts: 149
Joined: 2010-04-04 20:30

Testing CPU's performance

#1 Post by Mr. Alex »

Is there any program for GNU to calculate CPU's performace in marks (should support multi-core CPUs)?
So it will be possible to compare performance of different CPUs.

User avatar
blarney
Posts: 67
Joined: 2008-11-17 23:13
Location: England

Re: Testing CPU's performance

#2 Post by blarney »

You could have a look at 'hardinfo'. That does various benchmarks...

Personally, I use http://www.cpubenchmark.net/index.php for comparing CPU speeds...

Cheers,
Blarney
Debian Wheezy KDE on everything.

Mr. Alex
Posts: 149
Joined: 2010-04-04 20:30

Re: Testing CPU's performance

#3 Post by Mr. Alex »

Blarney, thanks for URL! And by the way, do you know any URL with info about how much electricity (W) do differents CPUs consume? Not TDP, because it's not consuming and not connected with consuming.

User avatar
Damotclese
Posts: 406
Joined: 2007-07-12 18:22
Location: http://www.crystallake.name/

Re: Testing CPU's performance

#4 Post by Damotclese »

Mr. Alex wrote:Blarney, thanks for URL! And by the way, do you know any URL with info about how much electricity (W) do differents CPUs consume? Not TDP, because it's not consuming and not connected with consuming.
Power consumption changes drastically from period to period so you might need to review the data sheet specifications to see what expected power draws are depending upon what internal perifs are enabled, disabled, in wake states, all that happy stuff. Our hardware people give us software types what expected CPU power consumption ranges are, minimum and maximum, and some times they are very wide.
Looks like I picked the wrong week to stop sniffing glue. And snorting coke.

thewanderer
Posts: 416
Joined: 2007-03-19 18:11
Location: my desk, Warsaw, Poland

Re: Testing CPU's performance

#5 Post by thewanderer »

Actually, by saying TDP is not related to power consumption, you are partially wrong.
All power a CPU 'consumes' is really power delivered to the air (indirectly), heating it.
P = W / t = R * I*I
Therefore, regardless of which form of the above you choose, you lose energy according to a thermal process.
a) W / t => your CPU is performing work. Assuming that Power is positive (TDP is usually positive, you know, unless your CPU functions as a fridge - would be pretty nice, though) and time is not flowing backwards, Work is always positive and therefore you are losing energy - hence the power usage of the machine.
b) R * I * I => resistance. It is actually related to the first formula, but in general, objects with electrical resistance tend to dissipate power to the environment in form of heat. And since heating takes energy...

The computer's (or any similar machine) power usage is very closely related to the TDP. Dissipation is the only reason besides mechanical manipulation causing the loss of energy (so-called consumption), provided that we skip the negligible impact of flash/magnetic disk heads etc.
Therefore, the perfect PC is one with next to no power dissipation, meaning no heating ever happens and no cooling is needed. It could probably function as a perpetum mobile of a kind.

A bit on TDP: The TDP is the top dissipated power (actually Thermal Design Power) for a given CPU. Thus, the power usage should never exceed TDP, except for overclocking cases.

Now, a bit on the measurement, if you really want to do that.
In cases of mobile computers, the ACPI is capable of measuring the power draw of the whole computer by approximating the (charge delta / time) value from the battery. However, there is no such possibility in desktops. Well, you have to cope with that.
One way is differential measurement. You're going to need a power meter attached between your PC and the power outlet. Compare the power your computer is using when working normally with the power usage when all non-essential subsystems are off. You might then be able to get an estimate of how much the disks, optical drives, graphics card (disable it when possible!), expansion cards and so on are eating up. Then, what remains is the CPU + chipset + RAM + cooling + diodes. You should be able to find power usage data for your motherboard in the specification sheet attached to the box or online at the manufacturer's website.
Subtracting that from the current power usage should then provide the expected result.
In case of modern CPU's, due to scaling and other issues, the thermal dissipation varies with time. Thus, if you don't have any power consumption data for your motherboard, you may mount a CPU in it of which the constant power usage (or min/max values) you already know - using previously obtained results for deriving new ones can surely help - subtract the CPU's power usage from the total value and here is your mobo's power draw.

Another way is reading into the manufacturers' documentation (that is, not advertisments). Operating powers should be provided for different frequencies, if applicable, but more often only the top power is displayed.

Now, in answer to the original question: If you want to measure a CPU's performance against the others or absolutely, you basically need a test setup. Decide on what kind of processing the CPU is going to do, what software is to run on it, what optimizations are in effect (do notice that programs are compiled for different CPU's - thus you might need to disable all CPU-specific optimizations at compile-time, leaving only the generic ones like SSE and MMX common to all modern CPU's), and how the data is feeded into the CPU. Make a list of all the assumptions and double-check if they make for a truly objective test environment. For instance, when testing CPU performance with bzip2 (multi-thread version available, too), a slower CPU might appear to be faster due to the storage latencies. Memory is also a storage, remember. Thus, if the storage is a huge bottleneck, the CPU is unlikely to perform any better than its 10-year-old counterpart (unless using RAID or other CPU-controlled storage).
Plan the benchmark well. If possible, use similar hardware base for different processors. You can refer to some web portals' benchmark techniques for ideas on what operations you can perform in order to measure performance. I'm almost sure a few of them are providing benchmark tools for download.

The most basic is `time`. It simply takes the timing of a process duration. The faster, the better, they say. Have fun with that!

Code: Select all

help time
[url=irc://irc.freenode.net/debian]Find me on #debian at irc.freenode.net[/url] | Linux permission HOWTO | Shorewall firewall | Virtual web hosting

Post Reply