Discussion Locked

Samba server memory problem

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I setup a samba server with a homes share on it for about 100 users (made it a member server on a NT domain). The problem is that when users copy files to it (Win98 /98SE clients), smbd sucks up memory like a vacuum and when the user logs off, smbddoesn't give the memory back (the load on the machine never goes past 0.15). The server (running RH 6.2 and samba 2.0.7) has 320MB of pshysical RAM and 640MB of swap and every day it seems smbd sucks up enough RAM to hit the swap. There aren't anyother processes running on it except SSH2D and HTTPD (apache). I use SSH2 to log into the server and HTTPD locally with SWAT to check on the shares besides using smbstatus. Is there any way to stop having samba eat up the RAM. I know that smbd takes up 2mb of RAM by itself and that each client connecting eats up 768k so in theory it should only use about 100MB tops of RAM and not close to 500.

Tracy

5 replies

by crystalknight

I've encountered the same problem before when installing on other servers. The most common i've seen is a P3 600 with 512Megs Physical & 1 gig swap for about 170 - 220 people. It ate around 900 megs ram as well, here's what i had to do to fix this...

In the 'smb.conf' file in your /etc directory, you need to modify the global settings. there's a few settings that you'll need to put a cap on....

max disk size
max open files
read size
shared mem size

to check your stats do a 'testparm | more' most likely your culprit will be shared mem size, mine was 942,536,942 bytes! once i forced a cap on it [shared mem size], and reduced max open files to 10k it fixed it.

Hope it helps,
l8r

This discussion is closed to new replies.