[Samba] Restriciting memory usage for samba using Cgroups

Jonnavithula Sharma sarmajprs at gmail.com
Mon Aug 11 00:34:40 MDT 2014


Hi

Currently we are using cgroups to limit samba memory usage on our target

we have limited the memory to 20MB and we are able to see samba is
restricted to it.

With this we are able to restrict the cache memory to ~34MB (never goes
beyond this)

BUt issue we arere facing is the Buffers are increasing gradually and it is
not able to restrict.

Commands Used to restrict memory on target:

echo <samba pid >default/tasks
echo 20971520 > default/memory.limit_in_bytes

Initial memory status:
root at ltqcpe:/sys/fs/cgroup/memory# cat /proc/meminfo
MemTotal:         113760 kB
MemFree:           41692 kB
Buffers:            4108 kB
Cached:            30936 kB
SwapCached:            0 kB

After 5 hrs memory Status Looks like this
root at ltqcpe:/sys/fs/cgroup/memory# cat /proc/meminfo
cat /proMemTotal:         113760 kB
MemFree:            9744 kB
Buffers:           33448 kB
Cached:            32144 kB
SwapCached:            0 kB

Did some one faced this issue?
Could some one has any inputs to fix this problem?Is there any way to limit
buffers also

Other Details:

Linux Version : 3.10.12

Samba Version : 3.0.24

PS: We are doing 1gb file transfer(both read and write simultaneously) for
samba testing
Regards,
Sarma  J


More information about the samba mailing list