LXC/mdadm/SMB : Memory leakage during large file transfer by SMB protocol

Blais

Well-Known Member
Mar 28, 2017
32
5
48
To sum up, I have a debian LXC container running samba4. I share a network directory that is a PVE mount point (mp0) on a RAID10 directory with mdadm.


During the transfer of large file in writing to the SAMBA4 server, I have a drop in RAM that tends to 0 from the container, verifiable with the 'top' command.
This is worrisome because when it's zero, I have the transfer that also falls to zero, the pve kernel that logs a samba4 crash.

I tried on another container with the samba4 packages proposed with debian. I have the same problem.
However, on a virtual machine (kvm), with a sata1 mount point, I no longer have the problem, the transfer is done without memory loss.

I tested other mount point, like a ZFS0 with 2 disks, no problem, just like a ZFS0 SSD.

Apart from passing the RAID10 to ZFS, a track to dig?
 

Attachments

  • pvelxcsamba.log
    6.4 KB · Views: 10
Most Probably the host kernel killed the samba process because it was using more memory that the whole container 103 was allowed to use:
* [ 1044.690344] Memory cgroup out of memory: Kill process 17172 (smbd) score 23 or sacrifice child
* Task in /lxc/103/ns/system.slice killed as a result of limit of /lxc/103

Allocate more RAM to your container or use Samba in a VM
 
It seems that mdadm and zfs have trouble living together, even in a virtual machine.
In fact, when I did my tests, mdadm wasn't loaded, so I did have a good result with zfs.

I deleted mdadm to go to zfs.
 

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!