A New Take on RAM and Swap?

In: Computers|Insanity|Materialism|Performance

3 Aug 2008

A really random thought just popped into my head…

UNIX systems have their “swap” partition, a disk partition where unused stuff in RAM is “swapped out” to disk to make room for newer stuff in RAM. Of course, no hard drive is as fast as RAM, so you obviously want lots of RAM so you never touch swap. Windows has the same concept but calls it a paging file.

But what if your disk was as fast as RAM? I remain fascinated by OCZ’s new 64GB SSD, which has an almost-zero seek time, and throughput rivaling the best of hard drives. (Though I’m yet to read any actual reviews, as it seems to have still not quite shipped.) I suspect that, given factors like the direct bus between your CPU and RAM, and all the work on boosting RAM “speeds,” a solid-state disk wouldn’t literally be as fast as RAM. But I also think that the difference between having more RAM and “swapping out” to SSD would be somewhat negligible.

I think it’d be interesting to test the extent of this… Plunk an SSD (one with high throughput!) into a system, and run it on as little memory as you can. (Though I think you’d be hard-pressed to find anything less than 256MB DIMMs these days, and even those might be hard to find? I wonder if Linux has a facility for deliberately overlooking a quantity of its RAM?) And with that set up, go crazy with stuff to ensure that you’re using several gigs of “memory.”

We can sit around all day and measure bus speeds and Mbps throughput and latency and seek time, but I think the only meaningful measure would be to try this and see how it feels. I have a hunch that it wouldn’t be that big of a slowdown (compared to RAM), but that the biggest problem would be ensuring your SSD was on a separate controller/ bus/ channel, so you didn’t obliterate your hard drive performance. While it’s easy to get an affordable system with a couple gigs of RAM now, RAM remains expensive if you need a decent amount of it. Buying a system with 64GB of RAM would still be extraordinarily expensive, but with a 64GB SSD for under $300, you could imitate it fairly well.

Related posts:

  1. Handling Swap
  2. Tweaking SQL
  3. Microsoft Innovation
  4. Deal!
  5. Mindlessly Repeating Crap

3 Responses to A New Take on RAM and Swap?

Avatar

Mr. T

August 4th, 2008 at 12:43 am

You know that this sort of thing is built into Windows Vista right? It’s called ReadyBoost and it uses a fast flash drive as a memory cache.

This is similar to how in the old days some computers came with a special small but very fast “swap disk.” I don’t know if UNIX ever took advantage of such devices though.

Avatar

Matt

August 4th, 2008 at 3:32 pm

As long as I’ve used UNIX systems, and probably long before, swap was treated as a “partition,” so you could put it anywhere — a fast SCSI disk, a set of striped disks, etc.

I’d blogged about ReadyBoost earlier. Neat concept. :)

Avatar

andrew

August 6th, 2008 at 10:09 am

Unfortunately, ReadyBoost will only use up to 4GB (because it uses Fat32). But, then, why not swap to RAM:

http://hothardware.com/Articles/Gigabyte_IRAM_Storage_Device1/

;)

Comment Form

On Other Sites

  • Matt: Hey Victor, A couple good resources for you... http://www.scanboston.com/boston.htm is really det [...]
  • victor: Hi i just got a uniden bearcay scanner and have no local or regional frequency directory.just 1 460 [...]
  • Matt: I do use them periodically. I bought a few i760's, for perhaps $10 apiece in a lot, on eBay a while [...]
  • Marin: Did you eventually end up going with an iDEN phones using Direct Talk? I had some i560's a few year [...]
  • Dan: fyi, EOD = explosive ordnance disposal [...]