RAM Disk on Windows 11

Anonymous
2023-03-24T16:40:00+00:00

Hi, I wanted to create a RAM disk on Windows 11. I found an article for Windows 7 and 10 which has been updated recently:

https://answers.microsoft.com/en-us/windows/forum/all/create-a-ram-disk-drive-in-windows-7-and-windows/cd42aac4-8b0e-4b61-a2ea-9560a3e17d5b

However, when I tried it on Windows 11, it didn't seem to work properly.

After making changes to the TEMP and TMP environment variables as well as some application specific temp / cache paths to point them towards the RAM disk, everything appeared fine initially. But when running more intensive workloads, I experienced intermittent crashes and eventually a blue screen: DRIVER_IRQL_NOT_LESS_OR_EQUAL (probably related to the storage driver implementation used by ImDisk).

After reverting the changes I made to the temp / cache directories, removing the RAM disk, and uninstalling ImDisk, everything has been stable again.

My question is: Is there any way to set up a RAM Disk on Windows 11 without compromising system stability?

For my use case, I don't require persistent storage, but it should be auto-mounted on boot.

Thank you, Paul.

PS: Please ignore discussions regarding why someone might need such a setup; each person has their own unique use case which doesn't necessarily apply universally.

PPS: Revisiting this thread after nearly a year reveals that there is no official solution from Microsoft. While there may be paid options available, given the history of free solutions causing issues under load, I am hesitant to invest time and money checking each one individually.

In summary, there seems to be no official or unofficial (but endorsed) solution at present.

Windows for home | Windows 11 | Devices and drivers

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

46 answers

Sort by: Oldest
  1. Igor Leyko 112.4K Reputation points Independent Advisor
    2023-03-25T13:05:05+00:00

    Insteasd you can increase virtual memory size or page file size.

    Sorry, but virtual disk (RAM disk) and virtual memory are totally different conceptions.

    P.S. Windows 11 is Windows 10 successor and have a LOT of code that is common with Windows 10.

    Was this answer helpful?

    20+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-03-25T13:07:02+00:00

    Alright, tank you RAJU.MSC.MATHEMATICS and Igor Leyko.

    So there is no official way.

    (Also, very interesting Igor, I'm going to check if I find any sources on that so I know why they didn't bother!)

    Adjusting virtual memory size is not the issue, I have enough physical RAM, which is why I want to use it for temporary files that do not need to be persisted over a reboot.

    Because of the locked down tool-chain in my application I only get actual files as an in-between step. I've tried piping them directly, but that unfortunately didn't work so my best bet would've been a RAM disk.

    In the meantime I've tried Arsenal-Image-Mounter which can also create RAM disks, but it too has issues.

    You can't auto-mount it on boot (afaik) and sometimes Windows complains about driver issues and request I restart the computer.

    I've also found another software from AMD: Radeon RAMDisk, but I'm not even bothering with it since it also lists Window 10 as the newest possible OS (Thanks Raju for pointing out virtual disk driver isn't supported anymore)

    Was this answer helpful?

    7 people found this answer helpful.
    0 comments No comments
  3. Igor Leyko 112.4K Reputation points Independent Advisor
    2023-03-25T13:52:27+00:00

    > Also, very interesting Igor, I'm going to check if I find any sources on that

    Please share the information if you'll find any public mention of this. I've got this information from some private source or during visiting Microsoft campus in Redmond. Sorry, I do not remember exactly.

    And I may add, the effect of RAM drive could be effective with a lot of creating, reading, deleting files by some process, e.g. during a project compilation. In other cases available RAM decreasing has more negative effect than gain from a RAM drive. And this gain is much smaller mow due to hard drives replacing with very fast M.2 SSDs.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2023-04-18T16:54:12+00:00

    Hi Igor, unfortunately I couldn't find anything official, but there are 2 tidbits I found interesting.

    First, Microsoft has been playing around with ram disks for a long time. Here's an example driver for Windows 2000:

    https://archive.org/details/ramdisk_202108
    Second, they've been at it for at least till 2013 when Windows 8.1 came out. Again an example driver implementation:

    https://github.com/microsoftarchive/msdn-code-gallery-microsoft/blob/master/Official%20Windows%20Driver%20Kit%20Sample/Windows%20Driver%20Kit%20(WDK)%208.1%20Samples/%5BC%2B%2B%5D-windows-driver-kit-81-cpp/WDK%208.1%20C%2B%2B%20Samples/RAMDisk%20Storage%20Driver%20Sample/C%2B%2B/src/ramdisk.c

    But yeah, other than examples and some other 3rd party programs that might work up to Windows 10 I haven't found anything for Windows 11, which is kind of a bummer.

    If Microsoft decided back then that people don't "need" ram disks when ram was sparse I hope they'll reconsider at some point. Especially now that even modern laptops come with at least 16 GB by default.

    with friendly regards, Paul

    Was this answer helpful?

    10 people found this answer helpful.
    0 comments No comments
  5. Igor Leyko 112.4K Reputation points Independent Advisor
    2023-04-18T17:18:24+00:00

    Yes, a sample virtual disk code was in Windows Developer Kit for many years.

    Moreover, there was a vdisk.sys driver in MS-DOS, and I've used it in DOS times. But unfortunately, there is no RAM disks general usefulness now, especially after M.2 SSDs appearing.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments