Small announcement first, hft lecture admissions close in 1 day:
https://lectures.hangukquant.com/courses/digital-options-mm
A few posts ago, I added a detailed guide to network kernel tuning and how to aim for <10microseconds in the path between packet RX and parsing. This is a critical component of “cloud latency engineering”, which is relevant for crypto-native trading systems.
In this post, we will address an important part of microbenchmarking which is clock domain synchronization. These are typical questions that can be asked in an interview for quant dev roles in the crypto space, so I thought it will be a nice post to have.
Microbenchmarks of workloads which complete in a few microseconds are sensitive to small timing errors. When the start and end timestamps come from different clock domains, even a small offset can distort the result. An optimistic sample can therefore reflect clock misalignment, and a dynamic offset can move the latency distribution during the run.
In the referenced post on kernel tuning, this appears while measuring the time from an AWS Elastic Network Adapter (ENA) hardware receive timestamp to WebSocket message-parse completion. ENA supplies the beginning of the interval from its PTP Hardware Clock (PHC), while the application records the endpoint with CLOCK_REALTIME.



