samba-technical@lists.samba.org
[Top] [All Lists]

Re: Samba 4 Memory usage

Subject: Re: Samba 4 Memory usage
From: Andrew Bartlett
Date: Fri, 16 May 2008 10:14:57 +1000
On Thu, 2008-05-15 at 10:37 -0700, zaphod@xxxxxxxxxx wrote:
> I'm seeing some smbd process running at really high mem usage.
> 
> >From top:
> 
> 1540 root        1  96    0   125M 41496K select   0:02  0.00% smbd
>   837 root        1  96    0 10576K  3032K select   0:01  0.00% sendmail
>   666 root        1  96    0  4732K  1164K select   0:00  0.00% routed
> 11536 root        1  96    0   107M 28648K select   0:00  0.00% smbd
> 11538 root        1  96    0   118M 39604K select   0:00  0.00% smbd
> 11300 root        4  96    0 21632K 15648K select   0:00  0.00% named
> 11541 root        1  96    0   118M 39588K select   0:00  0.00% smbd
> 11542 root        1  96    0   118M 39824K select   0:00  0.00% smbd
> 11537 root        1  96    0 24944K  7848K select   0:00  0.00% smbd
> 11543 root        1  96    0   118M 39556K select   0:00  0.00% smbd
> 
> There's no activity on the test server.  Is this due to alpha status, or
> should I anticipate this in the finished version?

I would strongly suggest you chase this down.  

Start by running smbd with --leak-report-full.  (which will print memory
used at exit), and use tools such as valgrind.  

If this does not show up the leak, then break into the process with gdb,
then run:

p talloc_report_full(0, stdout)

This will print out the full memory dump of the process (as we allocate
all memory with talloc).

Andrew Bartlett
-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.
<Prev in Thread] Current Thread [Next in Thread>