Use clock_gettime() instead of gettimeofday() on FreeBSD. #843

Closed
wants to merge 1 commit into
from

1 participant

@ldm5180

On FreeBSD calling gettimeofday() causes all the cores on a multicore
system to be synchronized. On a heavily loaded system with a
significantly CPU bound application this can cause a 40% overall
system degradation.

A better option is to use clock_gettime() and pass in the
CLOCK_REALTIME_FAST clock as the clock to use. This achieves the
same behavior as gettimeofday() on Linux.

@ldm5180 ldm5180 Use clock_gettime() instead of gettimeofday() on FreeBSD.
On FreeBSD calling gettimeofday() causes all the cores on a multicore
system to be synchronized. On a heavily loaded system with a
significantly CPU bound application this can cause a 40% overall
system degradation.

A better option is to use clock_gettime() and pass in the
CLOCK_REALTIME_FAST clock as the clock to use. This achieves the
same behavior as gettimeofday() on Linux.
a07ca70
@JackieXie168 JackieXie168 pushed a commit that referenced this pull request Sep 16, 2014
Slava Akhmechet Fixes #843. d64f450
@ldm5180 ldm5180 closed this Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment