awsdocs / amazon-aurora-user-guide

The open source version of the Amazon Aurora User Guide. You can provide feedback by submitting issues in this repo, or propose changes by submitting a pull request.
Other
53 stars 102 forks source link

Math on Aurora PostgreSQL max connections needs more explaining #15

Closed gmcelhoe closed 3 years ago

gmcelhoe commented 5 years ago

On the page https://github.com/awsdocs/amazon-aurora-user-guide/blob/master/doc_source/AuroraPostgreSQL.Managing.md

It says:

Setting the max_connections parameter to this equation makes sure that the number of allowed connection scales well with the size of the instance. For example, suppose your DB instance class is db.r4.large, which has 15.25 gibibytes (GiB) of memory. Then the maximum connections allowed is 1660, as shown in the following equation:

LEAST( (15.25 * 1000000000) / 9531392 ), 5000) = 1600

But a gibibyte contains 1073741824 (2^30) bytes, so mathematically the answer isn't 1660 as in the text, or 1600 as in the callout, but should be 1717.

buenks commented 3 years ago

Hello,

 Thanks for your feedback. You are correct that the equation should use GiB instead of GB. We have updated the example in the source doc and added an explanation of why the result is an approximation.

Regards, Terence