New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime: use CLOCK_MONOTONIC_FAST on FreeBSD? #22942
Comments
CLOCK_MONOTONIC_FAST will use
according to https://github.com/freebsd/freebsd/blob/master/sys/sys/time.h#L450 In a nutshell I don't have any numbers but we're paying the syscall cost, so maybe we should let it do the full work? |
Hi all, Just wanted to give some numbers to help this discussion along, we're running:
We have a frontend HTTP component that handles large amounts of incoming traffic that is then placed into various backends (DB, queues, etc). While profiling CPU stalls we found that 16% was attributed to
After patching to use
Even though we're not CPU bound the above change made a pretty decent improvement to the 99th% latency, largely because the packages used to communicate with the backends are calling When running a go benchmark calling
I understand that the reduced precision is an important consideration, but given the default Dom |
@domodwyer I'm working on https://golang.org/cl/93156 as an alternative. The initial version is for a I wanted to note that the libc implementation does not differentiate between I've asked about this on efnet #bsdcode, the answer I've got is:
I'm assuming HPET is similarly considered fast, when used with |
Hi @paulzhol Using vdso and skipping the syscall entirely sounds like a great idea - if you'd like us to run a comparison when you're ready just let us know. I would expect similar gains with HPET as the source as you say, though I think we could probably use Dom |
Change https://golang.org/cl/108095 mentions this issue: |
@domodwyer the If you can use
|
Hi @paulzhol The patch makes a substantial difference! My environment is now running Below are comparisons between
That is an impressive difference, thanks very much for the hard work! Dom |
sys_freebsd_amd64.s says:
We now require FreeBSD 10.3+.
Switch to CLOCK_MONOTONIC_FAST?
I don't know what that is.
The text was updated successfully, but these errors were encountered: