- Linux 7.0 drops pgbench TPS 48.5% from 98,565 to 50,751 on 96-vCPU Graviton4.
- Perf pins 56.03% CPU on StartReadBuffer due to PREEMPT_LAZY s_lock spins.
- AWS engineer Salvatore Dipietro's April 3, 2026 patch awaits LKML merge.
Linux 7.0 PostgreSQL regression halves throughput from 98,565 transactions per second (TPS) to 50,751 TPS in pgbench workloads on AWS Graviton4 instances.
AWS engineer Salvatore Dipietro traced the 48.5% drop to PREEMPT_LAZY preemption, added in Linux 6.12. He tested on a 96-vCPU Graviton4 instance with pgbench scale factor 8470 and 1024 clients across 96 threads, per his LKML post dated April 3, 2026.
Dipietro's perf profiling showed StartReadBuffer at 56.03% CPU time. GetVictimBuffer and StrategyGetBuffer each hit 55.93%. The s_lock function consumed 55.60%.
PREEMPT_LAZY Triggers PostgreSQL Lock Contention
Linux 6.12 introduced PREEMPT_LAZY to cut voluntary preemption overhead and improve latency, according to kernel.org documentation. High-concurrency PostgreSQL buffer manager workloads suffer most.
PostgreSQL s_lock critical sections spin longer under PREEMPT_LAZY. Threads starve in buffer routines on multi-core systems. Graviton4 hit 98,565 TPS on Linux 6.x but plunged to 50,751 TPS on Linux 7.0, Dipietro reported.
Dipietro detailed benchmarks on TheCoder.cafe. Graviton4's 96 Neoverse V2 cores match dual-socket AMD EPYC or Intel Xeon in PC servers.
Pgbench Workload Breakdown
Pgbench mimics TPC-B transactions, per PostgreSQL documentation. It stresses buffer manager read/write locks.
StartReadBuffer handles buffer reads. StrategyGetBuffer finds free pages. GetVictimBuffer evicts dirty buffers. All use s_lock synchronization.
PREEMPT_LAZY delays involuntary preemption until kernel exit. This extends user-space spins on high-core counts. Dipietro confirmed scaling with vCPUs.
Graviton4 Benchmarks and Setup
Dipietro ran pgbench scale 8470, creating 847 million rows. He used 1024 clients on 96 threads.
Linux 6.x achieved 98,565 TPS. Linux 7.0 dropped to 50,751 TPS—a 48.5% regression.
Perf results from Dipietro:
- Function: StartReadBuffer · CPU %: 56.03
- Function: GetVictimBuffer · CPU %: 55.93
- Function: StrategyGetBuffer · CPU %: 55.93
- Function: s_lock · CPU %: 55.60
AWS Graviton documentation claims database advantages. The 96-vCPU instance costs $4.37 USD per hour.
PC Hardware Risks from Linux 7.0 PostgreSQL Regression
High-core PCs face the same Linux 7.0 PostgreSQL regression. AMD Ryzen 9 9950X (16 cores) or dual EPYC 9755 (256 cores) power homelabs and dev servers.
Intel Core Ultra 200V or Threadripper rigs worsen contention. PREEMPT_LAZY lengthens s_lock waits, cutting TPS up to 50%.
Power draw spikes. A 300W TDP Ryzen 9000 CPU spins uselessly. Thermals rise 20-30°C in pgbench, per similar tests.
Dipietro's LKML patch dated April 3, 2026, tweaks s_lock for PREEMPT_LAZY. Tests show it restores Linux 6.x TPS.
Price-Performance and Investor Implications
Graviton4 delivers 20-30% better perf/Watt than x86, AWS benchmarks state. Linux 7.0 erases database gains.
PC comparison: Threadripper 7995WX (96 cores, $9,999 USD) vs. Graviton4 ($4.37 USD/hour). PC hourly cost exceeds $10 USD at 50% utilization.
Regression affects markets. AMD (NASDAQ: AMD) and Intel (NASDAQ: INTC) server CPUs vie with Graviton. Kernel fixes accelerate ARM, squeeze x86 margins.
Workarounds Until Patch Lands
Boot PREEMPT_VOLUNTARY kernels. Ubuntu 26.04 and Fedora 44 offer Linux 7.0—choose older GRUB options.
Custom kernels disable features. PostgreSQL 17 eases locks slightly, but kernel patch fixes root cause.
Dipietro's patch enters LKML review. Stable 6.12.y LTS backports loom.
PC Testing Recommendations
Benchmark pgbench on NVMe drives pre-upgrade. Match clients to core count.
Track perf for s_lock. High-core Threadripper PRO needs tested kernels.
Linux 7.0 PostgreSQL regression highlights kernel database risks. Patches ensure swift fixes. Monitor LKML merges.
Frequently Asked Questions
What causes the Linux 7.0 PostgreSQL regression?
PREEMPT_LAZY from Linux 6.12 halves pgbench TPS from 98,565 to 50,751 on Graviton4. StartReadBuffer hits 56.03% CPU. AWS engineer Salvatore Dipietro identified it.
How does PREEMPT_LAZY hurt PostgreSQL?
It delays preemption, extending s_lock spins. GetVictimBuffer takes 55.93% CPU in 96-thread pgbench. Throughput drops nearly 50%.
What were the benchmark specs?
Pgbench scale 8470 on 96-vCPU Graviton4 with 1024 clients. Linux 6.x: 98,565 TPS. Linux 7.0: 50,751 TPS.
Is there a fix for Linux 7.0 PostgreSQL regression?
Salvatore Dipietro's April 3, 2026 patch targets s_lock on LKML. Use Linux 6.x or PREEMPT_VOLUNTARY until merged.
