|
||||||
Title: Find processor speed Post by hoogle on Dec 4th, 2008, 11:37pm Given a linux machine(to which you are remotely connected), how do you find the speed of the processor? Also, given processor speed (say 2Ghz) how many processor cycles does comparison operation take? |
||||||
Title: Re: Find processor speed Post by hoogle on Dec 4th, 2008, 11:39pm The reason I asked this question is the following: I am working on distributed systems, I know the latency and bandwidth parameters of the system. I want to know computational power of the nodes so that I can analyze(derive) for what input size communication dominates computation and vice versa. |
||||||
Title: Re: Find processor speed Post by towr on Dec 5th, 2008, 12:44am on 12/04/08 at 23:37:15, hoogle wrote:
Quote:
on 12/04/08 at 23:39:41, hoogle wrote:
|
||||||
Title: Re: Find processor speed Post by SMQ on Dec 5th, 2008, 7:07am on 12/04/08 at 23:37:15, hoogle wrote:
Um, email the administrator? "dmesg | grep BogoMips (http://en.wikipedia.com/wiki/BogoMips)"? Quote:
On most modern Intel cores, approximately 1/2 cycle if both operands are in registers, 1 cycle if one operand is in L1 cache and the other is in a register or both are in L1 cache, 2 cycles or more if one or both operands are in L2 cache or worse. And as towr notes, there are approximations at best, depending strongly on what else the processor is doing at the time, especially in a multi-core processor. --SMQ |
||||||
Title: Re: Find processor speed Post by hoogle on Dec 5th, 2008, 8:40am Quote:
Actually I will be running my program on a cluster which will give me some dedicated processors(depends on how many I specify). However, I know that in spite of processors being dedicated they will be running something else other than my program. Can you tell me an example of an benchmark tests to find out the time it takes to compare two integers on a processor? |
||||||
Title: Re: Find processor speed Post by Eigenray on Dec 5th, 2008, 9:25am on 12/04/08 at 23:37:15, hoogle wrote:
`cat /proc/cpuinfo` should give something useful. |
||||||
Title: Re: Find processor speed Post by towr on Dec 5th, 2008, 11:46am on 12/05/08 at 08:40:57, hoogle wrote:
Then start a timer, loop through the code a million times (using registers for the loop-variable, to minimize it's impact), end the timer, and calculate the performance. |
||||||
Title: Re: Find processor speed Post by Grimbal on Dec 6th, 2008, 12:02pm You could execute 2 similar loops, the only difference being that one of the loops has an extra comparison of 2 integers. Then measure the time difference. That must be written in assembler to make sure there is no side effect of the code optimization (a simpler loop could be better optimized). |
||||||
Title: Re: Find processor speed Post by towr on Dec 6th, 2008, 1:21pm Or use the optimization parameters of your compiler, and just to be safe, also compile to assembly to check. |
||||||
Title: Re: Find processor speed Post by hoogle on Dec 7th, 2008, 11:13am Quote:
Can we measure time of the order 10**-9 seconds on the computer? |
||||||
Title: Re: Find processor speed Post by hoogle on Dec 7th, 2008, 11:30am When we do analysis of sorting algorithms like merge sort and quicksort.... and we say the running time is O(nlogn)? What does nlogn represent, number of comparison operators?? If yes, total time taken by the computer should be of the order nlogn*(time it takes to perform one such operation)? |
||||||
Title: Re: Find processor speed Post by towr on Dec 7th, 2008, 11:42am on 12/07/08 at 11:13:57, hoogle wrote:
|
||||||
Title: Re: Find processor speed Post by towr on Dec 7th, 2008, 11:49am on 12/07/08 at 11:30:38, hoogle wrote:
Quote:
Swapping probably takes more time per element than comparing. |
||||||
Powered by YaBB 1 Gold - SP 1.4! Forum software copyright © 2000-2004 Yet another Bulletin Board |