From owner-freebsd-questions Tue Oct 9 9:50:23 2001 Delivered-To: freebsd-questions@freebsd.org Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id E48DC37B40C for ; Tue, 9 Oct 2001 09:50:01 -0700 (PDT) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id CD480BD2F; Tue, 9 Oct 2001 09:50:00 -0700 (PDT) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id JAA13327; Tue, 9 Oct 2001 09:49:56 -0700 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id f99Gqr999802; Tue, 9 Oct 2001 09:52:53 -0700 (PDT) (envelope-from swear@blarg.net) To: Mike Meyer Cc: swear@blarg.net (Gary W. Swearingen), questions@FreeBSD.ORG Subject: Re: ideal swap partition space... References: <15297.5510.364245.686083@guru.mired.org> <7ypu7ygeso.u7y@localhost.localdomain> <15298.9768.941595.251630@guru.mired.org> From: swear@blarg.net (Gary W. Swearingen) Date: 09 Oct 2001 09:52:52 -0700 In-Reply-To: <15298.9768.941595.251630@guru.mired.org> Message-ID: Lines: 59 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Meyer writes: > Gary W. Swearingen types: > > I consider that far from ideal. :-) > > Patches are appreciated :-). I was too brief. It's my ideal to never dump core; others may disagree. > The author was Matt Dillon. There may be someone who knows more about > the FreeBSD VM system, but I couldn't identify them. Oops. So we're only discussing what he meant by "perform best". > > If one needs to page only 0.5x RAM, are we to believe that it makes > > a performance difference if we have 1x or >2x swap? > > Yes, you should. Remember, FreeBSD doesn't just swap pages out when it > has to, it moves them to swap if they're idle and unused. So the > amount you "need to page" is only part to the actual amount of swap > the system will use to optimize performance. Two points here. 1) When it swaps out pages it will never be swapping back in (ie, more than my 0.5xRAM) it buys nothing and probably is slowing things down (on average); better (on average or no worse) to have discouraged it from unhelpful paging by not having the extra swap space (for my limited 0.5xRAM requirements only of course). (I suspect there's some complicating issues near the limits, but give me a break.) 2) I can observe on my own system that it almost always has swapped out less than 1xRAM pages. I just can't believe the VM sytem cares how much unused swap area I have, whether its 0.5xRAM, 1xRAM, or 5xRAM. If the VM system requires more than a small fraction of RAM size to achieve very-near-maximum speed, then I consider it bad design, in these days of huge cheap RAM when a user-friendly system design will use allocate swap only as safety margin to avoid crashes from unplanned-for things like a memory leak (and not waste disk space that will never be used for anything whatsoever as the 2x rule would require in this case). > While you may be just as comfortable, but your performance might well > suffer. Again quoting the tuning man page: "Configuring too little > swap can lead to inefficiencies in the VM page scanning code". The words "might", "can", and "too" leave me comfortable. It IS easy to believe that the VM paging becomes inefficient when you get the swap area close to full, so more swap is "best" in some sense, but not in the sense that was being discussed, where you're asking for large areas of unused swap area, given my scenario of limited VM size needs. > You could ask Matt, but I suspect that if he meant someting like that, > he would have said it. I suspect that you write more easily than Matt. Technical writing is hard work for most people and it's very easy to try to be concise, leaving things unsaid and too often ambiguous. In man page writing it's obviously de rigueur, giving grief to thousands. But, hey, I don't mean to bite the hands that feed us; I'm very happy to have the benefit of a tuning man page at all. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message