0

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?

asked Jul 30, 2022 at 15:52
1
  • 1
    On v13, the RDS default is GREATEST(${DBInstanceVCPU*2},8) Commented Jul 31, 2022 at 0:27

1 Answer 1

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)

answered Jul 31, 2022 at 14:21
3
  • 1
    Your 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? Commented 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. Commented Jul 31, 2022 at 21:48
  • It's not your answer, it's the EDB document. Commented Jul 31, 2022 at 22:20

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.