0

Use case: We have a couple of webservers that we're going to overload with 2 application server components in the short term.

In the long run we'll migrate the application server components off the webservers and onto dedicated hardware (as usage grows and we acquire more hardware).

We're looking at using KVM to create separate guest OS's so that we can develop (in test) the individual applications separately, and when it comes time to migrate them off, the process is much more simple because we're moving full VMs. This will also ensure we have consistent OS configurations because it's easier to manage a standard VM image than it is to manage raw disk images.

A secondary benefit is being able to launch VMs for the purpose of upgrading server components on production hardware without needing a 2nd set of hardware (while budget limits our hardware spend).

The question is this:

  • We want all cpu resources shared 100% between the webserver and application server components. Meaning I'd assign all 8 cores to all VMs. Is this ok, or does anyone see any red flags in this reasoning?
davidparks21
  • 1,088

4 Answers4

3

I would use Linux Containers (LXC) instead of a full-on hypervisor (KVM, ESXi, etc.) for this purpose.

Example here.

This gives you the access to the physical resources, network and OS isolation, but doesn't have the overhead and management complexity of KVM. The "OS" resides in a normal filesystem directory tree (an enhanced chroot).

Please specify which Linux OS distribution you're using.

ewwhite
  • 201,205
0

Yes, you can over-allocate your vCPUs. Whether or not it will cause problems depends almost entirely on the workload. The timing overhead could come into play if the VMs demand more threads at the same time then the number of pCPUs. This is something that you would want to keep a closer eye on regardless though.

If you are planning to stress test the VMs together, then you'll see degraded performance. If you only plan to stress one VM while the others are idle, the performance difference won't be as great.

lmickh
  • 360
0

Do those VMs really need 8 cores? If not, I'd stick to what they need. A KVM virtual CPU, looks just like a process to the host, and the host might schedule it on any physical CPU anyway (unless you pin it to a specific CPU). Overallocation without need is no biggie, but avoiding it cuts down the amount of processes the host needs to be able to schedule, and makes the Linux scheduler's life easier

dyasny
  • 19,257
0

We want all cpu resources shared 100% between the webserver and application server components.

That is exactly what your operating system is for. You cannot over-provision CPU resources as you are suggesting. If you really want isolation, but with shared resources, you'll want to you Docker (containers) as they are exactly that: Operating System Level Virtualization.