I don't really know what's going on here at the moment:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1272 root 20 0 3829868 3.312g 1860 D 0.7 93.0 512:39.94 smbd
free -m tells:
total used free shared buffers cached Mem: 3644 3560 84 7 0 25 -/+ buffers/cache: 3533 110 <--- this is what bugs me Swap: 4292 2146 2146
[global] server role = standalone server map to guest = Bad User obey pam restrictions = Yes pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No usershare allow guests = Yes panic action = /usr/share/samba/panic-action %d idmap config * : backend = tdb [homes] comment = Home Directories valid users = %S create mask = 0700 directory mask = 0700 browseable = No [printers] comment = All Printers path = /var/spool/samba create mask = 0700 printable = Yes print ok = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/printers #I don't really know what's this, but... it was a working share in its time [media] path = /rem/media/ [rem] path = /rem/ force user = <rem owner username here> read only = No create mask = 0660 directory mask = 0770
EDIT: Restarting the
smbd service seems to solve the problem, BUT it keeps coming back approx. 2 hours after that.
EDIT2: After shutting down the
smbd service, everything seems to be OK:
total used free shared buffers cached Mem: 3644 123 3521 8 3 36 -/+ buffers/cache: 83 3561 Swap: 4292 230 4062
EDIT3: Here are some more details (asked by
- The question is: Why is samba eating that much ram?
- Distro: debian in case you can't read tags :P
- Access pattern? No idea what that is :P
- Large files: Not much, just 2-3 pcs. of 4GB files Small files: A LOT.
EDIT4: It seems like that samba isn't really reading/writing anything while eating RAM:
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND 1351 be/4 root 0.00 B/s 3.95 K/s 0.00 % 0.00 % smbd -D
EDIT5: Problem is half-solved using
Hastur's advice. Now we're waiting for clients to go ahead and index/scan/do whatever with the samba share what they want.
18992 root 20 0 283140 8916 6584 S 1.0 0.2 0:00.32 smbd 18983 root 20 0 284048 14964 11752 S 0.7 0.4 0:00.16 smbd
EDIT6: How interesting:
18983 root 20 0 2964080 2.564g 6044 R 92.1 72.0 853:58.94 smbd
Now it consumes memory AND CPU. Someone, please help! :)
EDIT7: Alright, limited the number of file locks & connections, but STILL NO CHANGE. Eats up my RAM like crazy! Well, at least it suddenly stopped eating CPU.
24606 root 20 0 3768932 3.325g 2332 D 17.3 93.4 1441:50 smbd
Any help is REALLY appreciated. I'm really close to writing a cron job restarting smbd every 24 hours.