All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Optimizing Linux timestamps on x86: 30% faster custom timers without vDSO

By

hmpc

1mo ago· 23 min readenInsight

Summary

A deep technical exploration of optimizing Linux timestamps on x86 architecture, achieving 30% speed improvements over standard system clocks by implementing custom timers that bypass vDSO. The author details their experience building a low-latency C++ tracing client library for OpenTelemetry in a microsecond-scale pipeline, and explains the trade-offs, techniques, and niche use cases for such aggressive optimization. The article concludes that while the approach works, almost nobody should actually use it in production.

Key quotes

· 3 pulled
TL;DR: We can speed up timestamps on x86 Linux by 30% and maintain the same precision as the standard system clock by implementing our own timers without relying on vDSO. Almost nobody should do this.
One of my pet projects at my last job was to introduce distributed tracing to a low-latency pipeline (think 1–10 microseconds per stage) using OpenTelemetry.
As part of this effort I spent a considerable amount of time designing, implementing, and optimising our own C++ tracing client library, as the official one has too much overhead.
Snippet from the RSS feed
Adventures in over-optimising timers for niche applications.

You might also wanna read