Subject: Re: increasing a process's max data size
To: None <port-sparc@netbsd.org>
From: Ray Phillips <r.phillips@jkmrc.uq.edu.au>
List: port-sparc
Date: 09/06/2003 22:15:43
Thanks for the replies.

>  >   # squid -k reconfigure
>>
>>  in which case the machine crashes and has to be power cycled.  If
>
>Does the kernel prints something on console ?

Nothing I'm afraid.

>2.  D'ya think this more accurately reflects on the engineering of
>     squid?  It sounds like either you're maintaining an in-core Cache
>     Of Unusual Size, or there's a SERIOUS leak and/or abuse of
>     available memory.

I've sought advice on the squid-users mailing list and Henrik 
replied.  He made the valid point that an application should at worst 
only slow a machine down, not crash it.  :)

He went on to say "What should be noted is that Squid during "-k 
reconfigure" or "-k rotate" may fork a number of times (once per 
helper process), which will stress your VM system 
considerably....Maybe your kernel has some issue with fork of very 
large processes or running out of swap space causing the freeze 
instead of an error which it should give in such conditions."

So, I thought I'd copy the output of "top" and "pstat -s" just before 
issuing the "squid -k reconfigure" command, hoping it would shed 
light on the problem.  At present my SS10 is being upgraded so isn't 
serving as the production squid proxy.  It's been replaced by a PC 
running NetBSD 1.6.1.  I'll append the output to this message, 
however as luck would have it, it didn't crash this time.  The PC 
hasn't been in this role for long and I've only tried this with it 
three times--of those it hasn't crashed twice but the SS10 crashes 
every time.  Actually, since the PC has 640 MB RAM I've used these 
values to make a custom kernel for it (the last five are because I'm 
using squid's diskd option):

options DFLDSIZ=536870912
options MAXDSIZ=536870912
options NMBCLUSTERS=1024
options NKMEMPAGES=4096
options MSGMNB=16384
options MSGMNI=40
options MSGSEG=204
options MSGSSZ=64
options MSGTQL=1024



Ray



load averages:  2.25,  2.20,  2.19                                     21:19:22
65 processes:  64 sleeping, 1 on processor
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Memory: 213M Act, 119M Inact, 1916K Wired, 2416K Exec, 26M File, 229M Free
Swap: 1281M Total, 290M Used, 991M Free

   PID USERNAME PRI NICE   SIZE   RES STATE      TIME   WCPU    CPU COMMAND
   227 root       2    4   316M  272M select    66:54  0.00%  0.00% squid
     7 root      18    0     0K   33M syncer    19:27  0.00%  0.00% [ioflush]
     6 root     -18    0     0K   33M reaper     2:19  0.00%  0.00% [reaper]
   228 squid      2    0  1044K  956K netio      2:18  0.00%  0.00% perl
   244 squid     -4    0    48K  540K msgwait    2:07  0.00%  0.00% diskd
   274 root       2    0   172K  252K select     1:42  0.00%  0.00% telnetd
   245 squid     -4    0    48K  480K msgwait    1:07  0.00%  0.00% diskd
   297 root       2    0   172K  252K select     1:06  0.00%  0.00% telnetd
     5 root     -18    0     0K   33M pgdaemon   0:38  0.00%  0.00% [pagedaemon]
     8 root     -18    0     0K   33M aiodoned   0:21  0.00%  0.00% [aiodoned]
   192 ntpd      18  -12   732K 1560K pause      0:17  0.00%  0.00% ntpd
   229 squid      2    0  1036K  932K netio      0:14  0.00%  0.00% perl
   185 apache    -4    0  1164K 1360K semwait    0:14  0.00%  0.00% httpd
   174 root       2    0  1100K  928K select     0:12  0.00%  0.00% httpd
   181 apache    -4    0  1164K 1380K semwait    0:08  0.00%  0.00% httpd
   182 apache    -4    0  1172K 1372K semwait    0:08  0.00%  0.00% httpd
  6694 root       2    0   228K  920K netio      0:06  0.00%  0.00% ftpd


# pstat -s
Device      1K-blocks     Used    Avail Capacity  Priority
/dev/wd0b     1311408   296540  1014868    23%    0
#