Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 8GB RAM Linux server which will be running Apache and mysql. First I was thinking of chrooting mysql (and apache) but then thought of putting mysql in a virtual machine on the same server, say a kvm guest with enough RAM dedicated to it (e.g. half, or 4GB). One reason was that this solution - provided that the kvm guest host has gone through the Linux hardening process - would be more secure than having a regular chroot. But I thought another reason would be to make the setup more "stable" in the sense that mysql would not interfere with apache as much as when both are on the same server. I mean, even if they are both on a same physical server, keeping mysql in a separate virtual machine surely would make memory, cpu, etc more controllable. Is this a recommended setup? Also, would mysql performance suffer from having it inside a VM?

Edit: debian 64 bit, kernel 3.7.4, dedicated server with nothing else on.

share|improve this question

closed as not constructive by Sven, Michael Hampton, Tom O'Connor, mdpc, Ward Jan 27 '13 at 21:07

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Which OS/distribution/kernel are you running? – ewwhite Jan 27 '13 at 19:20
up vote 2 down vote accepted

For that type of setup, I would either run the applications natively and let the OS handle resource management, or consider using a virtualization container solution like LXC to provide isolation.

Going with a full virtualization suite may be overkill for this application.

Despite this, you have't clarified the OS distribution/kernel version or whether this is dedicated hardware or not.


With Debian, definitely try the LXC approach. The Debian LXC guide is here:

share|improve this answer
This is an excellent use case for containers. – sysadmin1138 Jan 27 '13 at 19:23
I didn't know about LXC. It looks very promising. Thanks! – user156309 Jan 27 '13 at 19:32

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