From owner-freebsd-current Fri Sep 4 05:09:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA14010 for freebsd-current-outgoing; Fri, 4 Sep 1998 05:09:25 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from marathon.tekla.fi (marathon.tekla.fi [192.98.7.5]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA14005 for ; Fri, 4 Sep 1998 05:09:22 -0700 (PDT) (envelope-from sja@tekla.fi) Received: from poveri.tekla.fi (poveri.tekla.fi [192.98.7.19]) by marathon.tekla.fi (8.8.7/8.8.7) with SMTP id PAA28197 for ; Fri, 4 Sep 1998 15:08:14 +0300 From: Sakari Jalovaara Received: by poveri.tekla.fi; (5.65v3.2/1.1.8.2/20Aug96-0557PM) id AA21454; Fri, 4 Sep 1998 15:08:13 +0300 Date: Fri, 4 Sep 1998 15:08:13 +0300 Message-Id: <9809041208.AA21454@poveri.tekla.fi> To: current@FreeBSD.ORG Subject: Re: ELF binaries size Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> I don't care that much if ELF wastes a page mapping entry as it it >> wastes the memory an entire page use... > > I wouldn't want to discourage discussion of this interesting topic. > But I hope you are all bearing in mind that caring about this is about > as effective as caring about the weather. Mmmm... Is it? If every process has an average of half a page of unnecessarily COWed text in memory, the kB's add up. (Every process is pretty much guaranteed to COW the first data page, if the __progname variable indeed tends to end up there.) If every exec() does an average of 2kB unnecessary bcopy() and every process uses an extra 2kB memory (hopefully no extra cache?!), is that measurable? How's this for a test: 1) "time make world" for a baseline. 2) Hack the ELF linker to pad the text segment up to a full page boundary. 3) "time make world". 4) "time make world" - this time the text segments of make/cc/sh/etc doing the compilation are padded. If (1) and (4) show a difference, add a flag to ld to control padding (save disk vs. save memory.) Could also try a lighter benchmark than "make world" to test a different number-of-exec()s / process-runtime ratio. ++sja To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message