FreeBSD on Hyper-V – the mysterious calcru message

Since FreeBSD 10 started supporting Hyper-V OOB, I could see a message which wasn’t totally new to me but I was a bit suprised to see it … again.
The calcru message and the backward running time.

It looks like this:

 

freebsd.calcru

First of all, this is a known issue and caused by how FreeBSD is getting the current time.
Most Hyper-V folks will go to the Integration Services and take a look to make sure the Time Sync feature is unchecked.
But that won’t change anything.

time synch

A technical deep dive into how FreeBSD is calculating time can be found at:

http://spuder.wordpress.com/2012/01/14/freebsd-calcru-runtime-went-backwards/

Another summary:

>>>> I'm not talking authoratatively but in some virtualization systems, if the
>>>> TSCs on the various processors are not sufficiently synchronized, then when
>>>> the hypervisor switches you from one CPU to another, you can get odd
>>>> (sometimes negative) time readings which give messages like this...

Source: http://lists.freebsd.org/pipermail/freebsd-virtualization/2013-November/001711.html

As I mentioned, I was somewhat surprised. I remember this issue from ages-old VMware systems but thought it had been fixed by now.
But all thinking of the past is prone to err and after some research and talking to some BSD guys, the fog thinned out.

Like many things in the BSD world, it seems to be a feature rather than a bug.
In the end it’s only a notice and not an error message. It will usually come up at system start and not bother you later.
As I understood the usec are microseconds and shouldn’t hurt your environment as much as you might think.
I have to admit I’m not a BSD guy, so if I’m plain wrong about this, just give me a hint at fax a-t virtual-ops.de and I’ll update my post.

 

Leave a Reply

Your email address will not be published.