Home / Companies / Heap / Blog / Post Details
Content Deep Dive

Running a database on EC2? Your clock could be slowing you down.

Blog post from Heap

Post Details
Company
Date Published
Author
Kamal Marhubi
Word Count
2,273
Company Posts That Month
4
Language
English
Hacker News Points
-
Post removed?
No
Summary

Heap Engineering discovered that their database machines were spending excessive CPU time on time-related system calls, particularly due to the default xen clocksource on EC2 instances. By switching to the tsc clocksource, which utilizes the fast path for timing calls in userspace and avoids the costly kernel mode switch, they managed to reduce their 95th percentile query times by 30%. This clocksource change was deemed safe after confirming that the i3 instance type's Xeon processors and their virtualization setup did not suffer from potential backward clock drift issues typically associated with the tsc clocksource. The article suggests checking and switching clocksources as a potential performance optimization and briefly discusses the improvements brought by EC2's transition to the Nitro hypervisor, which supports a more efficient clocksource by default.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.