From owner-freebsd-small Sat Dec 4 21:29:55 1999 Delivered-To: freebsd-small@freebsd.org Received: from berlin.atlantic.net (berlin.atlantic.net [209.208.0.20]) by hub.freebsd.org (Postfix) with ESMTP id D1A58153CF for ; Sat, 4 Dec 1999 21:29:50 -0800 (PST) (envelope-from bjohnson@cmave.usda.ufl.edu) Received: from mail.atlantic.net (root@mail.atlantic.net [209.208.0.71]) by berlin.atlantic.net (8.8.7/8.8.5) with ESMTP id AAA23433 for ; Sun, 5 Dec 1999 00:29:46 -0500 Received: from bsd.cisi.com (ocalflifanb-as-1-r1-ip-17.atlantic.net [209.208.28.17]) by mail.atlantic.net (8.9.3/8.9.3) with ESMTP id AAA27856 for ; Sun, 5 Dec 1999 00:29:40 -0500 Received: from cmave.usda.ufl.edu (nancy.cisi.com [192.168.0.131]) by bsd.cisi.com (8.9.2/8.9.2) with ESMTP id AAA22858 for ; Sun, 5 Dec 1999 00:34:19 -0500 (EST) (envelope-from bjohnson@cmave.usda.ufl.edu) Message-ID: <3849F7EF.FFCFC66F@cmave.usda.ufl.edu> Date: Sun, 05 Dec 1999 00:28:15 -0500 From: Bob Johnson X-Mailer: Mozilla 4.7 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-small@freebsd.org Subject: Re: your builds References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-small@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith wrote: > > > > You can do it, but performance sucks. I'm led to believe that later > > > versions of windows also grow and shrink the swapfile, so it's not so > > > straightforward anymore. > > [> Mark Murray wrote:] > > Don't ask me for details, as I don't have them anymore; years ago > > someone posted a recipe which showed how he made a separate partition > > for his Windoze swap file, then frobbed his disklabel to fit the > > FreeBSD swap partition completely inside the Windoze swap file. > > > > It was quite messy but doable, and it worked. > > Only for very old versions of Windows where the swapfile can't be > fragmented. I wrote a disk-like device driver that exported a disk > device that mapped exactly onto your Windows swapfile, but that was just > as W95 was taking off, and the swapfile stopped being so useful. > You CAN set up a Win95 swap file that won't be fragmented. Whether that allows you to then use the old technique I'll leave for someone else to investigate: Create a new partition large enough for the maximum swapfile size you will need under Win95 or BSD. You can also do this on an existing, freshly defragmented partition, as long is it doesn't contain the existing Windows swapfile, but to overlay it with a BSD swapfile I gather it needs to be in its own partition. The partition needs to be formatted for Windows (i.e. DOS). Open Control Panel/System. Select the Performance tab, then the Virtual Memory button. Select "Let me specify my own virtual memory settings." Set the "Hard disk" entry to point to the partition where you want the swap file to exist. Set the "Minimum" and "Maximum" values to both be the size of the partition, so the swap file is fixed size and occupies the entire partition. The next time Win95 reboots, it will create the pre-allocated swapfile. If the file isn't there when Windows boots, it will be created, so it shouldn't hurt to have FreeBSD scribbling on the partition, as long as it leaves it in DOS format (that's the part I don't understand how to do, but I don't need to do it...). NOTE: you seem to have to set the swapfile size to be slightly smaller than the space Windows claims is available in the partition, or your settings will be ignored and changed back to the defaults. You don't have to make the swap file fill the entire partition unless you want to have a partition dedicated solely to the swap file, just make it big enough to handle your worst-case needs. I do this on all of my Win95 system (usually not in a dedicated partition, though), because as the swapfile becomes fragmented, it drastically slows down Windows. Your old copy of Windows doesn't just SEEM slower than when it was new, it IS slower! A few other notes to clarify some things: Once Windows creates the new swapfile to your minimum-size specification, it won't ever free those sectors again. You should be able to track them down and scribble on them from BSD to your heart's content, as long as it leaves everything looking legal to Windows. If someone boots DOS and deletes your Windows swapfile, THEN things will change. Windows can't defragment its own swapfile, so you need to move the swapfile to a new or freshly defragmented partition in order to defragment the existing swapfile. Some third party defrag programs that run under DOS can defrag the Windows swapfile (or for that matter, under DOS you can just delete the swapfile and then defrag the partition). This would give you a way to defrag the swapfile without a second partition. If you have enough ram, you should be able to boot Windows and defrag the partition with a zero-size swapfile. That might be another way to defrag the swapfile, but I wouldn't bet on it. -- Bob bjohnson@cmave.usda.ufl.edu bjohnson@gainesville.usda.ufl.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message