public inbox for [email protected]
help / color / mirror / Atom feedFrom: Stephen Froehlich <[email protected]>
To: Pól Ua Laoínecháin <[email protected]>
Cc: pgsql-novice <[email protected]>
Subject: RE: Using PGTune - is it a good source for system configuration?
Date: Wed, 1 Sep 2021 22:41:14 +0000
Message-ID: <CY4PR0601MB35888F6B902F7265924E477BE5CD9@CY4PR0601MB3588.namprd06.prod.outlook.com> (raw)
In-Reply-To: <CAF4RT5QJ0gAVqqiNJ2-2WMcGVsWhihBwif+zttw08pT-W0jv1w@mail.gmail.com>
References: <CAF4RT5RfAuwnAycn9pU+Hxqv1aaKiAnQKv0V_BsqjSX5TAymtw@mail.gmail.com>
<CAKFQuwaiKJXCsf+h5yBmEcrCoadFduxfkgO884cgbspvbi=z7g@mail.gmail.com>
<CAF4RT5QJ0gAVqqiNJ2-2WMcGVsWhihBwif+zttw08pT-W0jv1w@mail.gmail.com>
Yes, I have found that most PostgreSQL workloads do benefit some (like 25% to 30%) from Intel hyperthreading.
With 4 threads, I would probably start out at:
max_worker_processes = 4
max_parallel_workers_per_gather = 2
max_parallel_workers = 3
max_parallel_maintenance_workers = 1
And then keep an eye on htop ... and go from there. Remember that for this generation of processor, the speculative execution patches make context switching (changing which software thread a hyperthread is working on) quite expensive, so its bad to max out the processor, and your gains above the 2 cores will be small.
But honestly I have never run PostgreSQL on a machine with fewer than 12 cores / 24 threads.
--Stephen
-----Original Message-----
From: Pól Ua Laoínecháin <[email protected]>
Sent: Wednesday, September 1, 2021 12:16
Cc: pgsql-novice <[email protected]>
Subject: Re: Using PGTune - is it a good source for system configuration?
Hi, and thanks for replying.
> Not according to its "about" page...
Yeah, sure, it's not a silver bullet, but the thrust of my question
was: do the community experts consider it reliable enough as a first approximation?
Your remarks about "better than the generic defaults" reassures me that this is the case.
This is just my laptop - but I've taken PGTune's recommendations before for a data loading and it was a real help...
One other question that I forgot to include in my original!
I have a two CPU core (that's why I put 2 for the number of CPUs) but my processor supports hyperthreading (Intel Core i5, 7th Gen), so should I really put 4 as the no.
Changing this from 2 to 4 changes the
work_mem from 41943kB to 20971kB and the worker settings from
max_worker_processes = 2
max_parallel_workers_per_gather = 1
max_parallel_workers = 2
max_parallel_maintenance_workers = 1
to
max_worker_processes = 4
max_parallel_workers_per_gather = 2
max_parallel_workers = 4
max_parallel_maintenance_workers = 2
So, which would be the correct Number of CPUs setting given my processor?
TIA and rgs,
Pól...
> David J.
view thread (5+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: RE: Using PGTune - is it a good source for system configuration?
In-Reply-To: <CY4PR0601MB35888F6B902F7265924E477BE5CD9@CY4PR0601MB3588.namprd06.prod.outlook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox