Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.

Edit:

With Debian, definitely try the LXC approach. The Debian LXC guide is here: http://wiki.debian.org/LXC

share|improve this answer
2  
This is an excellent use case for containers. –  sysadmin1138 Jan 27 '13 at 19:23
1  
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.