In article <Pine.BSI.3.95.980204142534.17303A-100000@valhalla.comshare.com> you write:
>I'm trying to diagnose some problems I'm having with squid dying due to
>memory allocation errors, and my BSD/OS 3.1 system allows you to set a
>limit on "datasize", defined in the manpage as:
>
>     datasize
>             The maximum size of the data segment for a process; this defines
>             how far a program may extend its break with the sbrk(2) system
>             call.
>
>I'm not 100% sure what this means, as I've not tinkered with sbrk() 
>before.  Does Squid need this value to be set quite large for a 3GB cache
>in order to allow enough space for the hot object cache and the database
>indices?  Or am I running out of memory due to contention with other
>processes?
The default kernel limit on BSD/OS for datasize is 64MB (at least on 3.0
which I'm using).
Recompile a kernel with larger datasize settings:
maxusers        128
# Support for large inpcb hash tables, e.g. busy WEB servers.
options         INET_SERVER
# support for large routing tables, e.g. gated with full Internet routing:
options         "KMEMSIZE=\(16*1024*1024\)"
options         "DFLDSIZ=\(128*1024*1024\)"
options         "DFLSSIZ=\(8*1024*1024\)"
options         "SOMAXCONN=128"
options         "MAXDSIZ=\(256*1024*1024\)"
See/usr/share/doc/bsdi/config.n for more info.
In /etc/login.conf I have this:
-----------------------------------------------------------------------------
default:\
        :path=/bin /usr/bin /usr/contrib/bin:\
        :datasize-cur=256M:\
        :openfiles-cur=1024:\
        :openfiles-max=1024:\
        :maxproc-cur=1024:\
        :stacksize-cur=64M:\
        :radius-challenge-styles=activ,crypto,skey,snk,token:\
        :tc=auth-bsdi-defaults:\
        :tc=auth-ftp-bsdi-defaults:
#
# Settings used by /etc/rc and root
# This must be set properly for daemons started as root by inetd as well.
# Be sure reset these values back to system defaults in the default class!
#
daemon:\
        :path=/bin /usr/bin /sbin /usr/sbin:\
        :widepasswords:\
        :tc=default:
#       :datasize-cur=128M:\
#       :openfiles-cur=256:\
#       :maxproc-cur=256:\
-----------------------------------------------------------------------------
This should give enough space for a 256MB squid process.
Arjan
Received on Wed Feb 04 1998 - 14:16:30 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:47 MST