Date: Mon, 24 Aug 1998 08:25:06 -0700 (PDT) From: David Wolfskill <dhw@whistle.com> To: bsdbob@seedlab1.cropsci.ncsu.edu, robert@chalmers.com.au Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Whats a good size for a root partition? Message-ID: <199808241525.IAA18079@pau-amma.whistle.com> In-Reply-To: <199808231600.MAA15841@seedlab1.cropsci.ncsu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
>From: "Robert D. Keys" <bsdbob@seedlab1.cropsci.ncsu.edu> >Date: Sun, 23 Aug 1998 12:00:54 -0400 (EDT) >Swap is generally mem+1K to 2x(mem). Does anyone know why the religious >tendency to 2x mem? On my IBM AIX systems, swap only needs to be minimally >mem+24bytes. If I have a lot of disk space, swap=32M. It's not "religious" as much as a reflection of the way the VM manager works, combined with the anticipated workload for the machine. There are VM implementations that require that any allocated virtual memory page have a corresponding page allocated on the "backing store" (swap space). SunOS 4.x (& prior?), if I recall correctly, use this approach, and the rule of thumb for allocating at least 2x RAM for swap was common for such releases of SunOS. There are VM implementations that allocate pages on the backing store only when the page in memory needs to be spilled to disk. If I understand correctly, SunOS 5.x does this -- and it is thus possible to run a Solaris 2.x box with no swap space alloctaed at all (depending on the workload & the amount on RAM). When I have set up Sun boxes, I generally set up /tmp as a "tmpfs" -- uses memory (& swap), but tries to avoid disk I/O entirely. (SunOS 4.x didn't do it by default, but made it fairly easy. SunOS 5.x defaults to using tmpfs.) Based on the positive experiences I have had with tmpfs, and my general appreciation for how avoiding (disk) I/O is generally a Good Thing, I set up FreeBSD boxes to have /tmp mounted on swap using mfs. This tends to encourage a larger swap allocation than one might otherwise use; I start with 256 MB swap (and sometimes go up from there). Since I point /tmp at the mfs, I don't need space in / for it, so my root FS tends to be allocated at 20 MB, and actually use from 16 to 18 MB. (Most of the machines I set up need to be able to handle fairly significant quantities of CVS & "make" activity. And some of the folks for whom I set up boxes sometime change things around afterward; they know their situations better than I do....) Hope this helps, david -- David Wolfskill UNIX System Administrator dhw@whistle.com voice: (650) 577-7158 pager: (650) 371-4621 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808241525.IAA18079>