Hi,
Couple of older (IBM 8cpu/15GB ram) test servers experience swap full usage, running 18.04 LTS. Each server holding 11 containers 14.04 LTS and 18.04 LTS
Ram usage is around 5GB. SWAP 3.2/4GB vm.swappiness=30. This happens after full container export every night. During day I reboot containers and SWAP usage goes down to 200MB and holding until container export.
Doing some tests on that, so far memory usage is steady at 35MB or so during the export process, but that’s during the copy of the container and its compression, there may still be something wrong during the download stage which causes the tarball to be loaded in memory.
What memory counters were you tracking for LXD? Anything other than RSS isn’t very relevant for this.
Just did a full export of a 9GB large container and LXD stayed at a constant < 40MB the whole time.
What LXD version was that with? (3.10 has a bunch of fixes for such issues)
And if that was with 3.10, exactly what flags did you pass to lxc export, does your container have snapshots and what storage driver is used for its storage pool?
Ok, so yeah, I’d say try exporting with none see if disabling compression does the trick, if it does, then maybe try gzip as a less aggressive compression algorithm. gzip is the default for container exports in LXD releases that have that feature as those backups aren’t usually shared on the public internet so having them a bit bigger isn’t as much of an issue as for images.
I’ve also just tested current LXD to see if we had any memory issue during snapshot+publish+export and I’ve only seen memory usage go up by about 5MB during the publication and memory usage has since gone down (so just temporary allocation, not a leak).