Re: Does Squid push the data-segment size limit?

From: Arjan de Vet <>
Date: Wed, 4 Feb 1998 23:03:17 +0100 (CET)

In article <> 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

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.
# 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:

        :path=/bin /usr/bin /usr/contrib/bin:\

# 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!
        :path=/bin /usr/bin /sbin /usr/sbin:\
# :datasize-cur=128M:\
# :openfiles-cur=256:\
# :maxproc-cur=256:\

This should give enough space for a 256MB squid process.

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