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

gefragt vor 5 Jahren477 Aufrufe
1 Antwort
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
beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen