Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Apr 2001 13:55:38 -0700
From:      "Matthew H. North" <ctsmhn@cts.com>
To:        "Yavuz Maslak" <yavuz@ihlas.net.tr>
Cc:        <questions@FreeBSD.ORG>
Subject:   RE: squid settings
Message-ID:  <LAEKJNMMIOPFCDDPFBDEAEBICBAA.ctsmhn@cts.com>
In-Reply-To: <20010329093807.A18904@myhakas.matti.ee>

next in thread | previous in thread | raw e-mail | index | archive | help

I'm not sure 'limits' will work in this case.  I think (someone with more
knowledge please say otherwise if I'm wrong) that the kernel actually has a
hard limit of 512MB ram, particularly given your MAXDSIZ setting of
512*1024*1024, which is 512MB.  Increasing the limit configuration in
login.conf won't overcome this.  Instead, recompile your kernel with MAXDSIZ
set to something larger (somewhere shy of 2048*1024*1024 unless you want to
run into physical limit problems).

I ran into this exact problem with Squid: the squid binary would start,
begin loading the resident part of the massive cache into memory, reach
about 512MB resident, crash and start over (with the error message you
describe previously).  We first looked at limits configuration in login.conf
and found that squid was already running in a class that had full privilege.
Further, running a simple C program, *as root*, that allocated chunks of RAM
at 2MB a pop, died at the same point: about 512MB resident.  So we concluded
that there must be a hard limit coded into the kernel.  We found MAXDSIZ,
upped it to 700*1024*1024 (768MB physical ram in the system), and the
problem was fixed.

- Matt

| -----Original Message-----
| From: owner-freebsd-questions@FreeBSD.ORG
| [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Vallo Kallaste
| Sent: Wednesday, March 28, 2001 11:38 PM
| To: Yavuz Maslak
| Cc: questions@FreeBSD.ORG
| Subject: Re: squid settings
|
|
| On Sun, Nov 12, 2000 at 10:34:14PM +0200, Yavuz Maslak
| <yavuz@ihlas.net.tr> wrote:
|
| > I use squid2.3 on Freebsd4.2 stable and it works as transparent
| >
| > I have set max users =256 in my custom kernel
| >
| > Because I have a problem I look at /var/log/messages and I see
| once xcalloc: Unable to allocate 4096 blocks of 1 bytes!"
| > After that my squid restart by itself  However mysquid hadn't used swap
| > What shall I do ?  Where can I findout about that ?
|
| Check the limits(1). Create appropriate section in login.conf and
| modify squid startup script as necessary.
| --
|
| Vallo Kallaste
| vallo@matti.ee
|
| To Unsubscribe: send mail to majordomo@FreeBSD.org
| with "unsubscribe freebsd-questions" in the body of the message
|


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?LAEKJNMMIOPFCDDPFBDEAEBICBAA.ctsmhn>