From owner-freebsd-hackers Wed Oct 23 12:35: 1 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DD0237B401 for ; Wed, 23 Oct 2002 12:35:00 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CC1043E6A for ; Wed, 23 Oct 2002 12:34:59 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id g9NJYqn4045229; Wed, 23 Oct 2002 21:34:52 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: David Schultz Cc: Danny Braniss , freebsd-hackers@FreeBSD.ORG Subject: Re: malloc In-Reply-To: Your message of "Wed, 23 Oct 2002 12:13:56 PDT." <20021023191355.GA728@HAL9000.homeunix.com> Date: Wed, 23 Oct 2002 21:34:52 +0200 Message-ID: <45228.1035401692@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20021023191355.GA728@HAL9000.homeunix.com>, David Schultz writes: >Thus spake Poul-Henning Kamp : >> >A harder problem to solve is fragmentation for long-running >> >servers, where the RSS tends to creep upwards over time as virtual >> >memory fills with holes. >> >> This is where you want to run phkmalloc with the 'H' option. >> It practically makes it a non-issue last I tried. > >Perhaps phkmalloc could be made self-tuning with regards to 'H'; >I doubt many people know when to use that feature. For example, >you might have a heuristic where phkmalloc detects that the program >has been running for a long time or has called malloc() and free() >many times, so it starts using madvise() on some free pages. I actually considered adding a "SIGVMMALLOC" which the kernel could use to modify the behaviour of MALLOC to suit present circumstances. Never got around to it before RAM prices dropped. Search the mail-arcives for some of my ideas. -- 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message