Discussion:
[chrony-users] How does chrony "speed up" the system clock
xxhdx1985126
2017-09-02 05:15:00 UTC
Permalink
Hi, everyone


I'm a newbie to chrony. I saw these words in "chronyc manual page": "any error in the system clock is corrected by slightly speeding up or slowing down the system clock until the error has been removed, and then returning to the system clock¡¯s normal speed". I wonder what does the "speed up the system clock" mean? Would it influence the execution of glibc APIs like "sleep"? I mean if chrony decides to speed up the system clock, would sebsequent "sleep" function calls take less time to return? And is there a max error bound in time for chrony?


Thanks very much:-)
Bill Unruh
2017-09-02 06:18:52 UTC
Permalink
Yes it would. If the clock were slowed by 500PPM (which is a large slew rate)
a 1 second sleep would take all of .5 milli seconds longer. Now chrony can
slow the clock more than that but only under severe circumstances and never by
more than 10%.


You can tell chrony to jump the clock if its error is too large. (that is an
infinite slew rate), but that will not happen. In normal operation the slew
rate may change by a few parts per million-- ie, it is not something to worry
about.



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by xxhdx1985126
Hi, everyone
I'm a newbie to chrony. I saw these words in "chronyc manual page": "any error in the system clock
is corrected by slightly speeding up or slowing down the system clock until the error has been
removed, and then returning to the system clock¢s normal speed". I wonder what does the "speed up
the system clock" mean? Would it influence the execution of glibc APIs like "sleep"? I mean if
chrony decides to speed up the system clock, would sebsequent "sleep" function calls take less time
to return? And is there a max error bound in time for chrony?
Thanks very much:-)
 
 
xxhdx1985126
2017-09-03 09:10:03 UTC
Permalink
Thanks:-)


By the way, I guess the subsequent "nanosleep" will also be influenced just like "sleep", right?
Post by Bill Unruh
Yes it would. If the clock were slowed by 500PPM (which is a large slew rate)
a 1 second sleep would take all of .5 milli seconds longer. Now chrony can
slow the clock more than that but only under severe circumstances and never by
more than 10%.
You can tell chrony to jump the clock if its error is too large. (that is an
infinite slew rate), but that will not happen. In normal operation the slew
rate may change by a few parts per million-- ie, it is not something to worry
about.
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by xxhdx1985126
Hi, everyone
I'm a newbie to chrony. I saw these words in "chronyc manual page": "any error in the system clock
is corrected by slightly speeding up or slowing down the system clock until the error has been
removed, and then returning to the system clock¡¯s normal speed". I wonder what does the "speed up
the system clock" mean? Would it influence the execution of glibc APIs like "sleep"? I mean if
chrony decides to speed up the system clock, would sebsequent "sleep" function calls take less time
to return? And is there a max error bound in time for chrony?
Thanks very much:-)
xxhdx1985126
2017-09-03 09:12:46 UTC
Permalink
And is there any way to make subsequent "sleep"s not influenced by chrony's speeding up?


Thanks :-)




At 2017-09-03 17:10:03, "xxhdx1985126" <***@163.com> wrote:

Thanks:-)


By the way, I guess the subsequent "nanosleep" will also be influenced just like "sleep", right?
Post by Bill Unruh
Yes it would. If the clock were slowed by 500PPM (which is a large slew rate)
a 1 second sleep would take all of .5 milli seconds longer. Now chrony can
slow the clock more than that but only under severe circumstances and never by
more than 10%.
You can tell chrony to jump the clock if its error is too large. (that is an
infinite slew rate), but that will not happen. In normal operation the slew
rate may change by a few parts per million-- ie, it is not something to worry
about.
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by xxhdx1985126
Hi, everyone
I'm a newbie to chrony. I saw these words in "chronyc manual page": "any error in the system clock
is corrected by slightly speeding up or slowing down the system clock until the error has been
removed, and then returning to the system clock¡¯s normal speed". I wonder what does the "speed up
the system clock" mean? Would it influence the execution of glibc APIs like "sleep"? I mean if
chrony decides to speed up the system clock, would sebsequent "sleep" function calls take less time
to return? And is there a max error bound in time for chrony?
Thanks very much:-)
Bill Unruh
2017-09-03 16:50:24 UTC
Permalink
Note that neither nanosleep nor sleep are guarenteed any kind of accuracy in
actually running AFAIK. Ie, the efect of chrony, especially once it has
settled down, on sleep or nanosleep are completely lost in the noise of the
procedures themselves.



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ ***@physics.ubc.ca
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by xxhdx1985126
Thanks:-)
By the way, I guess the subsequent "nanosleep" will also be influenced just like "sleep", right?
Post by Bill Unruh
Yes it would. If the clock were slowed by 500PPM (which is a large slew rate)
a 1 second sleep would take all of .5 milli seconds longer. Now chrony can
slow the clock more than that but only under severe circumstances and never by
more than 10%.
You can tell chrony to jump the clock if its error is too large. (that is an
infinite slew rate), but that will not happen. In normal operation the slew
rate may change by a few parts per million-- ie, it is not something to worry
about.
William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/
Post by xxhdx1985126
Hi, everyone
I'm a newbie to chrony. I saw these words in "chronyc manual page": "any error in the system clock
is corrected by slightly speeding up or slowing down the system clock until the error has been
removed, and then returning to the system clock¢s normal speed". I wonder what does the "speed up
the system clock" mean? Would it influence the execution of glibc APIs like "sleep"? I mean if
chrony decides to speed up the system clock, would sebsequent "sleep" function calls take less time
to return? And is there a max error bound in time for chrony?
Thanks very much:-)
 
 
 
Loading...