Re: [Lxc-users] How to make lxc-cgroup work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting 陳韋任 (Wei-Ren Chen) (chenwj@xxxxxxxxxxxxxxxxx):
> Hi all,
> 
>   Sorry for the newbie question. But I am confused on how to make cgroup
> work on lxc. When I type `lxc-cgroup`, the command gave me the error
> below:
> 
>   $ lxc-cgroup -n ubuntu cpu.shares
>   lxc-cgroup: open /sys/fs/cgroup/cpu//lxc/ubuntu/cpu.shares : No such file or directory
>   lxc-cgroup: failed to retrieve value of 'cpu.shares' for 'ubuntu'
> 
> The articles I read mostly do this at the beginning:
> 
>   $ mkdir /cgroup
>   $ echo "cgroup  /cgroup  cgroup  defaults   0   0" >> /etc/fstab
>   $ mount cgroup
> 
> I didn't do that because it seems the system already mount cgroup on
> /sys/fs. My question is how to make lxc-cgroup work? Should I create

What kind of system are you on?  On ubuntu you'll generally have the
cgroup-lite package installed, so that /sys/fs/cgroup/ has one
subdirectory for each cgroup controller.  So/sys/fs/cgroup/cpu has
the cpu controller mounted, /sys/fs/cgroup/freezer has the freezer
subsystem, etc.

> ubuntu directory under /sys/fs/cgroup/cpu/lxc, then everything works?
> 
>   The other question I believe most relate to the virtual machine
> manager. When I edit lxc container through the vmm, there is an CPU
> limits option. Does that option work? Because from the top or
> /proc/cpuinfo I don't see the limit I set works.

What is the virtual machine manager?  Sounds like you're using
libvirt?

/proc/cpuinfo will not reflect limits set by cgroups.

-serge

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux