Thread: CPU Configuration - postgres

CPU Configuration - postgres

From
"Sujith Kumar.S"
Date:
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.


Re: CPU Configuration - postgres

From
Adrian Klaver
Date:
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



Re: CPU Configuration - postgres

From
Sebastian Dressler
Date:
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


Re: CPU Configuration - postgres

From
Adam Brusselback
Date:
>  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.