RAM File System benchmarks
We measured RAM File System performance against the likely alternatives on each platform: Windows, macOS and Linux. Every platform was tested on one computer in one session, each figure is the median of several runs, and the charts include the tests where RAM FS did not win. The figures are not comparable between platforms, because the computers and the tools are different.
Windows
Compared with SoftPerfect RAM Disk formatted as NTFS, and a Samsung 990 PRO NVMe SSD, on an Intel Core i9-13900KS and 96 GB of memory, running Windows 11 24H2 with Windows Defender real-time protection off.
RAM FS NF is a RAM FS volume with the Do not attach filters option of Windows 11, which keeps antivirus, backup, cloud and indexing filters off the volume. The trade-off is that files on such a volume are not scanned in real time.
Reading and writing files through the cache
Buffered throughput, which is how ordinary applications read and write. Single thread, GB/s, higher is better.
Sequential, 1 MiB blocks
Random, 4 KiB blocks
The SSD and the RAM Disk are almost equal in their performance, because both are served by the Windows file cache rather than by the device. RAM FS does not use that cache and serves files straight from memory, so it is 2–8× faster than either.
Direct I/O, bypassing the cache
Unbuffered throughput, which is what disk benchmarks such as CrystalDiskMark measure. Single thread, GB/s, higher is better.
Sequential, 1 MiB blocks
Random, 4 KiB blocks
Without the cache, the RAM Disk is a much closer rival. It is level with RAM FS on large queued sequential transfers, while RAM FS is 50–80% faster on single-stream ones and about 2× as fast on small random I/O. The SSD is furthest behind on single random reads, where its latency holds it to about 12,500 operations per second while RAM FS answers over a million.
Working with many files
Extracting, copying and deleting a source tree of 600,000 files, about 10 GB. Seconds, lower is better.
Creating, opening and deleting files is quicker too, not just reading and writing them. The copy is furthest ahead, about 10× quicker, because a copy within the same volume shares memory with the original instead of duplicating it. Extracting is partly limited by the processor, which has to decompress the archive whichever drive it lands on, so the gap there is narrower.
macOS
Compared with Apple's tmpfs, a RAM disk made with hdiutil and formatted as APFS, and the internal SSD, on a Mac mini with an Apple M2 and 16 GB of memory running macOS 27.0.1.
Reading and writing files through the cache
Buffered throughput, which is how ordinary applications read and write. One file, GB/s, higher is better.
Sequential, 1 MiB blocks
Random, 4 KiB blocks
RAM FS leads on sequential transfers, by more than 2× on a single stream. On random 4K I/O the field is closer: reads from the SSD and the RAM disk come from the macOS file cache, so they match tmpfs, and tmpfs is ahead of RAM FS by 13–17% on single random writes and on heavily queued random reads.
Direct I/O, bypassing the cache
Unbuffered throughput, which is what disk benchmarks such as AmorphousDiskMark measure. One file, GB/s, higher is better.
Sequential, 1 MiB blocks
Random, 4 KiB blocks
RAM FS is ahead of the RAM disk in every test, by up to 14× on small random I/O. Against tmpfs it leads by more than 2× on single-stream sequential transfers and is level on heavily queued random writes, while tmpfs is ahead by 13–16% on heavily queued random reads and on single random writes. The SSD is furthest behind on single random reads: about 14,800 operations per second against 1.3 million on RAM FS.
Working with many files
Extracting, copying and deleting the Linux 6.12 kernel source: 92,000 files and folders, about 1.5 GB. Seconds, lower is better.
RAM FS is quickest at all four. The margins are smaller than in the throughput tests because most of the time goes on creating and removing tens of thousands of small files, not on moving data.
RAM FS advantages over macOS tmpfs
tmpfs is close on raw speed, but it is a bare scratch area. RAM FS is a complete file system that additionally offers:
- Transparent compression that fits more data in the same amount of memory.
- Reflink copies: Finder duplicates and cp -c are clones that share the original's memory. tmpfs has no clones, so a copied tree takes 2× the memory.
- Persistence: a volume can be saved to an image file, mounted at start-up with its contents and saved automatically. A tmpfs volume is lost when it is unmounted.
- Folder mirroring runs an existing folder in memory under its own path and writes the changes back to the disk.
Linux
Compared with tmpfs, a kernel RAM disk (brd) formatted as ext4, and an SSD, on a laptop with an Intel Core i7-5600U and 8 GB of memory running Kubuntu 24.04. This is a modest, older computer, so the absolute figures are low. What matters is how the targets compare with each other.
Reading and writing files through the cache
Buffered throughput, which is how ordinary applications read and write. One file, GB/s, higher is better.
Sequential, 1 MiB blocks
Random, 4 KiB blocks
RAM FS is ahead of or level with tmpfs in every test: by about 50% on single-stream sequential transfers, by 55–75% on writes from many threads, and level on reads from many threads. The RAM disk falls well behind on most of them, because its data is held twice: once in the page cache and once in the disk.
Direct I/O, bypassing the cache
Unbuffered throughput, which is what disk benchmarks such as KDiskMark measure. One file, GB/s, higher is better.
Sequential, 1 MiB blocks
Random, 4 KiB blocks
RAM FS is again ahead of or level with tmpfs in every test, by 43–53% on single-stream sequential transfers and 56–71% on writes from many threads. It is 20–100% faster than the RAM disk throughout. The SSD is furthest behind on single random reads: about 10,800 operations per second against 770,000 on RAM FS.
Working with many files
Extracting, copying and deleting the Linux 6.12 kernel source: 92,000 files and folders, about 1.5 GB. Seconds, lower is better.
RAM FS is quickest at all four. Its default copy is a clone that shares the original's memory, so it is about 2× quicker and takes no extra space: the copied tree left 1.8 GB in use on RAM FS and 3.3 GB on tmpfs, which has to duplicate every file.
RAM FS advantages over Linux tmpfs
tmpfs is close on raw speed, but it is a bare scratch area. RAM FS is a complete file system that additionally offers:
- Transparent compression that fits more data in the same amount of memory.
- Reflink copies: an ordinary cp is a clone that shares the original's memory. tmpfs has to duplicate every file.
- Persistence: a volume can be saved to an image file, mounted at start-up with its contents and saved automatically. A tmpfs volume is lost when it is unmounted.
- Folder mirroring runs an existing folder in memory under its own path and writes the changes back to the disk.
Where RAM FS shows no significant gain, and why
Work limited by the processor rather than by storage finishes in about the same time on every target. Compiling code is the obvious example: the bottleneck is the CPU, not the disk. RAM FS helps wherever storage is the critical point. When instead the processor is the limit, there is little left for faster storage to improve.
That said, a build is still worth pointing at RAM FS. Compilers and linkers produce many short-lived intermediate files, and keeping those in memory spares your SSD the constant writing and deleting. Keeping temporary files off your permanent storage can prolong the drive's life and reduce the clutter.