Linux – Does LXC container performance depends of host load

benchmarklinuxlxcperformancevirtualization

I am wondering if LXC could offer a full isolated benchmarking environment.
Let's say we have 2 identical machines, with the same fresh Linux and without network connection.

First machine has a load average of 50 and second one only 1.

I put the same container on both machines and run a benchmark of any program.

Would be the performance the same on both machines?

If not, do you know a better way to have a full isolated environment? I mean, a virtualization way to have the same performance without depending of the host average/current load.

Thanks 🙂

Best Answer

LXC relies on control groups for resource management. Control groups aren't limited to LXC, you can use them for normal processes on your systems as well. In theory, you could configure control groups such that your container is guaranteed an certain share of a resource (e.g. cpu time) on each system, no matter how many other processes are competing for that resource. For more information see Red Hat's Resource Management Guide.

Related Topic