bhyve clock problem, solved by kern.timecounter.hardware="TSC-low" in /etc/sysctl.conf

Paul Vixie paul at redbarn.org
Sat Apr 11 06:41:57 UTC 2015



Neel Natu wrote:
> Hi Paul,
>
> On Fri, Apr 10, 2015 at 10:35 AM, Paul Vixie <paul at redbarn.org> wrote:
>> ...
>>
>> can we make TSC-low the default?
>>
>
> The choice of using the TSC is not without issues:
>
> - As rstone@ points out the TSCs need to be synchronized across physical cpus.

ok, then the reason i'm not seeing this is i have a single 6-core CPU.
(ntpd would complain about clocks going backward.)


> - Depending on system load the guest's estimate of the TSC frequency
> might be way off the mark.

i see what you mean.

> So, in a way the HPET or the ACPI time counters are better since both
> the host and guest agree on the frequency. But it seems there is
> either an issue with the emulation or an artifact due to the
> guest-to-host round trip time.

to be fair, some of my bhyve's ran fast (so, positive adjustments by
ntpd), some ran slow (negative adjustments). i did not try every
possible timecounter hardware; TSC-low fixed it, so i stopped.

> I have been doing experiments but don't have anything conclusive yet.

thanks for looking into it. paravirtualization (kvm-clock or some
equivalent) seems desirable.

-- 
Paul Vixie


More information about the freebsd-virtualization mailing list