SWAP space obsolete?
November 16, 2011 11:25 AM   Subscribe

Is SWAP space obsolete?

I'm just wondering if in todays world of multiple gigs of ram in even the $300 laptops if it's worth using up a partition for it.
posted by mrflibble to Technology (14 answers total)
 
I use a large swap on my build server since I can never seem to have enough RAM.

It seems with more RAM available, IDEs and other programs just take up a larger footprint too.
posted by LeanGreen at 11:27 AM on November 16, 2011


In today's world, disk space is so cheap that setting aside an extra 1GB of swap is a very low cost, so you might as well incur it and forget about it.
posted by davejay at 11:30 AM on November 16, 2011


Eh, I still think it's worthwhile to give yourself a gig or so of swap so the OS can shove disused pages out of RAM and free up more for disk caching and other things that you'll actually notice. But if the OS offers it, I don't see much reason to not use a swapfile instead of a dedicated partition.
posted by Kyol at 11:31 AM on November 16, 2011


Response by poster: It's just ludicrous that we're still limited to 4 primary partitions. Everything else is advancing. Why isn't that?

Thanks for the input.
posted by mrflibble at 11:36 AM on November 16, 2011


You don't have to dedicate a partition for swap space. It's just a (big) file on one of the regular partitions.
posted by Chocolate Pickle at 11:36 AM on November 16, 2011


You'll get a speed boost if you put your swap on a different physical drive than your OS, but yeah, there's little to gain from putting it on a separate partition.
posted by Oktober at 11:41 AM on November 16, 2011


It's just ludicrous that we're still limited to 4 primary partitions. Everything else is advancing. Why isn't that?

Actually, it is: GPT

Windows (as usual) seems a bit sluggish about supporting GPT, but it's the standard on Mac, and both Linux and FreeBSD have been on board for a while.
posted by McCoy Pauley at 11:50 AM on November 16, 2011


Interesting question. Swap is certainly less important than it used to be for average users. Anecdatally, my workstation is using 13MB swap after two days uptime and a fair bit of use. I think you could probably get away without it, especially if you're not doing anything memory-intensive. Or perhaps start off with no swap and make an extended partition if you decide you need it?

You don't have to dedicate a partition for swap space. It's just a (big) file on one of the regular partitions.

On Linux, swap is a separate partition. It doesn't need to sit on top of a conventional filesystem.
posted by qxntpqbbbqxl at 11:57 AM on November 16, 2011


Don't you need swap if you suspend to disk (hibernate) vs suspend to RAM (sleep/suspend)? Maybe not the case if this is a Windows specific question. But that would be a good reason to keep swap around.
posted by quarterframer at 12:01 PM on November 16, 2011 [1 favorite]


Anecdata: My current rig I built in Spring 2010 runs the following: Windows 7 64-bit, Intel Core i7-930, 6GB DDR3, 120GB Mushkin Io SSD and 3x 1TB Hard Drives. I run no swap. In the 1.5 years I've had it only one time did I get a warning message indicating that I was about to run out of memory, and that was due to running a game alone with multiple Chrome windows with several tabs each. I also never drop into sleep or hibernation modes. I do plan on adding at least 6GB more to my system for this reason.

Given the price of RAM lately (under $100 for 16GB) I don't think any average user or gamer will touch their swap running 8GB or more. Anything server-based or on a workstation load (CAD, video editing, rendering, etc) still needs swap. I think in the next few years we'll see the need for swap go away for everything but the highest-end needs.
posted by Mister Fabulous at 12:20 PM on November 16, 2011


My linux system has 8 gigs of ram. I inadvertently left my swap partition unmounted for several months before I even noticed, and it wasn't because of any difference in performance. So for me I guess it is obsolete, but then I rarely break 20% memory use on here.
posted by Lorin at 12:48 PM on November 16, 2011


Regarding hibernation: The recommended usage for both TuxOnIce and swsusp seems to be separate swap partitions. Given the number of headaches you're in store for, trying to get Linux power management working at all on a laptop, I'd suggest sticking with the recommended usage. On the plus side, Linux doesn't care if your swap is an extended partition, GPT, etc. (source 1, 2)

So, swap pros:
- lets you hibernate
- cache-thrashing is still better than running out of memory, no matter how unlikely it is
- the disk space is basically free

And cons:
- your system could be a little slower if it's especially opportunistic about swapping things out
- swap space isn't encrypted by default in most distros, and could conceivably hold valuable information
posted by marakesh at 1:01 PM on November 16, 2011


Don't you need swap if you suspend to disk (hibernate) vs suspend to RAM (sleep/suspend)? Maybe not the case if this is a Windows specific question. But that would be a good reason to keep swap around.

In Windows, hibernation doesn't use the swap file. It uses its own.
posted by Chocolate Pickle at 1:12 PM on November 16, 2011 [1 favorite]


I believe it was Seymour Cray who first observed that the correct response to needing more RAM is to buy more RAM.

But disk space has always been way cheaper per byte than RAM space, every modern OS supports swap and expects some to be there, reserving a RAM-sized chunk of disk for swap generally costs a negligible amount of disk, and having it available means that you will find out that you need more RAM because you start to see swap space in use, not because your machine has just fallen over.
posted by flabdablet at 7:18 PM on November 16, 2011 [1 favorite]


« Older My closet is like a scene from Hoarders: The Mac...   |   Tell me about the best handmade gifts you've... Newer »
This thread is closed to new comments.