Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Clock stability on VM

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Clock stability on VM


Chronological Thread 
  • From: Mark Feit <>
  • To: Purna Mididuddi <>, "" <>
  • Subject: Re: [perfsonar-user] Clock stability on VM
  • Date: Wed, 14 Dec 2016 15:18:53 +0000
  • Accept-language: en-US
  • Authentication-results: Brocade.com; dkim=none (message not signed) header.d=none;Brocade.com; dmarc=none action=none header.from=internet2.edu;
  • Ironport-phdr: 9a23:CoapkhGMrKKoaVkMQ6Ke9p1GYnF86YWxBRYc798ds5kLTJ7yrs+wAkXT6L1XgUPTWs2DsrQf2rGQ7f6rAjZIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZb1/IA+3oAjQucUbj5VuIbstxxXUpXdFZ/5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohVbBXAygoPG4z5M3wqBnMVhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu47ttRRT1kyoMKSI3/3/LhcxxlKJboQyupxpjw47PfYqZMONycr7Bcd8GQGZMWNtaWS5cDYOmd4YBD/QPM/tEr4fzpFUOrAexCwajC+701j9HnXr20bEm3+g9EwzL2hErEdIUsHTTqdX4LKAcXvqvzKnL0D7Nb+1Z2Tbh6IPVdR0hpP+MUqxxccrN0kQvFgXFjkmOpoz/OTOayPgNv3aB4+V+SO2vlncqpgdsqTas3schkpfFiZgJxlzZ8Ch13Zs5KcC9RU51btOoDIdcuiSYOoRoTc4vR2RltSMkxrEaupO3ZDYGxIg7yxLCbvGKfImF7xHmWemNPTt1hndodKy6iha87UStxO7xW8y23VpWrCdFnNzBum0W2BDO5cWKT+Vx80Sg1DuB0Q3Y9/tKLloulaXBLp4s2r4wmYQXsUTEBiL4gFn7gqiKekgq4+Sm5ePpb7v/qp+bLIB7lBvyMqMzmsyjGus4NRUOX26G9uimzL3j50r5QKlUgfIqjqnZsZfaJcIBqq6+Hg9VzoIj6xG4DzelytgXgX4HLFdddBKGiYjmJU3OLejmAfiln1igjTJmy+3bMrH8B5jNIHfOnKv9cbt46UNT1gU+wNRa6p9RFL0NPPH+Vlf0tNPCDx85NwK0w/zgCNV4zo4eXGyPDbGYMKPOqlKI5+QvI/WSa48PvjbyNeQl6+D0gXAnhFAdYLGl3YELZ3CgAvRmP0KZbGL0gtgfC2cKsBE+TOvsiFKYSz5ffmuyX7ki6TEhE4+mCYbDRpuxgLyawiu3BJxWZmZaCl+SC3focZuLW+sSZC6IPMBujyEEBvCdTNoZyAuovUffyrZmIvfY9ixQ4Yrm1dR06/DfvTso8jd9A8nb2GaIGSU81HsFXTEt26Z2uwlg0VqZ+al+n/FCE9FPvbVEXhpwfcrEwvZ0ENf0UxiEY8yEUn6nRMmrGzc8Uoh3ztMTNRVTAdKn2zXKxSniLbIUi/TfAZI587703n7tKtx7xmqckqQtkg91EYN0KWS6i/snpEDoDInTnhDczv7yeA==
  • Spamdiagnosticoutput: 1:0

Purna Mididuddi writes:
>
> We are looking to run a perfsonar node on a VM, with dedicated NIC,
> dedicated
> CPU cores and disabling VM swapping. Also we are running NTP on the VM.
> Given these,
> can we assume clock on VM will be accurate?

Accuracy usually comes with a measurable figure, e.g. “within x seconds of
the actual time.” The value of x and the topological distance between the
participants have a heavy influence on the correctness of latency
measurements, so it’s important to understand the limitations. For example,
it’s possible to come up with a negative latency figure if the participants’
clocks are off in such a way that the packets look like they arrived before
they departed. NTP synced to random hosts on the Internet is usually good to
within 1 ms and doesn’t have this problem if the hosts are more than 100
miles apart; using local, stratum-1 servers gets that down to to 250 µs and
25 miles. There are ways to get lots more accurate than that, but it gets
very expensive very quickly.

I look at measuring latency like I look at measuring the fuel economy in my
car: small variations don’t really mean much. Getting 29.7 miles per gallon
on one tank when I usually get 30 isn’t cause for alarm, but if I suddenly
get 15 when all other things were about equal, something’s probably wrong.
On your network, even with the clock not being ultra-precise, you’re going to
find normal ranges and deviations that indicate problems. If latency between
two points is historically 20 ms and it jumps to 50, something in the middle
has changed for the worse.

> The "ntpq -p" output on VM shows the offset column is changing slightly
> over a period.
> But same behavior is seen on bare-metal output too. So, how can we say
> baremetal has
> more clock accuracy than VM?

One word: hardware. The operating system gets a regular stream of hardware
interrupts that are used to keep the clock ticking. On a bare-metal machine,
those interrupts are generated by a circuit that does so with a minimum of
external influences, usually just voltage and temperature. If there are no
factors on the system that prevent the kernel from servicing interrupts in a
timely manner, the system clock will be no more accurate or precise than the
hardware timer. Any increments of time you see on

VMs have no such hardware. Their hosts do, but that interrupt has to pass
through the hypervisor, which adds some unpredictable amount of latency
between the interrupt’s arrival and the time it gets passed to the guests,
who then have to process it and adjust their own clocks. The steps you’ve
taken (dedicated resources and disabling VM swapping) will help make sure the
arriving virtual interrupt is processed quickly and that NTP can contribute
to the clock’s long-term stability, but neither will make the hypervisor any
more deterministic. A busier hypervisor is likely to be worse about this
than one that’s running a single guest.

Hope that helps.

--Mark





Archive powered by MHonArc 2.6.19.

Top of Page