SoftPerfect RAM Disk & RAM File System

RFS image file grows too large

Started by docsoc

docsoc

RFS image file grows too large   05 August 2026, 16:26

It's about the .rfs file, which is the image of the RAM File System. I noticed it grows unexpectedly large in size. A 3GB RAM FS volume saves as 34GB - more than my system's total RAM. The RAM Disk app saves a 3GB image to just 3GB - same as the allocated RAM.
SoftPerfect Support forum - Andrew avatar image

Re: RFS image file grows too large   05 August 2026, 17:32

That was one of the edge cases we unfortunately missed in the initial releases. When there are a large number of very small files, a RAM FS image could become unnecessarily large because each file, no matter how small, occupied a 2 MB block in the image.

We have already discovered and fixed that issue, and a new version will be available in a few days. It will also include a new feature that lets you use a folder instead of an image file. In other words, a RAM FS volume can be populated from a folder at startup and synchronised back on shutdown. This uses a delta-sync mechanism, so only files that have changed, and only the modified portions of those files, are written back to the source folder, thus making it fast and gentle on the SSD.
docsoc

Re: RFS image file grows too large   05 August 2026, 20:42

I still prefer the an image file though, as I've been using it for years in the RAM Disk software. I backup the image file regularly because sometimes some glitches make the image unable to be read by the software, especially when the PC's power supply is accidentally shut down. It's just that the .rfs file now grew to more than 34Gb and the time it takes to back it up to another disk takes too long as it is being copied as a real 34GB file.
SoftPerfect Support forum - Andrew avatar image

Re: RFS image file grows too large   05 August 2026, 21:23

Yes, the excessive image size has been fixed in the upcoming version. Small files are now packed together instead of each occupying a separate 2 MB block. This keeps the image much closer to the amount of data actually stored.

The old image is a sparse file, but some backup programs expand its empty areas while copying it. This explains why the backup becomes a real 34 GB file and takes so long.

After updating, the quickest way to compact an existing image is to save the mounted volume to a new .rfs file. Once you have verified the new image, the old oversized one can be removed.

RFS images are also crash-safe by design. During a save, the previous complete snapshot remains intact while the new one is written. RFS switches to the new snapshot only after it has been fully written to disk. If power is lost midway, it loads the previous complete snapshot instead of a half-written one.

Note: Changes made since the last completed save can still be lost, for example if you lose your power supply, so backups remain advisable.
docsoc

Re: RFS image file grows too large   12 August 2026, 23:20

I have tried v26.8.1 (currently the latest). For a 3GB RAM FS volume that has 2GB of files, it is saved as a 6.96GB image file. Is there a way to have it saved like the original RAM disk that it saves only 3GB if the allocated RAM for the disk is only 3GB?
SoftPerfect Support forum - Andrew avatar image

Re: RFS image file grows too large   13 August 2026, 09:23

The 6.96 GB is the file's nominal length, not the space it actually occupies. RFS images are sparse files, and the empty areas inside them take up nothing on disk.

Please check this first: right-click the .rfs file, choose Properties, and compare Size with Size on disk. Your "Size on disk" should be close to the 2 GB you actually store. If so, nothing is wrong - the volume is not consuming 6.96 GB anywhere.

The nominal length exceeds the volume size because of the crash-safe design. When saving, RAM FS never overwrites the previous snapshot: changed blocks are written to fresh areas, and the superseded ones are released back to empty space only after the new snapshot is fully committed. That is what lets a save survive a power cut, but it leaves the file's nominal length at a high mark while the space genuinely used falls back to roughly the amount of data stored.

This is where RAM FS differs from RAM Disk. A RAM Disk image is a flat copy of a fixed-size disk, so it is always exactly that size. An RFS image stores the file system's own contents in a copy-on-write layout, so its nominal length can exceed the volume size while its real disk usage is usually well below it.

For backups, the problem is that many backup tools do not understand sparse files and expand every empty area into real zeroes. Two ways around it:
  • Rather than copying the .rfs image, save the mounted volume directly to your backup location as a new .rfs. A fresh save lays the data out compactly, and you skip the copy altogether.
  • Or pack the image with 7-Zip or into a ZIP file - archivers store only the real data.

If your "Size on disk" turns out to be near 6.96 GB, please tell us that figure along with roughly how many files the volume holds and their typical size, and we will look into it.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **     **        **   *******   **     **  **     ** 
  **   **         **  **     **  **     **  **     ** 
   ** **          **  **     **  **     **  **     ** 
    ***           **   ********  **     **  **     ** 
   ** **    **    **         **   **   **    **   **  
  **   **   **    **  **     **    ** **      ** **   
 **     **   ******    *******      ***        ***    

Message: