Is 1:1 the ideal VM consolidation ratio when using containers (e.g. Docker)? [closed]

Here’s my problem:

  • I have some servers
  • I want to deploy REST services as Docker containers (but it shouldn’t really matter what I’m doing – they’re containers)
  • I want to run those in a VM – my understanding is that this is common – my question is not “whether to run Docker on bare metal or not” that’s already addressed elsewhere on the web e.g. https://blog.docker.com/2016/04/physical-virtual-container-deployment/

My understanding is that often you want a high ratio of VMs to physical servers (consolidation ratio), but if all you plan to deploy to your VMs is Docker containers is there any reason to have more than 1 VM per physical server?

Answer

Thanks for the clarification but my original answer still is a good fit (I believe).

What you’re doing is essentially running the Docker containers bare metal. At least if you’re really going to fix a single VM to a physical machine. You’re just adding an additional layer of virtualization to it. Usually this would give you some more options in regard to resource limits etc. but if you’re really matching 1 VM to 1 physical machine you won’t use any of that.

The blog you linked in your clarification already tells you as much and also gives you a list of things to consider whenever your should run bare metal or inside a VM.

How much load do those REST services produce? Will they “saturate” that one physical machine? What additional licensing costs will you have by extending virtual environment by one physical machine? As you already said yourself you usually want a high amount of VMs per physical machine to increase the utilization of the hardware. On the other hand you always want that amount to be low enough to have enough spare resources to handle sudden surges and generally be able to smoothly operate those VMs.

Will those Docker Containers use enough Memory, CPU power etc. to effectively utilize the hardware if you look at your average and max load that those Docker Containers cause? If so you probably could go for a 1:1 match. If they don’t you probably could add more VMs to that one physical machine.

Attribution
Source : Link , Question Author : Charlie , Answer Author : Seth

Leave a Comment