On 05/05/2013 09:21 AM, Alexander Gladysh wrote:
On Sun, May 5, 2013 at 4:46 PM, Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx> wrote:On Sun, May 5, 2013 at 1:00 PM, Alexander Gladysh <agladysh@xxxxxxxxx> wrote:I mean that we were *not* happy with the level of isolation that OpenVZ provided (several years ago). Are there any texts documenting experience with LXC under high load scenarios? I'm especially interested in rationing HDD between several VMs (containers?), including a few very aggressive HDD users. In our experience, this is somewhat problematic even for Xen (but it is possible that we don't wield it good enough).Seriously just get SSD. You cannot expect to ration 100iops sanely between multiple processes and get anything much useful for aggressive users. Suspect you have marginally more control under lxc as all the requests are seen by the same kernel. You end up with pretty much the same tools, or you can customise the elevator. But an SSD is much more useful.The point is to avoid degradation of performance for non-aggressive users if aggressive ones get carried away. (Just in case: by user here and above I meant a VM.) If aggressive users do get carried away, they are to be fixed and optimized. But this is not instantaneous. Meanwhile rest of the system should work (possibly in a gracefully degraded mode). Otherwise virtual cluster tends to "blow up" with unpleasant consequences.
Awesome thread. On the topic of cgroups, one of the subsystems is blkio, which I think can be used for your use case:
https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/ch-Subsystems_and_Tunable_Parameters.html#sec-blkioI haven't used this subsystem myself, but I do aggressively use other subsystems (e.g. cpusets). It's fairly straightforward to launch LuaJIT in its own LXC container, especially on Ubuntu, and test these cgroup settings. Generally you should use newer kernels with it (like 3.8). It's a very different, lightweight thing compared to full-on virtualization. You can also use unix sockets with them so you can have your LuaJIT container efficiently talk to your isolated-in-a-container Redis server on the same physical box -- and set it up so only some set of containers can see that unix socket file.
-Evan