RAM Disk and Windows System Cache

Started by Phalanthos

RAM Disk and Windows System Cache   17 August 2023, 00:11


Microsoft states the following regarding System Cache in Windows:

"By default, Windows caches file data that is read from disks and written to disks. This implies that read operations read file data from an area in system memory, known as the system file cache, rather than from the physical disk. Correspondingly, write operations write file data to the system file cache rather than to the disk, and this type of cache is referred to as a write-back cache. Caching is managed per file object. Caching occurs under the direction of the Cache Manager, which operates continuously while Windows is running." (https://learn.microsoft.com/en-us/windows-server/administration/performance-tuning/subsystem/cache-memory-management/)

The data that is stored in a RAM Disk when is read or written goes back and forth to system cache needlessly because it is already in the RAM rather than an SSD or HDD. Is that correct?

Is there any way to avoid this data flow between RAM Disk and System Cache? (via Registry or some other way) Can you implement some feature in SoftPerfect RAM Disk that prevents this?

Thanks in advance,
SoftPerfect Support forum - Andrew avatar image

Re: RAM Disk and Windows System Cache   18 August 2023, 11:06

You are correct in your understanding. When data is stored in a RAM Disk, it is already in the system's RAM. Despite this, when data is read or written from/to the RAM Disk, Windows' disk cache mechanism will still be involved, potentially causing the data to be cached again in the system file cache. This does indeed seem redundant given that the data is already in RAM.

As of our current knowledge, there isn't a direct programmatic method to turn off the Windows disk cache for a specific drive or RAM Disk. However, it's worth noting that software applications with intensive I/O operations, such as database servers, often use mechanisms like unbuffered I/O and disk write-through. By leveraging these mechanisms, they can bypass the Windows file system cache, resulting in the highest possible performance when operating on a RAM Disk.

While we continuously strive to enhance the performance and capabilities of SoftPerfect RAM Disk, we currently do not have a feature that prevents this specific data flow between the RAM Disk and the System Cache. We appreciate your feedback and will certainly consider it for potential future improvements.

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.




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


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

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