From owner-freebsd-current@FreeBSD.ORG Fri Jan 19 18:02:20 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B88816A400 for ; Fri, 19 Jan 2007 18:02:20 +0000 (UTC) (envelope-from jd@ugcs.caltech.edu) Received: from heave.ugcs.caltech.edu (heave.ugcs.caltech.edu [131.215.176.104]) by mx1.freebsd.org (Postfix) with ESMTP id 02E8B13C459 for ; Fri, 19 Jan 2007 18:02:19 +0000 (UTC) (envelope-from jd@ugcs.caltech.edu) Received: by heave.ugcs.caltech.edu (Postfix, from userid 3640) id 937578F482; Fri, 19 Jan 2007 10:02:19 -0800 (PST) Date: Fri, 19 Jan 2007 10:02:19 -0800 From: Paul Allen To: Jason Evans Message-ID: <20070119180219.GD8574@heave.ugcs.caltech.edu> References: <200701172045.35137.shoesoft@gmx.net> <45B00BF5.6030200@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45B00BF5.6030200@FreeBSD.org> Sender: jd@ugcs.caltech.edu Cc: freebsd-current@freebsd.org, Stefan Ehmann Subject: Re: very high memory usage in -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 18:02:20 -0000 >From Jason Evans , Thu, Jan 18, 2007 at 04:08:21PM -0800: > Personally, in the absence of a dynamic boundary between the data > segment and the heap, I would be quite happy to completely disable > sbrk() support in jemalloc, and let those who really need that last 512 > MB of address space adjust resource limits for their applications as > necessary. In practice, I expect this would cause people far less > trouble than does the current state of affairs. Well it might be reasonable to use a malloc flag. Nonetheless, it should be possible for you to MADV_FREE brk memory without moving the brk point. While munmap has some advantages in better coexisting with direct use of mmap by a program, MADV_FREE has the advantage that virtual pages can be immediately reused without incurring a syscall cost. It isn't obvious a priori what the right balance of these operations is. Paul