Best Ramdisk Software

0 views
Skip to first unread message

Sullivan Maurer

unread,
Aug 3, 2024, 1:22:05 PM8/3/24
to keymattegua

I've always been attracted to the notion of using a RAM disk for my swap file location, but never really got round to trying it out, and to be honest I'm not totally certain how well it would work in practice.

A common use is to put MySQL's tmpdir on a ramdisk (e.g. tmpfs) if your web application creates a lot of on-disk temporary tables, i.e. Created_tmp_disk_tables is large and getting larger all the time.

My netbook rsyncs my Firefox profile to a RAM disk on boot, removing the very slightly irritating pauses caused by the urlclassifier file being updated on the not-fast-to-write-to SSD after page loads. It rsyncs it back on full shutdown so new bookmarks and such are not lost between boots (using the inplace option which reduced the number of writes needed in the simple tests I performed) or when I command it to (i.e. after making a number of changes like installing+configuring plugins).

I know it's not a server, but on old macs you used to be able to set a ram-disk up and then install a minimal OS 7 into it, set it as your boot volume, then reboot from it. It seemed scary, but it always worked, and it definitely made the finder act more responsive. Some claimed it even made photoshop run faster, but I was never clear on that.

On a firewall the hard drive was replaced with a compact flash card. A RAM drive is used because CF cards have limited write cycles. On shutdown anything in the RAM drive that needs to be preserved is transferred to the CF card and reloaded on reboot. I am currently looking into creating Linux thin clients using the same idea.

There are legitimate uses for a RAMDISK, but not many. The system cache provides most of the benefits of a RAMDISK without the disadvantages. A RAMDISK requires tying up a substantial amount of RAM when it may be better used for other purposes. You will often optimize one aspect of performance but lose it elsewhere.

