Engineering brief

Postgres is half as fast in Linux 7.0, and we always knew why

This engineering brief covers Postgres is half as fast in Linux 7.0, and we always knew why, with practical context for AI and developer-tool decisions.

Hussein Nasser

The Brief

Linux 7.0's kernel preemption change halves Postgres speed, exposing a deep architectural tension between process-based DBs and modern kernels.

Decision relevance

Read this for workflow impact, implementation trade-offs, and the claims that need technical scrutiny before they reach team planning.

Summary

An Amazon engineer discovered a 50% performance regression in Postgres running on the upcoming Linux kernel 7.0. The root cause is a Linux default change from 'preempt none' to 'preempt lazy' for kernel code. This means kernel operations like page faults can now be preemptively scheduled out. When a Postgres process holds a spinlock on shared memory and then triggers a page fault, it can now be preempted while holding that lock, causing all other waiting processes to spin uselessly. The workaround is enabling huge pages, which drastically reduces page fault frequency. But the fundamental design tension remains: Postgres uses a process-per-connection model, so every new backend inherits an empty page table. Under high connection counts, this generates massive, continuous page fault overhead that the new kernel default amplifies. The discussion is not about a bug but about how a legitimate kernel improvement for fairness interacts poorly with a decades-old database architecture choice. This is a case study in how infrastructure defaults can silently reshape application performance profiles, and why architectural assumptions must be re-evaluated as the layers beneath them evolve. The immediate fix is operational (enable huge pages). The deeper signal is the growing cost of process-based concurrency on modern Linux, and whether teams running Postgres at scale need to start planning for or advocating a thread-based architecture.

Why It Matters

It reveals how upstream kernel changes can silently cripple production databases, demanding proactive testing and architectural awareness from platform and data teams.

Editorial analysis

Key claims

  • Kernel defaults are architectural decisions. Teams must test early and treat huge pages as mandatory for Postgres scale.

Practical use cases

  • Use this as input for tooling evaluation, workflow planning, and technical due diligence.

Risks / caveats

  • Any panic about Linux 7.0 being 'broken'. The regression is understood, configurable, and exposes a trade-off, not a flaw.

Who should care

  • Engineering managers, tech leads, and CTOs evaluating AI or developer tooling decisions.

Related topics

Bottom Line

Kernel defaults are architectural decisions. Teams must test early and treat huge pages as mandatory for Postgres scale.

Watch

This video is blocked due to your privacy settings. To watch this video, please accept YouTube marketing cookies.

Related breakdowns

Get TL;DW

Too Long; Didn't Watch.

A concise breakdowns of the AI and devtools videos that actually matter for engineering leaders.

Free. Weekly. No hype.

Video and thumbnails remain the property of their respective creators. tldw.news provides editorial analysis, commentary, and discovery links to original content.