I've been looking in a lot of places so far but I couldn't find any articles about how much memory to allocate to MySQL based on server size.

I am about to deploy a website on a relatively small vserver with the following specs: 500 mb ram 20 gb SSD Ubuntu 14.04 64bit 1 virtual CPU (my provider doesn't specify speed).

With the server running idle (i.e website has no traffic), I get these values after rebooting:


It runs exclusively apache+mysql. The number of concurrent users is expected to be low for starters (<20).

What should be some sensible values for mysql's memory allocation for this case? And are there any other settings I can use to make sure the server resources are being used to their full extent?

  • 1
    You haven't got enough usage to worry about this. Come back when your server is actually being utilized. Nov 22, 2015 at 13:10
  • thanks, I suspected the same as well but wanted to make sure.
    – jonnybravo
    Nov 22, 2015 at 13:15
  • You should create a swap partition. If the load on the server increases enough to fill up your memory, a swap partition will give you a performance boost.
    – kasperd
    Nov 22, 2015 at 22:01

1 Answer 1


Percona Configuration Wizard for MySQL is a nice tool to aid in MySQL configuration. It tries to provide a valid my.ini config file for your MySQL instance, based on many criteria like workload type, available RAM, CPU cores, MySQL version, etc. Requires registration.

Not the answer you're looking for? Browse other questions tagged or ask your own question.