From owner-freebsd-questions Tue Mar 19 22:41:27 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id WAA07425 for questions-outgoing; Tue, 19 Mar 1996 22:41:27 -0800 (PST) Received: from obie.softweyr.com (slcmodem1-p1-5.intele.net [206.29.206.104]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id WAA07420 for ; Tue, 19 Mar 1996 22:41:22 -0800 (PST) Received: (from wes@localhost) by obie.softweyr.com (8.6.12/8.6.12) id XAA06473; Tue, 19 Mar 1996 23:40:18 -0700 Date: Tue, 19 Mar 1996 23:40:18 -0700 Message-Id: <199603200640.XAA06473@obie.softweyr.com> From: wes@intele.net To: Luigi Rizzo CC: questions@freebsd.org Subject: Re: Diskless FreeBSD In-Reply-To: <46666309@toto.iv> Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Luigi Rizzo writes: > Does anyone know *why* is it necessary to preallocate the swap ? I > believe it wasn't necessary back in 1.1 times. This never surprise me, every diskless UNIX system I've seen (primarily FreeBSD and SunOS) require you to pre-allocate swap space. > I am asking because I plan to support diskless for our lab (50+ > systems, but very few of them are expected to be in use simultaneously), > and preallocating some 20MB of swap for each machine seems unnecessary > expensive. Do yourself a favor and figure out some way to put a small swap disk into your 'diskless' workstations. Even Sun eventually figured out that 'dataless' workstations worked *much* better than 'diskless.' I.e. the system has a local boot, root, and swap device, and NFS mounts all 'user' directories. > I am currently working on the netboot code, so I am open to suggestions. > I'd like to implement code to reset the swap file to size 0 before > transferring control to the kernel, or, if preallocation is really > necessary, I'd rather create a file with a unique big hole of > appropriate size, so that it does not occupy disk space when not > necessary. It is necessary, because the swap code always expects to get the disk sectors when it asks for them. An allocation failure in swap is a pretty heart-rending (well, system-rending) experience. -- Wes Peters | Yes I am a pirate, two hundred years too late Softweyr | The cannons don't thunder, there's nothing to plunder Consulting | I'm an over forty victim of fate... wes@intele.net | Jimmy Buffett