Subject: Re: smbd dies under heavy transfers
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Gilles Gravier <Gilles@Gravier.org>
List: netbsd-users
Date: 04/16/2007 22:09:10
Wooohoooo!

Manuel, you rock! That worked!

ulimit -a gives me :

core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) 131072
file size               (blocks, -f) unlimited
max locked memory       (kbytes, -l) 157086
max memory size         (kbytes, -m) 471260
open files                      (-n) 64
pipe size            (512 bytes, -p) 1
stack size              (kbytes, -s) 2048
cpu time               (seconds, -t) unlimited
max user processes              (-u) 160
virtual memory          (kbytes, -v) 133120


And when my precess would reach a crashing point, the size would be 
about 130 MB... I have (temporarily) set ulimit to unlimited for 3 
variables :

data seg size (-d)
max memory size (-m)
max locked memory (-l)

Do you think I need all 3? Or can just the data segment count?

Running "top" gives me :

load averages:  2.96,  2.91,  
2.73                                                                                                                                                           
22:07:16
95 processes:  2 runnable, 92 sleeping, 1 on processor
CPU states: 14.9% user,  0.0% nice, 12.9% system,  5.0% interrupt, 67.2% 
idle
Memory: 269M Act, 135M Inact, 1592K Wired, 40M Exec, 208M File, 748K Free
Swap: 2048M Total, 208M Used, 1841M Free

  PID USERNAME PRI NICE   SIZE   RES STATE      TIME   WCPU    CPU COMMAND
  677 root       2    0   218M   62M netio     11:22 19.97% 19.97% smbd

So my smbd is indeed with a size of 218M and 62M of RES(resources?). Is 
that size actually the data segment size?

In any case, it's now quite nicely working!


Thanks,
Gilles.

Manuel Bouyer wrote:
> On Mon, Apr 16, 2007 at 08:47:03PM +0200, Gilles Gravier wrote:
>   
>> Thanks, Manuel!
>>
>> Hum. OK. I guess I understand that.
>>
>> But when I log in as root and type "ulimit" I get "unlimited".
>>     
>
> try 'ulimit -a'. By default, the limit on file size is displayed.
>
>   
>> So how do I assure that the smbd daemon (launched from the 
>> /etc/rc.d/samba script) gets unlimited memory?
>>     
>
> I don't think there's other ways than adding
> ulimit -d unlimited
> in /etc/rc.d/smbd
>
>   

-- 
/*Gilles Gravier*/ *=* *Gilles@Gravier.org* <mailto:Gilles@Gravier.org> 
*=* *http://www.gravier.org/*
ICQ : *77488526* 
<http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN 
Messenger : Gilles@Gravier.org <http://members.msn.com/Gilles@Gravier.org>*
*Skype : ggravier <callto://ggravier>* || *Y! : ggravier 
<http://profiles.yahoo.com/ggravier> || AOL : gillesgravier 
<aim:goim?screenname=gillesgravier>
PGP Key ID : *0x8DE6D026* 
<http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&op=index>
"Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
"De toutes les aberrations sexuelles, la chasteté est la plus 
aberrante." [Anatole France]