DB Connections Upper Limit

0

I've successfully increased the max_connections value for one of my replicas (db.m4.large) from the default provided by AWS using a parameter group. I am trying to figure out the maximum number of connections the DB can support.

I've ran some tests where I cause X number of connections to occur and then look at the change in freeable memory and get a rough calculation of freeable memory used per connection. I've ran many tests with different numbers of connections and load on the DB and it seems the freeable memory decrease is independent of the load on the DB and related to the number of connections.

I can use these data points to calculate a value for amount of freeable memory decrease per DB connection (~0.4-0.9 MB / connection), but I'm wondering how accurate or useful of a calculation this is in determining how many connections I can support. Some questions:

What else besides number of connections can cause freeable memory to decrease?

What is the limitation to how many DB connections you can have? Is it limited by freeable memory, CPU Utilization, something else?

Edited by: taylor10 on Feb 19, 2020 12:02 PM

已提問 5 年前檢視次數 476 次
1 個回答
0

Hello,

The below information is with respect to RDS MySQL:

-- The default value of 'max_connections' in RDS MySQL is specific to a particular DB instance type. This is because, this parameter depends on the RAM available for a DB instance.
Max_connections (default value) = ‘DBInstanceClassMemory (in bytes)/12582880’.

-- However, the allowed values for this parameter is 1-100000

-- Hence, you can consider modifying the parameter 'max_connections' in the parameter group associated with your DB instance. But, it is recommended to increase this value if the DB instance has sufficient resources (CPU , Memory) to serve increased connections. This is because, each connection requires resources, if the connections are increased to a value higher than what could be handled by the DB instance type, the connections may not get required resources resulting in performance issues.

Best regards,

Ashika

AWS
已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南