From owner-freebsd-performance@FreeBSD.ORG Mon Jun 30 16:33:54 2003 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63E2037B401 for ; Mon, 30 Jun 2003 16:33:54 -0700 (PDT) Received: from perrin.int.nxad.com (internal.ext.nxad.com [69.1.70.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id E861943F93 for ; Mon, 30 Jun 2003 16:33:53 -0700 (PDT) (envelope-from sean@nxad.com) Received: by perrin.int.nxad.com (Postfix, from userid 1001) id 6BE8521058; Mon, 30 Jun 2003 16:33:53 -0700 (PDT) Date: Mon, 30 Jun 2003 16:33:53 -0700 From: Sean Chittenden To: "D. J. Bernstein" Message-ID: <20030630233353.GG96753@perrin.int.nxad.com> References: <20030626025029.71392.qmail@cr.yp.to> <200306260515.h5Q5FhPF020045@bitblocks.com> <20030626212659.51367.qmail@cr.yp.to> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030626212659.51367.qmail@cr.yp.to> X-PGP-Key: finger seanc@FreeBSD.org X-PGP-Fingerprint: 3849 3760 1AFE 7B17 11A0 83A6 DD99 E31F BC84 B341 X-Web-Homepage: http://sean.chittenden.org/ User-Agent: Mutt/1.5.4i cc: freebsd-performance@freebsd.org Subject: Re: ten thousand small processes X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 23:33:54 -0000 > > Instead of complaining about wasting 78 megabytes and arguing > > about why various proposed solutions fall short and why your way > > is the best, why don't you come up with a patch that saves space > > for small programs? > > Funny. Seems to me that I keep making concrete > suggestions---including a detailed proposal for giving more space to > malloc()---and the answer is consistently ``We really don't care > about per-process overhead.'' What's the benefit of a patch for > people who don't even see the problem? It'd be slick if malloc(3) had a mallopt(3) call that'd make it easier to monkey with the _malloc_options, but, until such time as phk is on this list or decides to add such an interface, why not just set: _malloc_options = "<<<<<<<<<<<<<<<"; /* '<' * 15 */ to reduce the malloc cache to 0? From malloc(3): TUNING Once, when the first call is made to one of these memory allocation rou- tines, various flags will be set or reset, which affect the workings of this allocation implementation. The ``name'' of the file referenced by the symbolic link named /etc/malloc.conf, the value of the environment variable MALLOC_OPTIONS, and the string pointed to by the global variable _malloc_options will be interpreted, in that order, character by character as flags. Most flags are single letters, where uppercase indicates that the behav- ior is set, or on, and lowercase means that the behavior is not set, or off. [snip] < Reduce the size of the cache by a factor of two. The default cache size is 16 pages. This option can be specified multiple times. -sc -- Sean Chittenden