From owner-freebsd-stable@FreeBSD.ORG Sat Sep 6 08:17:22 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9823E16A4BF; Sat, 6 Sep 2003 08:17:22 -0700 (PDT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF4CD43F93; Sat, 6 Sep 2003 08:17:21 -0700 (PDT) (envelope-from mvh@ix.netcom.com) Received: from lsanca1-ar6-4-62-202-040.lsanca1.elnk.dsl.genuity.net ([4.62.202.40] helo=netcom1.netcom.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 19veoS-00037t-00; Sat, 06 Sep 2003 08:17:20 -0700 Received: by netcom1.netcom.com (Postfix, from userid 1000) id A83B65350; Sat, 6 Sep 2003 08:17:19 -0700 (PDT) From: Mike Harding To: anders@fix.no In-reply-to: <20030906141108.GA13082@totem.fix.no> (message from Anders Nordby on Sat, 6 Sep 2003 16:11:08 +0200) References: <20030906141108.GA13082@totem.fix.no> Message-Id: <20030906151719.A83B65350@netcom1.netcom.com> Date: Sat, 6 Sep 2003 08:17:19 -0700 (PDT) cc: ports@FreeBSD.org cc: stable@FreeBSD.org cc: adrian@freebsd.org cc: tjr@FreeBSD.org Subject: Re: Squid memory leaks in -stable using libc malloc X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2003 15:17:22 -0000 Squid uses more memory than you assign to cache_mem, this is documented in the Squid FAQ, section 8. cache_mem is sort of a 'suggested' value, it's normal for squid to use a lot more memory than cache_mem. I can vouch for squid being stable in it's memory usage when used for months at a time, but it's not just cache_mem that affects this. If you are happy with dmalloc, though, go ahead and use it, just check out the squid FAQ about memory usage. I don't think that there is anything wrong with FreeBSD's malloc, it just has different performance characteristics. - Mike H. X-Original-To: mvh@localhost Date: Sat, 6 Sep 2003 16:11:08 +0200 From: Anders Nordby Mail-Followup-To: Anders Nordby , stable@FreeBSD.org, tjr@FreeBSD.org, ports@FreeBSD.org, adrian@freebsd.org Content-Disposition: inline X-PGP-Key: http://anders.fix.no/pgp/ X-PGP-Key-FingerPrint: 1E0F C53C D8DF 6A8F EAAD 19C5 D12A BC9F 0083 5956 X-message-flag: Outlook : A program to spread viri, but it can do mail too. Cc: ports@FreeBSD.org Cc: adrian@freebsd.org Cc: tjr@FreeBSD.org Sender: owner-freebsd-stable@freebsd.org X-Spam-Status: No, hits=-7.1 required=5.0 tests=BAYES_00,RCVD_IN_OSIRUSOFT_COM,USER_AGENT_MUTT version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Hi, Using Squid with libc's malloc, I'm seeing a big difference between what top reports as memory used for the squid process (SIZE) and what Squid's cache manager reports that Squid has allocated (total KB allocated in the memory utilization page). Squid is using around twice as much memory as expected, and seems to grow without bounds (I run out of memory every now and then). I've tried configuring malloc.conf with H (as suggested by tjr), but it didn't help. Using Squid with dlmalloc however (--enable-dlmalloc), seems to stop the memory leaks. For my own purposes, I'll be using dlmalloc from now unless someone has other suggestions. For the record, I'm using 4.8-RELEASE and Squid 2.5.STABLE3 (recently installed from ports with all the patches there). I have Squid servers with 4 GB RAM, and cache_mem is set to 2 GB currently. Cheers, -- Anders. _______________________________________________ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"