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: Most helpful
  1. Anonymous
    2023-12-29T12:47:11+00:00

    Hello Igor Leyko,

    I clearly got your point that you aren't advocating for it -- and (once more) that is not the question here.

    I clearly understood that you refer to commercial (non-Microsoft) Software as a solution. Understood and already taken into account.
    No need to put any more comments unless they bring solid knowledge or solutions.

    Constructive information is always welcome.

    Let's concentrate on the subject. To recall it: Title "RAM Disk on Windows 11". Main question is "... how to create a ram disk on Windows 11."

    Thank you.

    Was this answer helpful?

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-11-09T17:14:09+00:00

    Hello,

    Thanks for all the information provided.
    Please refrain from judging whether a ramdisk is a solution or not for one user or another: You simply cannot know and the question was not about what you think about a ramdisk, but how do make one...

    As pointed out above, compilation is one of the possible use cases, which can profit from the use of a ramdisk, I totally agree and that is proven by the impact of the data rates to/from disk having high impact on overall compilation time.

    I'd highly appreciate an official and stable solution for professional application.

    Regards

    PS: In a professional environment, for instance the investment for just 32GB supplementary RAM can financially be justified if it speeds up work a little and thus reduces delay / work hours.

    Was this answer helpful?

    10 people found this answer helpful.
    0 comments No comments
  3. 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
  4. Anonymous
    2023-11-10T05:25:04+00:00

    I agree.

    In my case I would use ffmpeg to compress video and store it in chunks for HLS stream transmission. If I create a continuous feed that is going 24/7 for days on end, the chunks will be written and overwritten so many times on my SSD that it will wear it out prematurely. Instead, on a Linux or MacOS system I would create and write to a RamDisk so as not to wear out the non-volatile storage of a disk drive. It also wouldn't chew up bandwidth on the interface for said storage drive.

    So this is another legitimate use case and why Linux, BSD, MacOS, and others still provide the facility to have a RamDisk. It sounds like Microsoft is not providing this. ? If this is true then it is simply "sad".

    Was this answer helpful?

    8 people found this answer helpful.
    0 comments No comments
  5. 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