Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2002 17:11:57 -0500
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Matthew Dillon <dillon@apollo.backplane.com>, Wilko Bulte <wkb@freebie.xs4all.nl>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/release/sysinstall install.c label.c sysinstall.h
Message-ID:  <p05101019b85fc9f6c911@[128.113.24.47]>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05101019b85fc9f6c911>