Reduce memory limit on lxc container

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:

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

lxc.cgroup.memory.limit_in_bytes = 2560M


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.


Roger that

Have a great day and thanks again.