[Lxc-users] cgroup behavior
David Parks
davidparks21 at yahoo.com
Sat Apr 13 03:12:05 UTC 2013
Speaking of cgroup behavior, you reminded me, I have an open question that
nobody managed to pick up on unix.stackexchange.com regarding blkio not
working as expected, maybe you can take a stab at it...
I've got 2 LXC containers with these cgroup settings:
lxc.cgroup.blkio.weight = 200
lxc.cgroup.cpu.shares = 200
and another container with:
lxc.cgroup.blkio.weight = 800
lxc.cgroup.cpu.shares = 800
I have verified in /sys/fs/cgroup/blkio/lxc/<container-name>/blkio.weight is
indeed set to 200 on the host OS.
I have verified that cpu.shares are indeed split up, 80% to container 1 and
20% to container 2.
But when I run this command in both containers:
# write a 10GB file to disk
dd bs=1M count=10000 if=/dev/zero of=1test conv=fdatasync
I ran a similar test on reads.:
davidparks21 at test-cgroups1:/tmp$ time sh -c "dd if=1test of=/dev/null bs=1M"
10000+0 records in
10000+0 records out
10485760000 bytes (10 GB) copied, 37.9176 s, 277 MB/s
real 0m37.939s
user 0m0.004s
sys 0m24.306s
The IO speeds see in iotop on the host OS are virtually the same between the
two containers.
I expected to see container 2 command 80% of the IO access in this case.
-----Original Message-----
From: Serge Hallyn [mailto:serge.hallyn at ubuntu.com]
Sent: Saturday, April 13, 2013 12:22 AM
To: David Parks
Cc: lxc-users at lists.sourceforge.net
Subject: Re: [Lxc-users] Very odd lxc behavior
Quoting David Parks ( <mailto:davidparks21 at yahoo.com>
davidparks21 at yahoo.com):
> Vanilla 12.10 Ubuntu server:
>
>
>
> root at atlas01:~# sudo lxc-version
>
> lxc version: 0.8.0-rc1
>
>
>
> I may very well have accidentally tried to start the same container
> twice, I think I fat-fingered something just before encountering the
> issue, and I've never had it happen on any of our other boxes. Anyway,
> it's of no real consequence to me now as I cleared it easily enough,
> but I thought it worth mentioning.
Thanks. Yeah 0.8.0 didn't yet have the new cgroup behavior, I don't think.
-serge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130413/b0b183fd/attachment.html>
More information about the lxc-users
mailing list