Memory leak inside LXC?

riku

New Member
Oct 18, 2016
2
0
1
41
Heya,

Have this problem when copying files, memory of container gones full and after that nothing happens it just stays like that. i can use container normally with memory full, no problems, only its abit slow...
Im looking a way or command to empty that memory without reboot container. as seeing host and guest OS nothing taking 8Gig of ram via ps or top. actually i have no idea where that memory goes.. funniest part they are not in cache..

# free -m
total used free shared buff/cache available
Mem: 8192 8137 54 166 0 54
Swap: 1024 18 1005
TOP:
top - 17:09:56 up 17:41, 3 users, load average: 1.21, 1.14, 1.13
Tasks: 65 total, 1 running, 64 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.0 us, 1.7 sy, 0.0 ni, 89.4 id, 0.8 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8388608 total, 47084 free, 8341524 used, 0 buff/cache
KiB Swap: 1048576 total, 1030796 free, 17780 used. 47084 avail Mem

To replicate this problem:
Install proxmox, upgrade it.
Install ubuntu16 lxc container from pre-images.
Set setting lxc.aa_profile: unconfined (for allow temporally nfs mount inside container)
Mount nfs over internet using IPv6. (haven't tested old ip4)
Copy via mc(midnight commander) few gigs of random files.

you will see memory slowly going up and up and up while copying. after copy is ready memory stays like that.
container work with memory full, but i guess it need reboot.
Why im copying over NFS? answer is im only moving files from old server to a new place. now this came, i wonder if i need to move KVM..?
 
that's a bug in lxcfs, should be fixed in our version soon (and hopefully upstream as well). it's just cosmetic though - the memory is still cached, and it is freed when requested just like cached memory should be.
 
  • Like
Reactions: riku
thanks fabian for the answer. this helped me, i stopped to search a solution :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!