LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cycles (https://www.linuxquestions.org/questions/linux-newbie-8/cycles-709620/)

Mr-Bisquit 03-06-2009 08:33 AM

Cycles
 
How do you measure the amount done per cycle on a processor?

mesiol 03-07-2009 01:15 AM

Hi,

the amount of what? No. of calculations?

salasi 03-07-2009 07:25 AM

Measure the amount done and measure (or calculate) the number of cycles and divide one by the other. Measuring the amount done, of course, is not uncontroversial.

mesiol 03-07-2009 11:30 PM

Hi,

Quote:

Originally Posted by salasi (Post 3467754)
Measure the amount done and measure (or calculate) the number of cycles and divide one by the other. Measuring the amount done, of course, is not uncontroversial.

Most of your requested information is temporary or simply not available. A CPU does not store how many work it has done.

Mr-Bisquit 03-08-2009 01:07 AM

How can one measure the efficiency of a processor?

Tinkster 03-08-2009 05:12 AM

Excellent philosophical question ... what are your criteria?

brianL 03-08-2009 05:51 AM

This site might give you some answers:

http://www.phoronix.com/scan.php?page=home

salasi 03-08-2009 04:22 PM

Quote:

Originally Posted by mesiol (Post 3468350)
Hi,
Most of your requested information is temporary or simply not available. A CPU does not store how many work it has done.

No, its a useless answer, but not for that reason. The CPU does not store how much work it has done, but you measure the time that it takes to do some predetermined amount of work. So, for example, you can carry out some mathematical calculation noting the time at the start and at the end. The difference between the two is the time taken.

You can measure the number of cycles per second with a logic analyser or a 'scope (although most people effectively measure from the crystal clock and multipliers, but that does have a slight innaccuracy due to the spreads in crystal frequencies, although that's not usually a worthwhile thing to get worried about).

The big trouble comes with the predetermined item of work that you use; if you decide on one particular work item, you'll find that it doesn't scale anywhere like the same way across architectures when you change work loads. So it only really works if you do the benchmarking on the actual workload that you will use.

This is inconvenient, particularly if you won't have the real workload until after you have bought the computer. It is also inconvenient if the workload is very mixed and/or you can't decide what represents an actual workload.

It is also inconvenient if someone else does the testing; if you only have an approximate idea of your workload, they would probably have even less idea of what your workload would turn out to be.


All times are GMT -5. The time now is 11:08 PM.