Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-06-11 Thread Volker Lendecke
On Sat, May 16, 2009 at 09:40:16AM +0100, Martin Edwards wrote:
> It looks like we've fixed this.  It seems msdfs is on by default.  By chance
> I disabled it:
> 
> host msdfs = no
> 
> No more memory leak!
> 
> At some point I will endeavour to recreate the old problem on a test box and
> find out why msdfs causes the memory leak and report back to the list.

Any news here?

Thanks,

Volker


pgpzl29SJFaqo.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-16 Thread Volker Lendecke
On Sat, May 16, 2009 at 09:40:16AM +0100, Martin Edwards wrote:
> It looks like we've fixed this.  It seems msdfs is on by default.  By chance
> I disabled it:
> 
> host msdfs = no
> 
> No more memory leak!
> 
> At some point I will endeavour to recreate the old problem on a test box and
> find out why msdfs causes the memory leak and report back to the list.
> 
> Thank you for all your help.

Thanks a lot for that feedback!

If you can, please run that test box with valgrind --tool=memcheck

If you need any assistance with this, feel free to ask! I
*really* want to fix this :-)

Volker


pgpBMSwr6Xws0.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-16 Thread Martin Edwards
It looks like we've fixed this.  It seems msdfs is on by default.  By chance
I disabled it:

host msdfs = no

No more memory leak!

At some point I will endeavour to recreate the old problem on a test box and
find out why msdfs causes the memory leak and report back to the list.

Thank you for all your help.

On Mon, May 11, 2009 at 10:00 PM, Martin Edwards <
martin.f.edwa...@googlemail.com> wrote:

> We will endeavour to do this on a test system in the next few days.
>
> Thanks once again for your assistance.
>
>
> On Mon, May 11, 2009 at 10:18 AM, Volker Lendecke <
> volker.lende...@sernet.de> wrote:
>
>> On Mon, May 11, 2009 at 10:11:50AM +0100, Martin Edwards wrote:
>> > Do you think notifies could be responsible for the memory leak?  Despite
>> > there being all of those entries they don't add up to anything like the
>> > usage of the process.
>>
>> It might be possible that we have a leak somewhere around
>> the notifies. Notifies are an operation that normal clients
>> do a lot less than IIS, that's why I think it might be that.
>>
>> Do you see a chance to run a test smbd with comparable load
>> under valgrind? This would almost 100% show the real leak.
>>
>> Volker
>>
>
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-11 Thread Martin Edwards
We will endeavour to do this on a test system in the next few days.

Thanks once again for your assistance.

On Mon, May 11, 2009 at 10:18 AM, Volker Lendecke  wrote:

> On Mon, May 11, 2009 at 10:11:50AM +0100, Martin Edwards wrote:
> > Do you think notifies could be responsible for the memory leak?  Despite
> > there being all of those entries they don't add up to anything like the
> > usage of the process.
>
> It might be possible that we have a leak somewhere around
> the notifies. Notifies are an operation that normal clients
> do a lot less than IIS, that's why I think it might be that.
>
> Do you see a chance to run a test smbd with comparable load
> under valgrind? This would almost 100% show the real leak.
>
> Volker
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-11 Thread Volker Lendecke
On Mon, May 11, 2009 at 10:11:50AM +0100, Martin Edwards wrote:
> Do you think notifies could be responsible for the memory leak?  Despite
> there being all of those entries they don't add up to anything like the
> usage of the process.

It might be possible that we have a leak somewhere around
the notifies. Notifies are an operation that normal clients
do a lot less than IIS, that's why I think it might be that.

Do you see a chance to run a test smbd with comparable load
under valgrind? This would almost 100% show the real leak.

Volker


pgpTcqf13opXy.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-11 Thread Martin Edwards
Do you think notifies could be responsible for the memory leak?  Despite
there being all of those entries they don't add up to anything like the
usage of the process.


On Mon, May 11, 2009 at 9:55 AM, Volker Lendecke
wrote:

