# Calculate ram usage of max\_connections?

**URL:** <https://forums.percona.com/t/calculate-ram-usage-of-max-connections/698>\
**Category:** Other MySQL® Questions\
**Created:** [April 3, 2008, 2:32am UTC](https://forums.percona.com/t/calculate-ram-usage-of-max-connections/698 "2008-04-03T02:32:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![3molo](https://avatars.discourse-cdn.com/v4/letter/3/b19c9b/32.png) [@3molo](https://forums.percona.com/u/3molo)\
**Post date:** [April 3, 2008, 2:32am UTC](https://forums.percona.com/t/calculate-ram-usage-of-max-connections/698/1 "2008-04-03T02:32:05Z")

</div>

Hi,

I need to calculate how much memory a raise of max\_connections the mysqld will consume. Got any tips?

---

<div class="post-metadata">

**Author:** ![debug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/debug/32/772_2.png) [@debug](https://forums.percona.com/u/debug)\
**Post date:** [April 3, 2008, 3:47am UTC](https://forums.percona.com/t/calculate-ram-usage-of-max-connections/698/2 "2008-04-03T03:47:23Z")

</div>

Increasing number of max\_connections does not cause more RAM usage (while connections are not used).

---

<div class="post-metadata">

**Author:** ![3molo](https://avatars.discourse-cdn.com/v4/letter/3/b19c9b/32.png) [@3molo](https://forums.percona.com/u/3molo)\
**Post date:** [April 3, 2008, 3:48am UTC](https://forums.percona.com/t/calculate-ram-usage-of-max-connections/698/3 "2008-04-03T03:48:54Z")

</div>

But they do if they are in use, and I’d like to calculate the consequence of a significant raise.

based on a case where nearly all are in use…

---

<div class="post-metadata">

**Author:** ![debug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/debug/32/772_2.png) [@debug](https://forums.percona.com/u/debug)\
**Post date:** [April 3, 2008, 3:52am UTC](https://forums.percona.com/t/calculate-ram-usage-of-max-connections/698/4 "2008-04-03T03:52:28Z")

</div>

Hmm, it depends on what are clients really doing… Without knowing it it’s not possible to say anything about RAM usage. Just imagine, for example, one client can do select which will create temporary table, and it will use a lot of RAM. And another client can do nothing, just keep connection open, and so on…
