Re: Checking memory limit inside a container

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

 



(2012/04/19 8:13), Matt Chapman wrote:

> Hello,
> 
> I'm new to using LXC, but really impressed so far. I'm trying to set-up
> memory limits for a container, and have added these lines to my container
> config file:
> 
> lxc.cgroup.memory.limit_in_bytes = 15872M
> lxc.cgroup.memory.memsw.limit_in_bytes = 16896M
> 
> ...and I've stopped & restarted my container.
> 
> But from inside the container, using `free` or `top`,etc, still reports the
> total available memory as that of the host system, not what has been
> allocated to the container.
> 


Yes, now, usual commands see /proc/meminfo, it's not virtualized yet.
We have plans but...it's not implemented yet.

> Is this normal, or does it suggest I did something wrong? Is there a way to
> accurately check memory usage for a container from within that container?
> Or even from the host system?
> 


IIUC, the only way we have is

  # cat /path-to-cgroup/memory.usage_in_bytes
  # cat /path-to-cgroup/memory.stat

Or you can use some libcgroup commands as cgget...
I'm sorry if I don't know existing useful lxc memory checker.

Thanks,
-Kame

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux