Data Infrastructure & Analytics
It's Go Time on Linux

It's Go Time on Linux

3/5/2014 · Albert Strasheim

What this post added

This post delves into the specifics of how Go programs on Linux obtain the current time, highlighting the evolution from older system calls like `time` and `gettimeofday` to the more precise `clock_gettime`. It details Cloudflare's adoption of the Linux vDSO (Virtual Dynamically linked Shared Objects) mechanism for low-overhead time retrieval, significantly improving performance for `time.Now()` and `runtime.nanotime`. The post also includes benchmarks demonstrating the performance gains and discusses the importance of accurate timekeeping for various system functions and potential pitfalls like Y2K and leap second bugs.

Read the original post ↗