在新安装的 Supermicro 服务器上,使用一对 Xeon Gold 6146,我们在时间同步方面遇到了很多麻烦。问题是持续的高漂移值:
cat /var/lib/chrony/chrony.drift
19659.271230 1.281228
供应商可以在 ubuntu 19.04 上重现该问题,但无法在 redhat 7.2 上重现,因此他们认为 ubuntu 无法正确支持 purview lake。我们在较旧的 CPU(ivy bridge i5 3570)上进行了相同的设置,也发现它运行良好。
这是我们使用的内核版本:
uname -r
5.0.0-20-generic
这就是我们设置 chrony/timemaster 的方式
#first make sure that ntpd and ptpd are removed
sudo apt autoremove ntp
sudo apt autoremove ptpd
#chronyd daemon and chronyc client
sudo apt install chrony
#ptp4l, timemaster and phc2sys
sudo apt install linuxptp
# disable apparmor on chrony
sudo ln -s /etc/apparmor.d/usr.sbin.chronyd /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.chronyd
$ cat /etc/linuxptp/timemaster.conf
# Configuration file for timemaster
[ntp_server 2.debian.pool.ntp.org]
#minpoll 4
#maxpoll 4
#[ptp_domain 0]
#interfaces enp59s0f3
#delay 10e-6
[timemaster]
ntp_program chronyd
[chrony.conf]
include /etc/chrony/chrony.conf
#[ntp.conf]
#includefile /etc/ntp.conf
[ptp4l.conf]
[chronyd]
path /usr/sbin/chronyd
#[ntpd]
#path /usr/sbin/ntpd
#options -u ntp:ntp -g
[phc2sys]
path /usr/sbin/phc2sys
[ptp4l]
path /usr/sbin/ptp4l
chronyc 输出
$ chronyc sources -v
210 Number of sources = 12
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? 10.1.196.1 0 8 0 - +0ns[ +0ns] +/- 0ns
^? 10.8.196.1 0 8 0 - +0ns[ +0ns] +/- 0ns
^? golem.canonical.com 0 6 0 - +0ns[ +0ns] +/- 0ns
^+ chilipepper.canonical.com 2 6 377 15 -3140us[-3178us] +/- 124ms
^+ alphyn.canonical.com 2 6 377 14 +4956us[+4956us] +/- 206ms
^+ golem.canonical.com 2 6 377 15 -3504us[-3504us] +/- 118ms
^* 202.29.58.214 3 6 177 15 -4189us[-4227us] +/- 83ms
^? 2001:3c8:1501:65::1501:11 0 6 0 - +0ns[ +0ns] +/- 0ns
^? clock.kku.ac.th 0 6 0 - +0ns[ +0ns] +/- 0ns
^? 2401:5700:100:503::1813 0 6 0 - +0ns[ +0ns] +/- 0ns
^? ntp1.cpe.rmutt.ac.th 0 6 0 - +0ns[ +0ns] +/- 0ns
^+ 202.29.58.130 2 6 37 26 +4447us[+4406us] +/- 48ms