I haven't seen ram disks used for a long time, but I think that's because tools like memcached allowing for greater scaling and the fact that you can get such fast hard drives now (thinking of SSD drives) that performance is not such a consideration (see this post for how it didn't make any major differences).

An example of an interesting using of memcachd is Twitter. A very smart idea for ramdisks is a privacy system, especially for local user - just think shutdown and the data is gone (idea from Surasoft).

Back when I ran sendmail, I used a ramdisk (technically, Linux tmpfs, but it's functionally the same thing) for the hoststat database. It takes up very little room, but it creates a ton of inodes. Sendmail didn't (at the time) do any housekeeping on it, and it grows quickly even on a modestly busy mail server. I used a ramdisk so my cleanup script wouldn't cause the disks to thrash about due to all the directory lookups.

Solaris mounts /tmp in ram (or swap, depending on how you look at things), and you can set up Linux to do the same. Ages ago, I had a the same set up on my OS/2 box, I'd unpack stuff there, and it was good for a speed improvement (original was on disk, not having to hit disk was a win, and OS/2 had a fixed size disk cache).

Although it's not literally a RAM disk, the architecture of Mailinator is in the same spirit. Basically, since the content Mailinator handles is not 'valuable', they can afford the risk of its loss to dramatically improve performance.

By putting eventually needed driver modules into the ramdisk, you can keep a small, modular kernel, and still boot from many different devices (from a "normal" disk, over different raid controllers to a root filesystem on a network via NFS) - without having to compile your drivers into the kernel.

And then, although I never used one for anything else but the above, yes, they can be useful in situations where you have some reasonable amount of larger temporary data to write very often, where it might not be a big thing when it get's lost in the probably rare case a server goes down, and very fast reading and writing is required

I use a ramdisk for compiling (/tmp is set up as tmpfs on my computer). I've never bothered timing it though.

On Windows I used to use a ramdisk as my scratch disk in Photoshop (since it insists on using one even if you have way more memory than it needs). I think it would be interesting to put the textures folder for World of Warcraft on a ramdisk, but I stopped playing before I got enough memory to try it.

I store sessions in mysql on a RAM disk. Much better than the memory table type as you can have indexes, and fewer contention problems and write delays than hoping that the system will sort it out - databases want to make sure your data is secure, we don't really care, just want it fast. Scheduled reboots can copy to disk then back (though we tend to just let the sessions expire), and it was less work to implement than changing the sessions store to use memcached (you can't do queries to expire old sessions in memcached - it's not as simple as letting them expire).

My home server runs an Internet proxy (FreeProxy). Since it's a cheap server, and the hard disks aren't the fast ever, I use a 1GB RAM disk for the location of the proxy cache files. Makes a huge difference in performance, and only gets lost when the server is rebooted (once a month or so depending on Windows Updates!).

So the "Default\cache" is not the only folder which is being accessed frequently. I took this screenshot when there were 21 tabs open and was trying to access least used ones way in the background window.

In general, the virtual memory subsystem and filesystem of your OS are smarter than you about how to allocate and use physical memory (especially for filesystem buffer caching). By devoting a chunk of RAM to a ramdisk, you are reducing the amount of RAM available to your OS by dedicating it to one single purpose. If you take too much RAM away from your OS, you will experience general performance degradation caused by low availability of RAM, though the application(s) that use the ramdisk may perform better. This is a trade-off you have to make.

A RAM Disk, also called RAM Drive or RAMDisk, works in many regards just like a hard drive. The core difference is that it is a virtual hard drive that uses RAM for storage. With it come notable differences born out of that: a RAM Disk is faster than hard drives, and the storage space that it offers is only available during the session unless the software supports the saving and loading of disk images.

These traits make RAM Disks ideal for a lot of purposes. You may use it as fast, temporary storage for temporary data. Move the browser cache to the RAM Disk, and never have to worry again about it filling up valuable disk space (as it is only available during that session).

You may even install applications or games on the RAM Disk to benefit from faster loading times and less performance related issues while playing those games or using those apps. Another option is to move files that you want to process to the RAM Disk to speed that up.

AMD Radeon RAMDisk is not limited to devices equipped with AMD Radeon hardware. Anyone can download and install the program, and use it to create a single RAM Disk with up to 4 Gigabytes of space. The limit is raised to 6 Gigabyte on systems with AMD Radeon Memory.

Gavotte RAMDisk supports the creation of a single RAMDisk on Windows machines -- XP or newer as well as Server 2003 and 2008 -- with no size limitation. The interface is basic but functional. Install and remove the RAM Disk, configure its size, drive letter and media type, and use the load or save image buttons for persistent storage.

One of the interesting features of ImDisk is that you may use it to create dynamic RAM Disks. Instead of specifying a size during setup, you may check the "allocate memory dynamically" option to have it changed on the fly.

OSFMount supports the creation of multiple RAM drives, and does not limit the size of them. You may select drive letters during setup as well, and may set them to read-only. Data can be saved to image files so that you can load it in the future again.

The program may be used to create multiple RAM Disks that are not size limited. It offers basic functionality besides that however: you cannot assign drive letters to disks, and there is no option to save and load disk images as well.

The overview and description of each program is certainly helpful in determining the best suitable program for your use cases. I suggest you check out Raymond's RAM Disk Software benchmark to find out how many of these programs perform.

On a personal note, I have used SoftPerfect RAM Disk for the past years (the latest free version), and cannot be happier with it. It offers great functionality, and the downside that it is no longer maintained does not bother me as it works fine and without issues.

Tried PassMark OFSMount ramdisk application today and absolutely recommend it.
I am running 32GB sys and have a 28GB drive running on it, stable with only web browser open. Great for large file downloads as VR movies, etc for video editing and then saving down to an external HDD on system shut-down.

I suggest that you consider adding ERAM to this list. It works on Windows XP/NT/2000/7/10 (32 and 64-bit) and has a maximum limit of 4 GB on Windows 7/10 (until I fix the BSODs caused by using a disk that is larger than that after removing the limit). Its driver and source code can be found by going to

Went to all this work to write this up and not a single benchmark, so sad. You need to use Crystal Disk Mark to get transfer speeds. Not all RamDisks are created/coded with the same optimization, so some are up to 50% faster than others! Hope you can update this article with benchmarks!

Generally, wholeheartedly agree. Most modern, mainstream software will make plentiful use of your ram is need be and its available which negates most RAM disk benefits. And data security outweighs any gains.

I have however a niche use case where there are significant benefits. I work as a structural engineer designing buildings. I am currently working on a building where one floor will house vibration sensitive scientific equipment. I am running a finite element analysis model to look at the impact on the dynamics of modifying a number elements and properties. Right now I have 18 models to run, each taking 2-3 hours to run. Turns out the software is fairly niche and as a result its optimisations are far from ideal! The whole thing is mostly single threaded, but can get around that by running multiple instances at once. Next issue is that analysis spends half its time maxing out my SSD at 500MB/s. I could upgrade to an NVME SSD or create an SSD RAID array but given that this is fairly infrequent work, a RAMdisk is ideal. I am shaving 30% off analysis time, and getting a more usable computer for light office tasks while analyses run :). Issue of data loss is also of low importance as I am copying files from network drive and back again when analysis is complete (worst case is a loss of a couple of hours compute time).

c80f0f1006
Reply all
Reply to author
Forward
0 new messages