The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Reinstall for nothing and your headaches for free! by XndeX2006-03-30 07:12:03
  Coming in late on this, but regarding swap: by bwkaz 2006-03-30 19:53:15
I very much doubt that you need anywhere *NEAR* that much space for swap. Linux doesn't use swap like Windows does; it doesn't write out all memory to the swap file just in case it might have to dump a page or two later on. (At least, that appears to be the way Windows does it, based on the recommended minimum amount of swap equaling the physical amount of RAM.)

Linux only writes to the swap file (or partition) when it actually swaps a page out. This makes swapping out a little slower, but it makes the rest of the machine's operation *much* faster under heavy disk activity. (My 2K Pro box at work slows to a *crawl* while it's being backed up. I'm using maybe 2% of the CPU, and yet it's acting like a P2-350, instead of the P4-whatever that it actually is. The disk is going nuts, though, so I have to assume that that's what's holding the rest of the system back.)

Therefore, in Linux, you only need an amount of swap equal to (amount of physical memory in use by all programs) - (amount of physical memory installed in the box). The howtos that reference 2*(amount of RAM) are horribly outdated. Plus that relationship really doesn't hold when you change the amount of RAM: If you add 512MB of RAM, why should you add a gig of swap? You will be moving data out from swap and into RAM, not out from RAM and into swap, so why should you add more swap space? You won't use it.

(I run 768MB RAM and 384MB swap. To my knowledge, I've never had to touch the swap partition except in one case, see below. I've certainly never had the OOM killer run, except in the same case as when I touched the swap, above: I was running a DC client that had a memory leak, alongside the Linux port of Rune.)
[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)