Reduce memory limit on lxc container

Hello,
Spun up a stretch container for xmpp service. It has 2g of ram available to it. Little more than I would like. Can anyone advice me on how to drop it down?

best regards

You can try this: https://blog.codeship.com/lxc-memory-limit/

TLDR; Setting lxc.cgroup.memory.limit_in_bytes in container config:

lxc.cgroup.memory.limit_in_bytes = 2560M

2 Likes

Where are the configs for individual containers. Poking around and it is not immediately apparent to me. Thanks for fast reply btw!

Actually memory consumption dropped way down while I was out. Perhaps I don’t need to worry about it. I will monitor it and do some reading to get up to speed.

Thank you

If you use the default configuration your containers should be under /srv/lxc, so config is /srv/lxc/<name-of-container>/config.

2 Likes

Roger that

Have a great day and thanks again.