[clug] peformace of Containers vs virtual machines

George at Clug Clug at goproject.info
Sat Feb 3 11:49:53 UTC 2018


Sam,

Thanks for the explanation.

At this time, I find VMs easier to understand and configure. 

I think I need to do some (like lots) of further reading. Just maybe,
I can follow some simple instructions, and Docker does the rest for
me, without me truly understanding what is happening under the hood.
Though there is nothing like having an understanding what you are
doing.

George.

On Saturday, 03-02-2018 at 20:23 Sam Parkinson wrote:


Hi George,


I've done some Docker sysadmin stuff for various orgs over the last
few years. Hope some of this helps:


Docker is a container system that is geared towards containers that
run 1 app.  For example, you would have a container that only ran
your minecraft server, or a container that nginx, etc.  It has a lot
of tools that make it quick and easy to build containers; you just
write a `Dockerfile` that specifies commands to run to setup the
container.  Docker is an app that is quite focused on sysadmin
experience.


I'm not an expert in LXC, but I think it is more geared towards
containers as being just VMs with a different technology.


IIRC Docker does not limit the resources of the container by
default.  Containers are just processes running on your kernel; a
modern version of a chroot.  You can go an add limits; but possibly
more easy to change and configure than with libvirt.  This might
mean you get better performance for your game server, as it can use
the entire CPU.  (Or you can limit it if you don't want better perf)


Since docker containers run within the same kernel, there is less
overhead (as they are not a VM).  Obviously the extent of the
overhead removed depends on your configuration and CPU model.  I
can't find great benchmarks on the net, but results vary a lot [1][2].


One pitfall is docker does funky stuff in the network stack.  This
will introduce extra latency; which could impact your game server.


[1]
https://www.slideshare.net/Flux7Labs/performance-of-docker-vs-vms/18
[2] https://stackoverflow.com/a/26149994


On Sat, 2018-02-03 at 19:52 +1100, George at Clug via linux wrote:


Bob and other Container experienced people, My family loves playing
Minecraft, particularly Feed The Beast (FTB) mod packs like Infinity
and Direwolf 20. https://www.feed-the-beast.com/
https://www.feed-the-beast.com/projects/ftb-presents-direwolf20-1-12
At home we use a Debian KVM lib-virt server (32 GB RAM, i7) to run the
FTB server, while using Windows for the client computers. On the
windows clients these mods can use up to 12 GB of RAM and do not like
running in environments with less than 8 GB. The FTB server only
consumes about 3GB but it tends to max out the virtual CPU resources.
This causes lag in the game, and the FTB/minecraft server complains
about not being able to keep up.  I have tried adding more cores,
and/or CPUs but this has not helped.  Maybe there is a way in
virt-manager where I can allocate more CPU resources by using other
means? The Debian server exists for our family to play networked
games, naturally we tend to play only one game at a time, sometimes
this will be a vanilla minecraft, other times FTB, other times Ark
Survival Evolved, etc. Bob, Do you think I would get better
performance from using Containers? As I am using Debian, which
container system should I install ?  Doing a search on the internet
there seems to be Linux Containers (LCX) and Docker.  Are these
things the same? or are they alternative container systems?  Is one
the management system for the other?  (I should not be so lazy in
asking and just do some reading) https://wiki.debian.org/Docker Docker
[1] is a solution for the management of lightweight process
containers. https://wiki.debian.org/LXC Linux Containers (LXC) provide
a Free Software virtualization system for computers running GNU/Linux.
I have never bothered using Containers previously. I have enjoyed
using Virtual Machines and previously these have been adequate. Sadly
heavily modded minecraft servers tend to consume lots of CPU
resources. Comments, please... George. Links: ------ [1]
http://docker.io/


More information about the linux mailing list