AWS engineer reports PostgreSQL perf halved by Linux 7.0, fix may not be easy

crcastle 203 points 46 comments April 05, 2026
www.phoronix.com · View on Hacker News

https://lore.kernel.org/lkml/yr3inlzesdb45n6i6lpbimwr7b25kqk...

Discussion Highlights (10 comments)

lfittl

Its worth reading this follow-up LKML post by Andres Freund (who works on Postgres): https://lore.kernel.org/lkml/yr3inlzesdb45n6i6lpbimwr7b25kqk...

FireBeyond

Once upon a time, Linus would shout and yell about how the kernel should never "break" userspace (and I see in some places, some arguments of "It's not broken, it's just a performance regression" - personally I'd argue a 50% hit to performance of a pre-eminent database engine is ... quite the regression). Now, the kernel engineer who introduced the brand new mechanism (introduced in Linux 7.0) for handling pre-emption says the "fix" is for Postgres to start using this new mechanism (I think the sister comment below links to what one of the Postgres engineers thinks of that, and I'm inclined mostly to agree).

dsr_

Nobody sensible runs the latest kernel; nobody running PG in production should be afraid of setting a non-default at either boot time or as a sysctl. So this will, most likely, be another step in building a PG database server (turn off pre-emption if your kernel is 7.0 or later and PG is pre-whatever-version). At worst it might become a permanent part of building a PG server and a FAQ... but if it affects one thing this badly, it will affect others.

galbar

It's not a good look to break userspace applications without a deprecation period where both old and new solutions exist, allowing for a transition period.

harshreality

Background on PREEMPT_LAZY: https://lwn.net/Articles/994322/

longislandguido

Anyone check to see if Jia Tan has submitted any kernel patches lately?

cperciva

This makes me feel better about the 10% performance regression I just measured between FreeBSD 14 and FreeBSD 15.0.

monocasa

I feel like using spinlocks in user space at all without kernel support like rseq is just asking for weird performance degradations.

cdelsolar

https://lkml.org/lkml/2012/12/23/75

anal_reactor

Can someone explain to me what's the problem? I have very little knowledge of Linux kernel, but I'm curious. I've tried reading a little, but it's jargon over jargon.

Semantic search powered by Rivestack pgvector
3,558 stories · 33,161 chunks indexed