AWS RDS Postgresql 12.10
According to https://www.enterprisedb.com/postgres-tutorials/comprehensive-guide-how-tune-database-parameters-and-configuration-postgresql,
max_worker_processes Set this to the number of CPUs you want to share for PostgreSQL exclusively. This is the number of background processes the database engine can use. Setting this parameter will require a server restart. The default is 8.
The default is also 8
in AWS RDS Postgresql, no matter the Instance type (and thus number of vCPUs). Am I cheating myself by paying for a db.r5.12xlarge (48 CPUs) while using the default max_worker_processes
value?
-
1On v13, the RDS default is GREATEST(${DBInstanceVCPU*2},8)jjanes– jjanes2022年07月31日 00:27:01 +00:00Commented Jul 31, 2022 at 0:27
1 Answer 1
If you depend on large scale parallel query from just a few concurrent sessions to get your work done, then surely you have been cheating yourself. But if you don't, then probably not. For example, if you have a large number of simultaneous connections all submitting CPU intensive queries at the same time, you will probably be able to keep all 24 CPUs busy without any parallelization. ("virtual" CPUs doesn't mean much, for r5.12xlarge more than 24 CPU-intensive jobs running at the same time will start competing with each other for processing time, regardless of the number of "vCPU" that are claimed)
-
1Your answer seems to say that
max_worker_processes
is per-connection, but the EDB link says "This is the number of background processes the database engine can use." ISTM that is a system-wide number, not per-connection. What am I missing?RonJohn– RonJohn2022年07月31日 16:32:12 +00:00Commented Jul 31, 2022 at 16:32 -
1@RonJohn, sorry, I don't understand what part of my answer you read that way. Connections always get at least one process, regardless of max_worker_processes. It is only additional workers (parallel workers) that are restricted.jjanes– jjanes2022年07月31日 21:48:07 +00:00Commented Jul 31, 2022 at 21:48
-
It's not your answer, it's the EDB document.RonJohn– RonJohn2022年07月31日 22:20:22 +00:00Commented Jul 31, 2022 at 22:20
Explore related questions
See similar questions with these tags.