Dear readers, I'm not sure if this is a bug or a problem we are causing which is why I'm posting to the list first in the hope that someone else might have come across it. We have been using Samba quite successfully for a number of years. However, with this new setup we have a problem. We're using Samba as a backend for a web farm - 6 or 7 Windows servers running IIS with all the website data under UNC paths and all the anonymous web users and app pools running as domain users. Samba itself uses an LDAP backend. This setup works very nicely for our needs however we have an issue in that each Samba process belonging to one of the web servers seems to consume RAM indefinitely until it is killed. When the servers are busy each thread can use 1GB in 20 minutes. Obviously this is extremely abnormal memory usage. My only guess is that, when a page is requested on a website and not found, Samba allocates the memory and does not free it? We have tried Samba 3.0, 3.2 and 3.3 (various iterations) and have experienced exactly the same problem. Can anyone offer any insight. I would be most grateful. Martin. [global] csc policy = disable deadtime = 25 dead time = 25 admin users = root max mux = 5000000 max open files = 5000000 workgroup = PWMDERBY netbios name = GAR enable privileges = yes smb ports = 139 445 server string = Samba Server %v security = user encrypt passwords = Yes obey pam restrictions = No ldap passwd sync = Yes ldap timeout = 5 log level = 0 syslog = 0 log file = /var/log/samba/log.%m max log size = 5000000 time server = Yes socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192 mangling method = hash2 Dos charset = 850 Unix charset = ISO8859-1 domain logons = Yes os level = 255 preferred master = Yes domain master = Yes wins support = Yes passdb backend = ldapsam:"ldap://192.168.1.4"
On Thu, Apr 30, 2009 at 02:55:46PM +0100, Martin Edwards wrote:> I'm not sure if this is a bug or a problem we are causing which is why I'm > posting to the list first in the hope that someone else might have come > across it. > > We have been using Samba quite successfully for a number of years. However, > with this new setup we have a problem. > > We're using Samba as a backend for a web farm - 6 or 7 Windows servers > running IIS with all the website data under UNC paths and all the anonymous > web users and app pools running as domain users. > > Samba itself uses an LDAP backend. > > This setup works very nicely for our needs however we have an issue in that > each Samba process belonging to one of the web servers seems to consume RAM > indefinitely until it is killed. When the servers are busy each thread can > use 1GB in 20 minutes. > > Obviously this is extremely abnormal memory usage. > > My only guess is that, when a page is requested on a website and not found, > Samba allocates the memory and does not free it? > > We have tried Samba 3.0, 3.2 and 3.3 (various iterations) and have > experienced exactly the same problem. > > Can anyone offer any insight. I would be most grateful.Two steps: Can you run "smbcontrol <pid> pool-usage" on a moderately large smbd and send the result? If that does not show anything suspicious, we will ask you to run it under valgrind --tool=memcheck. Be aware that this *significantly* slows down operation, so you might need some kind of plan how to do this. But it is the safest way to find out what's going on. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20090501/85335878/attachment.bin