From owner-freebsd-performance@FreeBSD.ORG Sat Jun 21 18:19:08 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 BCF8B37B401 for ; Sat, 21 Jun 2003 18:19:08 -0700 (PDT) Received: from mta4.adelphia.net (mta4.adelphia.net [64.8.50.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id D5BFC43F93 for ; Sat, 21 Jun 2003 18:19:05 -0700 (PDT) (envelope-from Support@Netflag.Net) Received: from nfn2.Netflag.Net ([68.69.240.78]) by mta4.adelphia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030622011904.CDST1347.mta4.adelphia.net@nfn2.Netflag.Net>; Sat, 21 Jun 2003 21:19:04 -0400 Message-Id: <5.2.0.9.2.20030621181039.00ba2a10@pop.dc3.adelphia.net> X-Sender: pedramn@pop.dc3.adelphia.net X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Sat, 21 Jun 2003 18:18:35 -0700 To: "D. J. Bernstein" , freebsd-performance@freebsd.org From: Pedram Nimreezi In-Reply-To: <20030621185821.30070.qmail@cr.yp.to> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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: Sun, 22 Jun 2003 01:19:09 -0000 I hope that gets corrected to your liking.. I know this is irrelevant, but I just wanted to thank you for tinydns... it makes programming with dns soo much.. what's the technical term? better! generate an ssh key and hop into your service directory and ./add-alias subdomain.domain.com 216.5.5.5.5; make wow... And best of all... I don't need to use a dual processor to run a 500 pound gorilla named BIND. Thank You Doctor Bernstein. Maybe LDAP later on when it's more widely used? You can't get much simpler than you already got it.. svstat /service/tinydns and you get your exact service uptime I have carpal tunnel... I'm sure you could relate anything to save typing is a Good Thing.. Doing that in BIND is hardly similar in triviality. I don't suggest going straight into TinyDNS.. I suggest learning BIND so you really appreciate the craftsmanship of you work and I will continue to phrase it like that to clients and apprentices and the fact that I saw you post on FBSD Hackers ;-) God Bless... At 06:58 PM 6/21/2003 +0000, D. J. Bernstein wrote: >FreeBSD 4.8. Test program: malloc(360); malloc(80); malloc(180); >malloc(16); malloc(440); sleep(10); _exit(0). Compile statically. > >The program ends up with 44KB RSS. Where is all that DRAM going? The >program also ends up with 168KB VSZ. Where is all that VM going? > >I don't care much about the 3-page text segment. But I do care about the >39 extra pages of VM, and the 8 extra pages of DRAM. There's no obstacle >to having a small program fit into _one_ page per process; two or three >can be excused, but 39 is absurd. (Yes, I know that Solaris is worse.) > >At least 2 pages appear to be wasted by exit(), because it brings in a >chunk of stdio, which uses 84 bytes of data and 316 bytes of bss. The >libc implementors clearly don't care about 316 bytes of memory, so why >don't they make those 316 bytes static? Why doesn't the compiler >automatically merge some bss into data when that saves a page? Why can't >I omit exit(), manually or automatically, when it's unreachable? > >Furthermore, malloc() appears to chew up a whole new page of DRAM for >each allocation, plus another page---is this counted in VSZ?---for an >anonymous mmap. Would it really be that difficult to fit 1076 bytes of >requested memory into the 3000-odd bytes available at the end of bss? > >I sure hope that there's some better explanation for the remaining 32 >pages than ``Well, we decided to allocate 131072 bytes of memory for the >stack,'' especially when I'm hard-limiting the stack to 4K before exec. > >---D. J. Bernstein, Associate Professor, Department of Mathematics, >Statistics, and Computer Science, University of Illinois at Chicago >_______________________________________________ >freebsd-performance@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-performance >To unsubscribe, send any mail to >"freebsd-performance-unsubscribe@freebsd.org"