From: Mark Rutland <mark.rutland@arm.com>
To: Salvatore Dipietro <dipiets@amazon.it>
Cc: Andres Freund <andres@anarazel.de>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, alisaidi@amazon.com,
blakgeof@amazon.com, abuehaze@amazon.de,
dipietro.salvatore@gmail.com, Thomas Gleixner <tglx@kernel.org>,
Valentin Schneider <vschneid@redhat.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 0/1] sched: Restore PREEMPT_NONE as default
Date: Tue, 7 Apr 2026 12:19:29 +0100 [thread overview]
Message-ID: <adToQS5dousG6UVZ@J2N7QTR9R3> (raw)
In-Reply-To: <xxbnmxqhx4ntc4ztztllbhnral2adogseot2bzu4g5eutxtgza@dzchaqremz32>
On Sun, Apr 05, 2026 at 12:21:55AM -0400, Andres Freund wrote:
> On 2026-04-04 21:40:29 -0400, Andres Freund wrote:
> > On 2026-04-04 13:42:22 -0400, Andres Freund wrote:
> > The benchmark script seems to indicate that huge pages aren't in use:
> > https://github.com/aws/repro-collection/blob/main/workloads/postgresql/main.sh#L15
For the benefit of those reading mail without a browser, the line in
question is:
${PG_HUGE_PAGES:=off} # off, try, on
Per the PostgreSQL 17 documentation:
https://www.postgresql.org/docs/17/runtime-config-resource.html#GUC-HUGE-PAGES
... the default is 'try', though IIUC some additional system
configuration may be necessary, to actually reserve huge pages, which
is also documented:
https://www.postgresql.org/docs/17/kernel-resources.html#LINUX-HUGE-PAGES
> > I wonder if somehow the pages underlying the portions of postgres' shared
> > memory are getting paged out for some reason, leading to page faults while
> > holding the spinlock?
>
> Hah. I had reflexively used huge_pages=on - as that is the only sane thing to
> do with 10s to 100s of GB of shared memory and thus part of all my
> benchmarking infrastructure - during the benchmark runs mentioned above.
Salvatore, was there a specific reason to test with PG_HUGE_PAGES=off
rather than PG_HUGE_PAGES=try? Was that arbitrary (e.g. because it was
the first of the possible options)?
IIUC from what Andres says here (and in other mails in this thread),
that's not a sensible/realistic configuration for this sort of workload,
and is the root cause of the contention (which seems to be exacerbated
by the scheduler model change).
As Andres noted, even ignoring the scheduler model, running with
PG_HUGE_PAGES=off results in a substantial performance penalty:
> *regardless* the spinlock. PG 19 does have the spinlock in this path anymore,
> but not using huge pages is still utterly terrible (like 1/3 of the
> throughput).
>
> I did run some benchmarks here and I don't see a clearly reproducible
> regression with huge pages.
Is the PG_HUGE_PAGES=off configuration important to you for some reason?
Mark.
next prev parent reply other threads:[~2026-04-07 11:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 19:19 [PATCH 0/1] sched: Restore PREEMPT_NONE as default Salvatore Dipietro
2026-04-03 19:19 ` [PATCH 1/1] " Salvatore Dipietro
2026-04-03 21:32 ` [PATCH 0/1] " Peter Zijlstra
2026-04-04 17:42 ` Andres Freund
2026-04-05 1:40 ` Andres Freund
2026-04-05 4:21 ` Andres Freund
2026-04-05 6:08 ` Ritesh Harjani
2026-04-05 14:09 ` Andres Freund
2026-04-05 14:44 ` Andres Freund
2026-04-07 8:29 ` Peter Zijlstra
2026-04-07 8:27 ` Peter Zijlstra
2026-04-07 10:17 ` David Laight
2026-04-07 8:20 ` Peter Zijlstra
2026-04-07 9:07 ` Peter Zijlstra
2026-04-07 11:19 ` Mark Rutland [this message]
2026-04-07 8:49 ` Peter Zijlstra
2026-04-06 0:43 ` Qais Yousef
2026-04-05 14:44 ` Mitsumasa KONDO
2026-04-05 16:43 ` Andres Freund
2026-04-06 1:46 ` Mitsumasa KONDO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adToQS5dousG6UVZ@J2N7QTR9R3 \
--to=mark.rutland@arm.com \
--cc=abuehaze@amazon.de \
--cc=alisaidi@amazon.com \
--cc=andres@anarazel.de \
--cc=bigeasy@linutronix.de \
--cc=blakgeof@amazon.com \
--cc=dipietro.salvatore@gmail.com \
--cc=dipiets@amazon.it \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@kernel.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox