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?

1
  • 1
    Amiga OS still uses a ramdisk by default. Sep 3, 2009 at 13:22

11 Answers 11

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.

0
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).

2
  • 1
    Another "specialized" case is where latency does matter. In other words, where you want not just fast average read-times, but all fast times, maybe even especially the first time. I'm thinking of a web server, since there are often content-delivery-network caching in between them and the end-user. Another way of looking at a RAMdisk is like a cache that is pre-loaded with certain things (as opposed to starting empty and learn-as-it-goes like most cache.)
    – MarkHu
    May 7, 2013 at 21:14
  • And another is when you have large amount of I/O but you can allow it to be volatile. The normal operation of cache have periodic flushes of the data (otherwise it could never be written to disk so saved file would not be, well, saved) so it can saturate in the background with heavy I/O by temporary files. Aug 30, 2013 at 17:38
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
4
  • 2
    It is not the case that 32-bit architectures can only address just below 4GB of RAM. See en.wikipedia.org/wiki/Physical_Address_Extension Sep 2, 2009 at 18:15
  • 1
    Though that tech isn't available for most home users. Sep 2, 2009 at 20:23
  • 1
    Often apps will write lots of small files, you don't need to keep past a reboot. For these RAMDISKS are greate!! Feb 24, 2011 at 13:32
  • 1
    @Rich Bradshaw - Point 3. is not true (as ChrisInEdmonton pointed out). I would suggest changing "32-bit architectures" to "Some 32-bit operating systems". I find it annoying that this myth persists just because of one crippled OS. Nov 2, 2011 at 3:39
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.

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.

3
  • Ummm... I don't think this is what the OP had in mind. The OP is referring to RAMdisks around the 8086-80486 era, where RAM was very expensive and a nonvolative memory device like a floppy disk, hard disk was used to augment the system memory. I don't think he meant using DRAM media in place of a typical nonvolatile storage device.
    – J. Polfer
    Sep 2, 2009 at 18:01
  • 1
    Wait... nevermind... I misread the post.
    – J. Polfer
    Sep 2, 2009 at 18:03
  • Big problem with the SSDs is that their still bound to the slow I/O interfaces (which software RAM disks are not). Jan 13, 2010 at 14:28
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

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.

0
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.

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.
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
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...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .