DailyGlimpse

Linux 7.0 Kernel Update Cuts PostgreSQL Performance in Half Due to Preemption Regression

AI
April 30, 2026 · 2:12 PM

A recent update to the Linux kernel, version 7.0, has been found to significantly degrade PostgreSQL database performance, with some users reporting a drop of up to 50%. The issue stems from a preemption regression in the kernel's scheduler, which affects how database threads are managed.

According to a detailed analysis shared on Hacker News, the root cause is a change in the kernel's preemption model. In Linux 7.0, the scheduler now behaves more aggressively, causing PostgreSQL's worker processes to be interrupted more frequently. This leads to increased context switching and cache thrashing, ultimately halving throughput for many workloads.

PostgreSQL relies on efficient CPU scheduling to handle concurrent queries. With the new preemption behavior, even simple transactions experience delays, as the kernel frequently interrupts database operations to handle other tasks. The issue is particularly pronounced on systems with many cores and high concurrency.

Affected users can temporarily mitigate the problem by adjusting the kernel's preemption settings via sysctl, though a permanent fix is expected in a future kernel update. The Linux kernel development team has acknowledged the regression and is working on a patch.

This incident highlights the delicate balance between general kernel improvements and the specific needs of database systems. While Linux 7.0 brought several security and performance enhancements, the preemption change has been a step backward for PostgreSQL users.