Subject: [haiku] Re: Why the MMU? From: "Jonas =?iso-8859-1?q?Sundstr=F6m?=" <jonas@xxxxxxxxxxx> Date: Thu, 11 Dec 2008 02:13:36 +0100 CET It's a good idea to support paging to disk, for the occasional memory overload, even when having huge enough amounts of RAM for this to be unlikely. Simply having a page file should not affect performance, as long as its mostly never used.The purpose of the page file is for the system as a whole to be able towork with a total amount of memory exceeding its physical memory. In out of memory situations the page file is used to temporarily hold the memory pages in use that are least likely to be needed soon, so the kernel can free up RAM and make it available to itself and to applications. Moving pages of memory to disk (or reverse) means a temporary performance hit. How noticeable this gets depends on a couple ofthings. A modern paging implementation is a good start. In any case itsmuch better than suddenly running out of memory completely.
Actually I'm not convinced of the need to page to disc these days and with the rise of flash RAM SSD in place of an HD it's actually a rather bad idea. Flash RAM degrades over time as you write to it, eventually it becomes unusable, using an SSD for swap / the page file is a very effective way of killing it. Flash discs will move writes around to avoid it degrading but this can only work so far, eventually it will just die.
Be of course had a very good solution to this, their swap system didn't kick in unless it really, really needed to. When it did it was incredibly slow. It silently gave you the hint: don't waste memory!
Anyway swap should probably be deactivated by default in SSD systems and disc written to only if it *really* needs it. This will not only boost performance (SSD writes are slow) it'll also save power.
-- Nicholas Blachford nicholas@xxxxxxxxxxxxxx http://www.blachford.info"Does it give loads of powaa for little wonga and overclock like a mutha?" - dizietsma