From owner-cvs-all Mon Jan 7 14:12:11 2002 Delivered-To: cvs-all@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 3CB9337B402; Mon, 7 Jan 2002 14:12:02 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id g07MBwt53608; Mon, 7 Jan 2002 17:11:58 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <200201072034.g07KYPI54890@apollo.backplane.com> References: <200201070759.g077xUt53167@freefall.freebsd.org> <20020107141759.B9972@freebie.xs4all.nl> <200201071715.g07HFb312872@apollo.backplane.com> <20020107185251.A10846@freebie.xs4all.nl> <200201072034.g07KYPI54890@apollo.backplane.com> Date: Mon, 7 Jan 2002 17:11:57 -0500 To: Matthew Dillon , Wilko Bulte From: Garance A Drosihn Subject: Re: cvs commit: src/release/sysinstall install.c label.c sysinstall.h Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.1 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 12:34 PM -0800 1/7/02, Matthew Dillon wrote: > Hmm. I could throw code in to prevent it from allocating swap > space greater then 1/4 of available space. What do people think? > This is primarily going to be a problem on systems with large > amounts of memory and tiny amounts of hard disk space. > > Perhaps we should skip creating swap entirely in such cases. Say if > (memory * 2) > (available_disk / 2) we would not create a swap. Or > (memory * 2) > (available_disk / 4). > > Ideas? It's trivial to code the above conditional up, it would be > placed at approximately line 1192 in /usr/src/release/sysinstall/label.c I think it's important to have some kind of check in there. If we have an autosize-option, it should always come up with results that are at least "doable", if not ideal. I think we should always create some swap partition, at least for this (4.5-release) go-round. I'm not sure what the algorithm should be though. There might be some cases where even (available_disk / 4) is too much to give to swap, in that it will result in too little disk space for the other partitions. I imagine that deciding on a good algorithm will be more work than implementing it once it's decided upon... :-) Is 'available_space' the size of the entire available partition? I'm thinking it should be something like: non-swap partitions should get at LEAST as much as they would have gotten under the previous calculation then the maximum size of the swap partition should be some fraction of the space left after subtracting that amount from the total size of the partition. then after getting the size for the swap-partition defined, go back and calculate sizes for non-swap partitions. This is based on about 47 seconds of thought, so it wouldn't surprise me if there's a better algorithm... -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message