> On Mon, May 11, 2009 at 09:31:48AM +0100, Martin Edwards wrote:
> > Sorry it's taken so long to reply.  The pool-usage output for one such
> > process is here:
> >
> > http://samba.dreamhosters.com/pool-usage.txt
>
> Thanks for that output! It seems we need to do something
> with notifies.
>
> Volker
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-11 Thread Volker Lendecke
On Mon, May 11, 2009 at 09:31:48AM +0100, Martin Edwards wrote:
> Sorry it's taken so long to reply.  The pool-usage output for one such
> process is here:
> 
> http://samba.dreamhosters.com/pool-usage.txt

Thanks for that output! It seems we need to do something
with notifies.

Volker


pgphuQblNMmWy.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-11 Thread Martin Edwards
Samba version is 3.3.3.

On Mon, May 11, 2009 at 9:31 AM, Martin Edwards <
martin.f.edwa...@googlemail.com> wrote:

> Sorry it's taken so long to reply.  The pool-usage output for one such
> process is here:
>
> http://samba.dreamhosters.com/pool-usage.txt
>
> The problem has been mitigated somewhat just by giving the box more RAM but
> it's very frustrating.
>
>
> On Sat, May 2, 2009 at 9:31 AM, Volker Lendecke  > wrote:
>
>> On Fri, May 01, 2009 at 11:52:13PM +0100, Martin Edwards wrote:
>> > (Sorry, I meant to send this to the list first time around)
>> >
>> > Thanks very much for that.
>> >
>> > On a thread using 1.2GB pool-usage reports:
>> >
>> > full talloc report on 'null_context' (total 5898052 bytes in 39825
>> blocks)
>> >
>> > There are thousands of lib/charcnv.c:601 entries but all using only 1
>> block
>> > each.
>>
>> Can you post the whole output somewhere? Which exact Samba
>> version was this (needed for the line number)?  You wrote
>> that it happens with many versions. And, this obviously does
>> not account for 1.2GB, so there must be something else.
>>
>> Volker
>>
>
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-11 Thread Martin Edwards
Sorry it's taken so long to reply.  The pool-usage output for one such
process is here:

http://samba.dreamhosters.com/pool-usage.txt

The problem has been mitigated somewhat just by giving the box more RAM but
it's very frustrating.

On Sat, May 2, 2009 at 9:31 AM, Volker Lendecke
wrote:

> On Fri, May 01, 2009 at 11:52:13PM +0100, Martin Edwards wrote:
> > (Sorry, I meant to send this to the list first time around)
> >
> > Thanks very much for that.
> >
> > On a thread using 1.2GB pool-usage reports:
> >
> > full talloc report on 'null_context' (total 5898052 bytes in 39825
> blocks)
> >
> > There are thousands of lib/charcnv.c:601 entries but all using only 1
> block
> > each.
>
> Can you post the whole output somewhere? Which exact Samba
> version was this (needed for the line number)?  You wrote
> that it happens with many versions. And, this obviously does
> not account for 1.2GB, so there must be something else.
>
> Volker
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-02 Thread Volker Lendecke
On Fri, May 01, 2009 at 11:52:13PM +0100, Martin Edwards wrote:
> (Sorry, I meant to send this to the list first time around)
> 
> Thanks very much for that.
> 
> On a thread using 1.2GB pool-usage reports:
> 
> full talloc report on 'null_context' (total 5898052 bytes in 39825 blocks)
> 
> There are thousands of lib/charcnv.c:601 entries but all using only 1 block
> each.

Can you post the whole output somewhere? Which exact Samba
version was this (needed for the line number)?  You wrote
that it happens with many versions. And, this obviously does
not account for 1.2GB, so there must be something else.

Volker


pgpJSlylMaGF4.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-01 Thread Martin Edwards
(Sorry, I meant to send this to the list first time around)

Thanks very much for that.

On a thread using 1.2GB pool-usage reports:

full talloc report on 'null_context' (total 5898052 bytes in 39825 blocks)

There are thousands of lib/charcnv.c:601 entries but all using only 1 block
each.

On Fri, May 1, 2009 at 9:29 AM, Volker Lendecke
wrote:

> 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  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
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba + LDAP + IIS = massive memory usage

2009-05-01 Thread Volker Lendecke
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  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


pgpW4uTTjVPJv.pgp
Description: PGP signature
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

[Samba] Samba + LDAP + IIS = massive memory usage

2009-04-30 Thread Martin Edwards
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 = 500
max open files = 500
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 = 500
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";
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba