CPU Configuration - postgres

Started by Sujith Kumar.Salmost 6 years ago4 messagesgeneral
Jump to latest
#1Sujith Kumar.S
sujiplr@gmail.com

Hi Team,

Could you please confirm whether I need to restart my postgresql instance
after adding CPU to my server.

Is there any configuration in postgresql that restrict the number of CPU
usage by postgres process.

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Sujith Kumar.S (#1)
Re: CPU Configuration - postgres

On 6/11/20 1:24 AM, Sujith Kumar.S wrote:

Hi Team,

Could you please confirm whether I need to restart my postgresql
instance after adding CPU to my server.

You did that while it was running?

Is there any configuration in postgresql that restrict the number of CPU
usage by postgres process.

That is spelled Oracle. Just kidding, no there is no such configuration.

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Sebastian Dressler
sebastian@swarm64.com
In reply to: Sujith Kumar.S (#1)
Re: CPU Configuration - postgres

Hi,

On 11. Jun 2020, at 10:24, Sujith Kumar.S <sujiplr@gmail.com> wrote:

Is there any configuration in postgresql that restrict the number of CPU usage by postgres process.

For parallelism, there are these options:

- max_parallel_workers_per_gather
- max_parallel_workers
- max_worker_processes

Where the first two essentially can limit the amount of cores to be used.

Is that what you were asking for?

Cheers,
Sebastian

--

Sebastian Dressler, Solution Architect
+49 30 994 0496 72 | sebastian@swarm64.com

Swarm64 AS
Parkveien 41 B | 0258 Oslo | Norway
Registered at Brønnøysundregistrene in Norway under Org.-Number 911 662 787
CEO/Geschäftsführer (Daglig Leder): Thomas Richter; Chairman/Vorsitzender (Styrets Leder): Dr. Sverre Munck

Swarm64 AS Zweigstelle Hive
Ullsteinstr. 120 | 12109 Berlin | Germany
Registered at Amtsgericht Charlottenburg - HRB 154382 B

#4Adam Brusselback
adambrusselback@gmail.com
In reply to: Sebastian Dressler (#3)
Re: CPU Configuration - postgres

For parallelism, there are these options

That only matters if you want to use those extra cores to make individual
queries / commands faster.

If all OP cares about is "will PG use my extra cores", the answer is yes it
will without doing anything special.