[systemd-devel] [nspawn] Could you plz explain me, about resources

Michal Koutný mkoutny at suse.com
Fri Mar 6 12:56:02 UTC 2020


Hello.

On Sat, Feb 15, 2020 at 07:33:52PM +0300, Хиль  Эдуард <i.am.test at mail.ru> wrote:
> Hi there! I am new for containers and i try systemd-nspawn . I created my first container with
>  
> MemoryHigh=100M
> MemoryMax=100M
> MemorySwapMax=1M
>  
> but _inside_ container i see all host resources (for example — 1Gb RAM).
How do you check for the resources available inside the container?
Also, do you use the unified hierarchy?

> All i want — see inside containers actual limits for this container as
> done in LXC with lxcfs. Is this possible? And if not, could you please
> explain to me why?
You should see the configured limits on the root cgroup in the
container's namespace. The cgroup limits won't propagate into
systemd-wide interfaces such as /proc/meminfo.

Michal


More information about the systemd-devel mailing list