-- DESCRIPTION -- When a file is copied to a share, RAM usage is vastly increased. After the file is copied, the RAM is not cleared. When the file is deleted, RAM gets freed. -- STEPS TO REPRODUCE -- 1) Copy a big file (say, 200M) to a share 2) Observe vastly increased RAM usage -- CONFIGURATION -- http://pastebin.com/e5bz4gB1 -- SCREENSHOTS -- Initial state: http://storage1.static.itmages.ru/i/12/0606/h_1338993271_8994384_3ac670a82e.png File copied: http://storage3.static.itmages.ru/i/12/0606/h_1338993354_2045405_1adb05b18a.png File removed: http://storage5.static.itmages.ru/i/12/0606/h_1338993369_5787834_adb2e1bb6c.png -- SYSTEM INFO -- NETGEAR WNDR3800 ar71xx mips_r2 OpenWrt Attidute Adjustment r32055 Linux kernel 3.3.8 Samba 3.6.5-2
RSS for smbd while the copy happens is still at roughly 1.5MB, which is not much. This is all samba can control. I would guess this is buffer cache. Please send the output of the "free" command to make sure this is the case.
Here is the output of "free" after the file was copied: total used free shared buffers Mem: 126968 124316 2652 0 5336 -/+ buffers: 118980 7988 Swap: 600060 0 600060 And after the file was deleted: total used free shared buffers Mem: 126968 31428 95540 0 5344 -/+ buffers: 26084 100884 Swap: 600060 0 600060
Then it is another command in user space taking the memory. The smbd that is shown in the "file being copied" screenshot is not that one. Please send the output of ps uax while memory usage is high
Busybox has a limited ps, there are no 'a', 'u' and 'x' options. This is the only I could get: http://pastebin.com/cBjpcy3h If this is not enough, I'll try to find a full 'ps' binary or build one.
Well, without further diagnosis you will not be able to fix it. "free" reports high memory use, but the system does not give you more information. So you are stuck. Please contact your vendor for more information.
This has something to do with cache. Maybe there's a column in htop that will show what program uses it?
Closing as "WORKSFORME". I don't see any high memory use in the information provided that smbd can directly influence. If the kernel sits on memory, there is nothing smbd can do about this.