From owner-freebsd-ports@FreeBSD.ORG Mon Sep 8 09:59:14 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CFD416A4BF; Mon, 8 Sep 2003 09:59:14 -0700 (PDT) Received: from critter.freebsd.dk (p26.n-sfpop02.stsn.com [199.107.153.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AC0243FE0; Mon, 8 Sep 2003 09:59:11 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h88GwnIX010910; Mon, 8 Sep 2003 18:58:54 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: David Schultz From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 07 Sep 2003 23:42:48 PDT." <20030908064248.GA7522@HAL9000.homeunix.com> Date: Mon, 08 Sep 2003 18:58:49 +0200 Message-ID: <10909.1063040329@critter.freebsd.dk> cc: ports@FreeBSD.ORG cc: stable@FreeBSD.ORG cc: Mike Harding cc: tjr@FreeBSD.ORG cc: Anders Nordby cc: adrian@FreeBSD.ORG Subject: Re: Squid memory leaks in -stable using libc malloc X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2003 16:59:14 -0000 In message <20030908064248.GA7522@HAL9000.homeunix.com>, David Schultz writes: > >Note also that there's a difference between heap size and physical >memory usage. I have not had much to add to this topic, but this one is so important that I want to chime in. You cannot infer _anything_ about the application from the heapsize in a VM based system. It is a totally irrelevant number, it has about the same information contents as "the most recent block number allocated in a filesystem". >A better >metric for the memory pressure that an application is exerting on >the system is its resident set size---'RES' in top(1). Which I should add, tells nothing much unless the VM system is under pressure. >phkmalloc >by default is not aggressive about returning memory to the system, >but it usually exhibits very good behavior from the point of view >of the VM system. I can highly recommend the paper about phkmalloc in src/share/doc/papers/malloc -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.