23

After reading this question I started thinking:

"Hey, what happened to those RAM disk utilities we used to run in the ol' DOS days?"

I haven't heard about RAM disks for years until today, but why? Memory is still faster than disk and we have a lot of both.

Why aren't RAM disks more in use today?

Giacomo1968
  • 58,727
Alex Angas
  • 2,538

11 Answers11

32

Why I Use A RAMdisk Today: Addressing The 32-bit RAM Limit

Currently, I need to run a 32-bit operating system due to compatibility issues with some work software. My computer has much more RAM than Windows XP Professional can see, so I'm stuck with 3GB of physical memory.

When the 3GB wall is hit, then the computer will move to use the pagefile. Luckily, software exists to allow you to create a RAMdisk out of the RAM which is inaccessable to the operating system, in 32-bit environments!

SuperSpeed has a program called RamDisk which will allow you to do this. Another option is the Vsuite Ramdisk software (they both slightly differ - see the features list to see which one meets your needs).

I'm not specifically advertising any software, but those are a few I've come across which allow you to utilize some of the RAM outside of the addressable range of a 32-bit operating system.

While it's not nearly as good as having the OS directly access the RAM, having a RAM-based pagefile is much better than a hard-drive based one.

Scratchfiles - One More Reason (Applies To 64-bit As Well)


One more reason that you can use a RAMdisk is for photo/video editing (e.g. with the Adobe Creative Suite). Most Adobe programs can use a "scratchfile" for temporary storage (similar to a pagefile).

Placing the scratchfile on a RAMdisk would really help to increase the speed of video/photo editing, especially when you're nearing the RAM limits of the operating system (or program-defined maximums).

January 2010 September 2012 Edit:


I recently came across this website (the patch was removed but I have mirrored it on my website here), which allows you to patch the Windows 7 Kernel to allow the PAE of your operating system to extend the 4GB barrier (see this article mentioned in the previous link for more details on the actual mechanics behind the patch). This allows you to use over 4GB (up to 8GB) of RAM fully under Windows 7 32-bit.

Giacomo1968
  • 58,727
Breakthrough
  • 34,847
8

One really good fundamental reason why mem disks aren't very common: you're better off using the memory as disk cache.

You will already get most/all of the performance benefit of a ramdisk in normal operation by just letting the memory be used as cache. Disk writes can happen in the background where the latency isn't such a big deal, assuming you have enough cache.

You might still use a ramdisk In specialized circumstances (no writeable disk).

5
  1. OSs are better at using RAM - applications are loaded in to RAM and swapped in and out more intelligently.
  2. RAM disks are volatile - data in RAM disappears with no power, so we can't rely on them.
  3. 32-bit architecture can only address just below 4GB of RAM - you don't want to waste that precious RAM as a RAM disk.
  4. RAM is still quite expensive, relatively anyway
3

On Linux there's a filesystem called tmpfs, which is basically a RAM disk.

As its name suggests, it's frequently used for /tmp, because that folder only contains files that don't need to persist on reboot.

Live CDs use a RAM disk for their entire hard drive.

Brendan Long
  • 1,808
2

Very old post but still pertinent today (circa 2019.

The OP asked about DOS comparisons. I'll give most of you an archival retrieval.

Back in those days we used to be in a world filled with 640Kb of RAM, but we could activate an additional 384k of Extended memory. With software we could exchange this 384k into Expanded Memory (which was a format created by Lotus-Intel-Microsoft), which would allow compatible apps to utilize this precious 384k for the application. These apps were generally spreadsheet apps (Lotus 1-2-3, and the new Excel spreadsheet app from Microsoft). We did have RAM boards that could allow a 16-bit CPU to run an Above Board (RAM BOARD stuck with DRAM CHIPS) with addressable memory up to 2-4MB if it was a LIM-compatible hardware).

In today's world, 32GB can be overkill for most users, but some OEM's (Original Equipment Manufacturers) come out with 32GB standard models. So what can you do with that? You can do something that lubricates your OS, by making a RAMDrive out of some of that memory (4gb-8gb) so that temporary files apps and the OS create - will go there and be auto flushed when you reboot. You can even do this for Internet Browsers (Chrome can be configured to use this X:\Ramdrive\Cache path too with some small tweaks by creating a shortcut with new parameters and a single registry edit.)

Is it worth it?

A lot of RAMDrives are free nowadays and auto configure the SET TEMP, SET TMP environment variables. All you do is plug in the new drive letter of the RAMDrive and some of those inconsistent system errors, small crashes, slowdowns just go away.

Remember, that a lot of apps and updates don't exactly clear themselves out as we'd like.

And for gamers you can create a .BAT file that copies all the contents of your game and save files (keep the format of the folders and subfolders with a /S parameter with XCOPY. Make sure to create an extra SAVE.BAT that stores all your data back to the hard drive when you're done otherwise risk nothing being saved.

Giacomo1968
  • 58,727
2

Actually they are. There are even DRAM-based SSDs nowadays.

Yes, it is true modern HDDs are faster. But relative to other system components progress, they are much much slower. You cannot eliminate seek times, because your rotational speed is limited.

So for many purposes, RAM-based drive can give you a huge performance boost. Ever tried building a large software project on normal HDD as opposed to RAM drive?

Also note, that modern system kernels, such as Linux already use all the available (unused) RAM for block storage caching.

EFraim
  • 555
2

Those were in large part crutches to make up for the deficiencies of crippled operating systems, and a full service OS doesn't need them.

That is: for most purposes the OS caching mechanism will provide better performance.

It does the same thing (sticks "disk" resident data into RAM for fast access), but it has a pile of heuristics, and just-in-time optimizations for choose exactly what should be accelerated. There will be special cases when you can know better than the OS, but most of the time you should leave well enough alone.

2

I used my 2GB RAM disk to store a VMware virtual operating system (the whole thing, XP), saved and reloaded automatically on syartup/shutdown. I then ran it off the ramdisk with VMware Play. This made the entire virtual operating system RAM disk speeds including all I/O with it's system files (all of them, not just some) and as you can imagine, performance was astounding!

Other than that, extraction of Zip/RAR files go much faster, as well as DVD encoding.

Giacomo1968
  • 58,727
Mamba
  • 21
0

Why would a RAMdisk be used today?

because RAM is dirt cheap and a RAM disk is faster than a conventional platter hard disk drive, by a countrymile (or over 300 times).

note: a RAM disk may not be a suitable solution for each and every scenario, but where it is applicable it beats any disk drive known to man hands down.

0

Because :

  1. While computer specs have improved enormously, software has become much inflated and requires much more memory. A small memory disk isn't much help any more.
  2. A memory disk is only good for one thing : keeping temporary files. Not many programs spend their time juggling temporary files any more, and when they do these files tend to be quite large.
harrymc
  • 498,455
0

I'd have to say that they're not in use much anymore because of software bloat and mass storage growth have far outstripped RAM. It used to be that machines would have more RAM available than storage (example, my old XT with 640K RAM and a 360K disk drive). That made it a no-brainer to make a 384K ramdisk, copy your app onto it and run off of it (still leaving an adequate, for most apps of the day, 256K of RAM). Contrast with systems nowadays that come with a 1TB drive, but only have 1GB of RAM...