Live data from Hacker News

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

phoronix.com

21–30 of 177 posts

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

#21
post #2

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

Note that it's just not a single post, and there's additional further information in following the full thread. :)

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

#22
post #13
post #8

Earlier quoted context omitted.

> Nobody sensible runs the latest kernel From the article: "Linux 7.0 stable is due out in about two weeks. This is also the kernel version powering Ubuntu 26.04 LTS to be released later in April." Unfortunately, lots of people will be running it in less than a month. At the moment, it'll take a kernel patch (not a sysctl) to undo this-- hopefully something changes.

Not nobody but not everybody upgrades to the newest distros immediately. That's the advantage of LTS. I've even found that a lot of programs have poorer support on 24.04 than 22.04 due to security changes, so I'm fine sticking with 22.04 as my main dev system.

> ... not everybody upgrades to the newest distros immediately.

While that's true, for new deployments the story is often "deploy on the latest release of things available at the time".

So, there will probably be a substantial deployment of new projects / testing projects using the Linux 7.0 kernel along with the latest available software packages in a few weeks.

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

#23
post #13
post #8

Earlier quoted context omitted.

> Nobody sensible runs the latest kernel From the article: "Linux 7.0 stable is due out in about two weeks. This is also the kernel version powering Ubuntu 26.04 LTS to be released later in April." Unfortunately, lots of people will be running it in less than a month. At the moment, it'll take a kernel patch (not a sysctl) to undo this-- hopefully something changes.

Not nobody but not everybody upgrades to the newest distros immediately. That's the advantage of LTS. I've even found that a lot of programs have poorer support on 24.04 than 22.04 due to security changes, so I'm fine sticking with 22.04 as my main dev system.

That's the advantage of LTS? 24.04 is the LTS, not the one you use, 22.04.

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

#24
post #2

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

AIUI in that thread they're saying "0.51x" the perf on a 96-core arm64 machine and they're also saying they cannot reproduce it on a 96-core amd64 machine. So it's not going to affect everybody both running PostgreSQL and upgrading to the latest kernel. Conditions seems to be: arm64, shitloads of core, kernel 7.0, current version of PostgreSQL. That is not going to be 100% of the installed PostgreSQL DBs out there in…

For production Postgres, i would assume it’s close to almost no effect?

If someone is running postgres in a serious backend environment, i doubt they are using Ubuntu or even touching 7.x for months (or years). It’ll be some flavor of Debian or Red Hat still on 6.x (maybe even 5?). Those same users won’t touch 7.x until there has been months of testing by distros.

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

#25
post #2

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

>If this somehow does end up being a reproducible performance issue (I still suspect something more complicated is going on), I don't see how userspace could be expected to mitigate a substantial perf regression in 7.0 that can only be mitigated by a default-off non-trivial functionality also introduced in 7.0.

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

#26

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

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

Yeah, exactly. "Doctor, help, somebody replaced my wooden hammer with a metal one, and now I can't hit myself in the face with it as many times."

If you use spinlocks in userspace, you're gonna have a bad time.

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

#27
post #23
post #13

Earlier quoted context omitted.

Not nobody but not everybody upgrades to the newest distros immediately. That's the advantage of LTS. I've even found that a lot of programs have poorer support on 24.04 than 22.04 due to security changes, so I'm fine sticking with 22.04 as my main dev system.

That's the advantage of LTS? 24.04 is the LTS, not the one you use, 22.04.

[deleted]

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

#28
post #23
post #13

Earlier quoted context omitted.

Not nobody but not everybody upgrades to the newest distros immediately. That's the advantage of LTS. I've even found that a lot of programs have poorer support on 24.04 than 22.04 due to security changes, so I'm fine sticking with 22.04 as my main dev system.

That's the advantage of LTS? 24.04 is the LTS, not the one you use, 22.04.

22.04 is also an LTS release, supported for another year still.

https://ubuntu.com/about/release-cycle

We're just now looking at moving production machines to 24.04.

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

#30
post #4

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 t…

The option to set PREEMPT_NONE was removed for basically all platforms.
Post reply on HN