1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL Max-Connections memory usage...

Discussion in 'Server Configuration and Hosting' started by rainmotorsports, Nov 8, 2014.

  1. rainmotorsports

    rainmotorsports Well-Known Member

    So apparently its not a bug. MySQL allocates memory based on server "size". http://bugs.mysql.com/bug.php?id=68514 Some settings can easily allocate a lot more memory if above a certain point. Max-Connections at 300 the server uses around 150 mb to start at 310 it uses 450 mb to start.

    At 1GB of ram I have just enough to play with. But no config out of the box is pushing 500 mb for MySQL, under load testing this can easily start swapping and performance goes to crap. The percona config generator added to this usage (around 700mb) even at lower innodb buffer settings.

    So for giggles I replace everything except the InnoDB settings to the settings from MariaDB's shipped medium config https://github.com/atcurtis/mariadb/blob/master/support-files/my-medium.cnf.sh

    Under a 250 user, 1000 connection load test the server didn't use any swap, total usage 900mb of ram with mysql starting at 150 growing to around 300mb.

    The server performed great considering. So I went chasing what settings were throwing the usage up and it was none of the ones I thought. Just curious if anyone had danced this dance before?
    Xon likes this.

Share This Page