Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] timing for geeks II.



Hello :)

Just for those who are curious but lazy enough to do the tests
themselves.... finaly I come up with results of my own testing. 

I will be brief. 
The gettimeofday() can get as bad as 0.03s time diference between
succesive readings (TDBSR). 
clock_gettime(CLOCK_MONOTONIC..) can get as bad as 0.077034s TDBSR.
clock_gettime(CLOCK_REALTIME..) can get as bad as 0.0416s TDBSR.

I wonder if this can get even worse in a "longrun" test. Say one or two
days instead of 10s. What would be the worst result in case of single
reading precision in such a longrun test? 

With all test, most of the time one gets 1e-06s TDBSR. Second most of the
time one gets 0s TDBSR. 
This is far much more than every other result. For example, in 19361914 
readings, I got 8959642 times zero, 10332815 times 1e-06. Next
number is 36231 times 1.2e-05.

With all three types of clock, one gets allways monotonic results (at
least something :))

During ~10s test, I got roughly 300-400 diferent time values of TDBSR (ie.
frequencies).

So that's it folks, technical or other info regarding "experimental
setup" will be kindly served upon request. ;)

I assume all of the above tests are based on RTC [1]. Thus the results may
vary from PC to PC. :/

There is a related question - can one buy a better clock for a linux
mashine? I imagine a gigaherz source in a PCI slot .... :)  

[1] which is a _bad_ clock as far as I understand. 

Best regards
Michal


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links