NTFS RAM disk gradually loses space due to indexing

Started by ambv

NTFS RAM disk gradually loses space due to indexing   05 April 2023, 20:08

When Windows 11 is using the RAM disk for an extended period of time (21 days on the screenshot), the RAM disk starts reporting used space that isn't linked to any files. In the picture you see that the only folder on the drive reports a "Size on disk" of 2.12 GB while the RAM disk reports 12.3 GB of used space.

When the RAM Disk application starts, this is not the case. Rather, it is slowly getting worse over time.

I discovered the reason. It's because of the "Allow files on this drive to have contents indexed in addition to file properties" setting on the RAM disk.

Is there any way to disable this by default when the RAM disk gets created?

SoftPerfect support forum
SoftPerfect Support forum - Andrew avatar image

Re: NTFS RAM disk gradually loses space due to indexing   05 April 2023, 21:49

I believe the indexing should be off by default, at least the setting that enables indexing contents is off when we create a new RAM disk on our test system.

If for some reason it's on by default on your system, I would suggest using exFAT instead. Generally, NTFS is more advanced as it supports file compression, symbolic links, quotas and transacted operations. On the other hand, exFAT is more lightweight, and since it doesn't have the NTFS overhead, it has 10-20% better performance with RAM disks.

If you don't use the above-mentioned features with your RAM disk, then exFAT would be a better choice, solving the issue with indexing and offering better performance.

Re: NTFS RAM disk gradually loses space due to indexing   06 April 2023, 00:17

Thanks for the suggestion. I cannot use exFAT as the use case here is running Windows unit tests for the Python programming language. There are some tests specific to NTFS that we want to run.

Maybe what's happening here is that Windows 11 now defaults to allowing indexing? There is a PowerShell way to disable indexing on a drive explicitly. Maybe you could put this as an explicit option in the configuration of a RAM disk and execute this WinAPI call on mount?
SoftPerfect Support forum - Andrew avatar image

Re: NTFS RAM Disk slowly leaks space due to indexing   06 April 2023, 19:15

Thanks, we'll have a look at what can be done and post an update here.
SoftPerfect Support forum - Andrew avatar image

NTFS RAM disk gradually loses space due to indexing - Fixed   14 April 2023, 14:08

Thank you for your patience. We found the bug that was causing contents indexing to re-enable after rebooting, despite being disabled when manually mounting a RAM disk.

We've fixed this in our latest build, ensuring contents indexing stays disabled for all NTFS volumes.

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: