Should I put my MySQL database on a separate server?

November 13, 2014 2.5k views

Hi. I currently use a droplet with 2GB of RAM running Ubuntu. It runs fine, but of course MySQL consumes all the RAM it can find. Apache is set to run 12 threads at about 90MB each.

Would it make sense to rather put the DB on a separate droplet in the same datacenter and reduce the size of the web server droplet to 1GB?


  • Here's are two of the Wordpress sites on that server


  • This is a great question. If you end up doing this, could you post your results for posterity?

    My guess is that it depends on how much traffic your site gets. If your site(s) are low-traffic, it probably would not make one bit of difference, while high-traffic sites would really benefit...but that is all speculation.

    It would be great to hear about your experience.

  • It's been over a year I know but seeing that you had Wordpress at the time and having 12 apache threads at 90MB makes me think you did not have PHP-FPM enabled. I'm no expert but for what I've read it should help by reducing the apache threads size. Did you have PHP-FPM implemented? If not, have you tried it?

2 Answers

install swap on the droplet and you should be good to go

you should not need a separate droplet just for mysql

  • Yes, I have installed 1 GB of swap. Like I said - it runs fine.

    My question was not about what is absolutely necessary, it was more about optimization and possible performance advantages.

  • OK, I separated them. MySQL running with 1GB of RAM, and Apache on another server also with 1GB of RAM.

    Man it's sweet!

    Just using tcp/ip port 3306, not SOCKS.

    Apache now has loads of RAM to work with.

OK, here is what I have at the moment.

Since separating the DB and Apache onto two separate droplets, my web server has become a happy chappie. it seldom swaps now, and just runs smooth as silk.

I have added a few virtual hosts to apache since then, the traffic load has increased heaps, and still it runs beautifully.

The DB server hardly ever breaks a sweat.

Love it!

Have another answer? Share your knowledge.