SAMBA memory growth problems
Richard Sharpe
sharpe at ns.aus.com
Mon Dec 3 05:20:01 GMT 2001
Hmmm,
I am interested in being able to find out what is being used under
FreeBSD ... don't know of any tools to help.
However, when I ran top while I was doing a smbtorture test against
Linux recently, it looked like Linux was only using about 400kB of
unshared memory per smbd.
I wonder if this is reasonable.
top under linux shows you the RSS and the shared data and the vsiz or
whatever. Because I had plenty of memory, vsize and rss were the same,
and shared was about 400kB less than rss.
David Collier-Brown wrote:
> Dave C-B wrote:
>
>>> I think we're just seeing a larger samba, but the
>>> real value of interest is RSS (resident set size).
>>>
> "S.Barbaresi" wrote:
>
>>dogmatix is running samba 2.2.3 and acrobatix is running samba 1.9. both
>>servers are Ultra 10's running Solaris 8 (different patch levels)
>>
>>Samba 2.2.3 the RSS value is: 3784
>>----------------------------------
>> dogmatix% ps -ef -o "rss pid comm"| grep 23562
>> 3784 23562 /export/pc0/pc/samba/bin/5.8/smbd
>>
>>Samba 1.9.18p10 the RSS value is: 2488
>>--------------------------------------
>> acrobatix% ps -ef -o "rss pid comm" | grep 22544
>> 2488 22544 /export/pc0/pc/samba/bin/5.8/smbd
>>
>>As you can see the RSS size has incrased from 2.4MB to 3.7MB, would you
>>expect such a large increase?
>>I've attached the output from pmap -x for both machines
>>
>
> Ok, We've seen some significant growth in the size of
> the smbd code, plus the shared TDBs, with a smaller growth
> in the resident-set size (RSS).
> When I look at a detailed list from the pmaps, I see
> an increase of approximately 1.6 MB in RSS, out of 1.95 MB
> total growth, but the good news is that it's growth in
> the shared code, bot the unshared data.
>
> This means that we need to adjust our estimates for
> how much memory Samba costs: in this case it is
> shared 1.16 MB, up from 0.36
> per-process 1.20 MB, up from 1.07 (total, not RSS)
>
> When sizing a 100-user system, you use 1 * shared
> plus 100 * per-process, for a total of
> 1.16 + (100 * 1.20) = 121.16
> instead of
> 0.36 + (100 * 1.07) = 107.36
> This is about a 12% increase.
>
> I've attached the combined pmaps below.
>
> --dave
>
>
> Samba
> 2.2.3
> Samba 1.9 Difference
> Address Kbytes Resident Shared Private Permissions Mapped
> File Address Kbytes Resident Shared Private Resident
> 00010000 1392 1168 1048 120 read/exec smbd
> [code] 00010000 384 360 352 8 +808 KB
> 0017A000 160 80 - 80 read/write/exec smbd
> [data] 0007E000 104 104 56 48 -24
> 001A2000 856 632 8 624 read/write/exec [ heap
> ] 00098000 800 608 8 600 +24
> FEFA0000 24 24 24 - read/write/shared dev:136,1
> ino:79354 +24
> FEFB0000 24 24 16 8 read/exec
> nss_nis.so.1 FF100000 24 24 16 8
> FEFC6000 8 8 - 8 read/write/exec
> nss_nis.so.1 FF116000 8 8 - 8
> FEFD0000 16 16 8 8 read/exec
> nss_compat.so.1 FF120000 16 16 8 8
> FEFE4000 8 8 - 8 read/write/exec
> nss_compat.so.1 FF134000 8 8 - 8
> FEFF0000 8 8 - 8 read/write/exec [ anon
> ]
> FF000000 24 24 16 8 read/exec
> nss_files.so.1 FF140000 24 24 16 8
> FF016000 8 8 - 8 read/write/exec
> nss_files.so.1 FF156000 8 8 - 8
> FF020000 432 432 432 - read/write/shared dev:136,1
> ino:79345 FF160000 104 104 40 64 +328
> FF090000 8 8 8 - read/write/shared dev:136,1
> ino:79353 +8
> FF0A0000 8 8 - 8 read/write/shared dev:136,1
> ino:79352 +8
> FF0B0000 8 8 8 - read/write/shared dev:136,1
> ino:79351 +8
> FF0C0000 8 8 8 - read/write/shared dev:136,1
> ino:79350 +8
> FF0D0000 184 152 152 - read/write/shared dev:136,1
> ino:79349 +152
> FF110000 208 208 208 - read/write/shared dev:136,1
> ino:79347 +208
> FF150000 32 32 32 - read/write/shared dev:136,1
> ino:79344 +32
> FF170000 8 8 8 - read/write/shared dev:136,1
> ino:79335 +8
> FF180000 664 664 632 32 read/exec
> libc.so.1 FF180000 672 672 640 32 -8
> FF236000 24 24 - 24 read/write/exec
> libc.so.1 FF238000 24 24 - 24
> FF23C000 8 8 - 8 read/write/exec
> libc.so.1 FF23E000 8 8 - 8
> FF250000 16 16 8 8 read/exec
> libc_psr.so.1 FF250000 16 16 8 8
> FF260000 16 16 8 8 read/exec
> libmp.so.2 FF260000 16 16 8 8
> FF274000 8 8 - 8 read/write/exec
> libmp.so.2 FF274000 8 8 - 8
> FF280000 552 552 488 64 read/exec
> libnsl.so.1 FF280000 552 552 480 72
> FF31A000 32 32 16 16 read/write/exec
> libnsl.so.1 FF31A000 32 32 16 16
> FF322000 32 32 - 32 read/write/exec
> libnsl.so.1 FF322000 32 32 - 32
> FF330000 8 8 - 8 read/write/shared dev:136,1
> ino:41569 FF330000 8 8 - 8
>
> librpcsvc.so.1 FF350000 24 16 8 8 -16
>
> librpcsvc.so.1 FF366000 8 8 - 8 -8
>
> librpcsvc.so.1 FF370000 8 8 - 8 -8
> FF340000 40 40 32 8 read/exec
> libsocket.so.1 FF380000 40 40 32 8 -40
> FF35A000 8 8 - 8 read/write/exec
> libsocket.so.1 FF39A000 8 8 - 8 -8
> FF360000 24 24 16 8 read/exec
> libgen.so.1 +8
> FF376000 8 8 - 8 read/write/exec
> libgen.so.1 +24
> FF380000 8 8 - 8 read/write/exec [ anon
> ] +8
> FF390000 16 16 8 8 read/exec
> libsec.so.1 +16
> FF3A4000 8 8 - 8 read/write/exec
> libsec.so.1 +8
> FF3B0000 8 8 - 8 read/exec
> libdl.so.1 FF3A0000 8 8 - 8
> FF3C0000 128 128 120 8 read/exec
> ld.so.1 FF3B0000 136 136 128 8
> FF3E0000 8 8 - 8 read/write/exec
> ld.so.1 FF3E2000 8 8 - 8
> FFBEA000 24 24 - 24 read/write [ stack
> ] FFBEA000 24 24 - 24
> -------- ------ ------ ------
> ------ -------- ------
> ------ ------ ------
> total Kb 5064 4504 3304
> 1200 total Kb 3112
> 2888 1816 1072 +1616 KB
>
>
>
>
>
>
>>> I've attached a sar report weakly backing up the
>>> above conclusion. The diagnosis really says "it may
>>> have grown, but it didn't hurt much"
>>>
>>Very impressed with the report, is the software which generated the report
>>freely available?
>>
>>Thankyou for taking the time to look at this.
>>
>>Sim
>>
>>S.Barbaresi E-mail s.barbaresi at bangor.ac.uk
>>Computing Centre, UWB Tel (44) (01)248 382403 (ddi)
>>Sackville Road Fax (44) (01)248 383826 (ddi)
>>Bangor, Gwynedd LL57 1LD, UK
>>
>> ----------------------------------------------------------------------
>> Name: pmap.samba-2.2.3
>> pmap.samba-2.2.3 Type: Plain Text (TEXT/PLAIN)
>> Encoding: BASE64
>>
>> Name: pmap.samba-1.9
>> pmap.samba-1.9 Type: Plain Text (TEXT/PLAIN)
>> Encoding: BASE64
>>
>
--
Richard Sharpe, rsharpe at ns.aus.com, LPIC-1
www.samba.org, www.ethereal.com, SAMS Teach Yourself Samba
in 24 Hours, Special Edition, Using Samba
More information about the samba-technical
mailing list