Postgresql 10 - Parallel Settings

Asked

Viewed 98 times

1

There are 4 settings to enable the parallel and make the optimizations, but the documentation Postgresql does not say anything about values or calculations. My questions are:

1- How to calculate the values of max_parallel_workers, max_parallel_workers_per_gather and max_worker_processes?

2- The work_mem can be calculated on the basis of connections and memory (RAM), but the work_mem need to change something if I enable the parallel?

My guess is: if the machine has 8 cores, the max_parallel_workers would be 8 and the values of the worker process and by Gather would be 32 (8 * 4), the number 4 I took from the original configuration which is 4 Gathers by 1 Parallel work.

1 answer

0


After some researches I found some answers, this can help who wants to enable and have a base configuration, if it has 4 cores (CPU):

your max worker processes 'and the amount of cores and the maximum of Parallel needs to have the same amount:

max_worker_processes = 4
max_parallel_workers = 4

Gather is more complex because this value can be manipulated based on your needs and resources, it is necessary to test to get a better result, but for boot values you can use (cores/2).

max_parallel_workers_per_gather = 2

This is not a final answer, there are some missing points ... I’m still searching and updating this answer or hoping for a better one.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.