From: Thomas Prescher <thomas.prescher@cyberus-technology.de>
To: "willy@infradead.org" <willy@infradead.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"muchun.song@linux.dev" <muchun.song@linux.dev>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] mm: hugetlb: add hugetlb_alloc_threads cmdline option
Date: Fri, 21 Feb 2025 14:16:31 +0000 [thread overview]
Message-ID: <eeb9d580a41cb314aba6ad21e751b506dc9cc434.camel@cyberus-technology.de> (raw)
In-Reply-To: <Z7iFHkybeT4v8Jbo@casper.infradead.org>
On Fri, 2025-02-21 at 13:52 +0000, Matthew Wilcox wrote:
> I don't think we should add a command line option (ie blame the
> sysadmin
> for getting it wrong). Instead, we should figure out the right
> number.
> Is it half the number of threads per socket? A quarter? 90%? It's
> bootup, the threads aren't really doing anything else. But we
> should figure it out, not the sysadmin.
I don't think we will find a number that delivers the best performance
on every system out there. With the two systems we tested, we already
see some differences.
The Skylake servers have 36 threads per socket and deliver the best
performance when we use 8 threads which is 22%. Using more threads
decreases the performance.
On Cascade Lake with 48 threads per socket, we see the best performance
when using 32 threads which is 66%. Using more threads also decreases
the performance here (not included in the table obove). The performance
benefits of using more than 8 threads are very marginal though.
I'm completely open to change the default so something that makes more
sense. From the experiments we did so far, 25% of the threads per node
deliver a reasonable good performance. We could still keep the
parameter for sysadmins that want to micro-optimize the bootup time
though.
next prev parent reply other threads:[~2025-02-21 14:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 13:49 [PATCH 0/2] Add a command line option that enables control of how many threads per NUMA node should be used to allocate huge pages Thomas Prescher via B4 Relay
2025-02-21 13:49 ` [PATCH 1/2] mm: hugetlb: add hugetlb_alloc_threads cmdline option Thomas Prescher via B4 Relay
2025-02-21 13:52 ` Matthew Wilcox
2025-02-21 14:16 ` Thomas Prescher [this message]
2025-02-23 2:46 ` Andrew Morton
2025-02-24 10:42 ` Thomas Prescher
2025-02-24 17:37 ` Frank van der Linden
2025-02-25 13:01 ` Thomas Prescher
2025-02-21 13:49 ` [PATCH 2/2] mm: hugetlb: log time needed to allocate hugepages Thomas Prescher via B4 Relay
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=eeb9d580a41cb314aba6ad21e751b506dc9cc434.camel@cyberus-technology.de \
--to=thomas.prescher@cyberus-technology.de \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=willy@infradead.org \
/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