time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

linux kernel pps support

F
folkert
Wed, Dec 17, 2014 3:56 PM

Did a test for a while: every 5 minutes I would look at the output of
ntpq -c pe -n for jitter of the pps source.
This pps source was "measured" either in the kernel (this newly added
gpio pps support in the raspberry pi) or in user space using my own
rpi_gpio_ntp.

kernel pps interrupt handling

root@detijd:/etc# while true ; do echo date +%s ntpq -c pe -n | grep 127.127.22.0 ; sleep 300 ; done | tee -a /pps.log

root@detijd:/etc# cat /pps.log | awk '{ print $11; }' | awk 'BEGIN { max = -1; min = 1000; } { if ($1 > max) { max=$1; } if ($1 < min) { min=$1; } t+=$1; n++; } END { print min, max, t/n, n; }'
0.001 0.124 0.0131945 797

This is minimum, maximum (yes that's 124!) and average. And I took 797
samples which is almost 3 days.

average temperature of soc: 49.7 with stddev of 1.87

userspace

note: I looked at ntpq every 30 seconds(!)
root@hetlicht:/var/log/ntpstats# cat /rpn.log | awk '{ print $11; }' | awk 'BEGIN { max = -1; min = 1000; } { if ($1 > max) { max=$1; } if ($1 < min) { min=$1; } t+=$1; n++; } END { print min, max, t/n, n; }'
0.001 0.101 0.00955351 27797

This is over 9,6 days.

average temperature of soc: 51,1 with stddev of 4.01

TL;DR:

  • kernel  : 13.2us jitter on average
  • userspace:  9.6us jitter on average

Folkert van Heusden

--

www.smartwinning.info

Did a test for a while: every 5 minutes I would look at the output of ntpq -c pe -n for jitter of the pps source. This pps source was "measured" either in the kernel (this newly added gpio pps support in the raspberry pi) or in user space using my own rpi_gpio_ntp. kernel pps interrupt handling ----------------------------- root@detijd:/etc# while true ; do echo `date +%s` `ntpq -c pe -n | grep 127.127.22.0` ; sleep 300 ; done | tee -a /pps.log root@detijd:/etc# cat /pps.log | awk '{ print $11; }' | awk 'BEGIN { max = -1; min = 1000; } { if ($1 > max) { max=$1; } if ($1 < min) { min=$1; } t+=$1; n++; } END { print min, max, t/n, n; }' 0.001 0.124 0.0131945 797 This is minimum, maximum (yes that's 124!) and average. And I took 797 samples which is almost 3 days. average temperature of soc: 49.7 with stddev of 1.87 userspace --------- note: I looked at ntpq every 30 seconds(!) root@hetlicht:/var/log/ntpstats# cat /rpn.log | awk '{ print $11; }' | awk 'BEGIN { max = -1; min = 1000; } { if ($1 > max) { max=$1; } if ($1 < min) { min=$1; } t+=$1; n++; } END { print min, max, t/n, n; }' 0.001 0.101 0.00955351 27797 This is over 9,6 days. average temperature of soc: 51,1 with stddev of 4.01 TL;DR: - kernel : 13.2us jitter on average - userspace: 9.6us jitter on average Folkert van Heusden -- ---------------------------------------------------------------------- www.smartwinning.info
P
Paul
Wed, Dec 17, 2014 4:12 PM

On Wed, Dec 17, 2014 at 10:56 AM, folkert folkert@vanheusden.com wrote:

Did a test for a while: every 5 minutes I would look at the output of
ntpq -c pe -n for jitter of the pps source.

I have some interest in various ntp comparisons but it's not really
time-nuts material.
Would you be interested in moving this thread to ntp-questions?

On Wed, Dec 17, 2014 at 10:56 AM, folkert <folkert@vanheusden.com> wrote: > Did a test for a while: every 5 minutes I would look at the output of > ntpq -c pe -n for jitter of the pps source. > I have some interest in various ntp comparisons but it's not really time-nuts material. Would you be interested in moving this thread to ntp-questions?