[GUIDE] Using ImDisk to set up RAM disk(s) in Windows with no limit on disk size

Discussion in 'Operating Systems' started by k1net1cs, Dec 21, 2011.

  1. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    Wow, thanks for taking the time to bench them!
    Now I can only imagine how faster it would be using exFAT... :p

    But for whatever it's worth, though, I've felt almost no difference between running a game/application from an SSD and a RAMdisk (2500K @4.4GHz, 16GB RAM, 120GB Vertex 2).
    For SSD users, RAMdisk usage is probably more limited to diverting wear & tear from the SSD by reallocating browser cache files to a RAMdisk, or simply just want to use the extra space on their RAM sticks.
    For users with a laptop on an HDD like me, it's a boon; I've tried putting Torchlight 2 (since it's less than 1.6GB) and it loaded quite faster between maps.
    Didn't really help with S.P.A.Z., though.
    (yea I still play it from time to time...)

    Maybe I'll try to bench the performance differences between filesystems later; should be interesting.
     
  2. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    Yeah, unless the game needs to stream data faster than the HDD can handle, the actual gameplay isn't going to feel any different but as you've found, loading between maps, etc will be quicker.

    I did a test loading DCS World and this is what I found.

    From my HDD, it's about 25s for Launcher to load, 7s for the DCS box to appear after starting an Instant Mission, 34s before the black screen and about 96s before BS2 is ready.

    From my RAMDisk it takes about 9s for Launcher to load, 5s for the DCS box to appear after starting an Instant Mission, 30s before it changes to the black screen and about another 30s before BS2 is ready.

    So Launcher and the final stage go about three times quicker, whilst there's not much difference in the second and third stages, which total 35s and 41s for RAMdisk and HDD respectively, so I wonder what's going on during these?

    I would have expected a bigger improvement in all stages really, as the RAMDisk (IMdisk awealloc) is around 13x and 29x faster for Seq and 512k reads and 290x and 182x faster for 4k and 4k QD32 reads. If I was using RAMDisk Enterprise or one of the other faster RAMdisks, it would no doubt load somewhat faster and Intel users should find it even more so but IMDisk awealloc suits me best at the moment.

    You might be interested in Raymond's Intel results as well and he compared a lot more apps http://www.raymond.cc/blog/12-ram-disk-software-benchmarked-for-fastest-read-and-write-speed/
     
  3. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    Just had a bit of spare time.
    Here's MaxxMEM of my laptop.

    [​IMG]

    And here's CDM result of 2GB RAMdisk, NTFS, with and without awealloc.

    With awealloc :
    [​IMG]

    Without awealloc :
    [​IMG]

    Quite a hit with awealloc.

    Then again, awealloc isn't really a 64-bit Windows user should use.
    Its practicality is when a 32-bit Windows user uses it, since it enables them to use the RAM space beyond what the OS can use.
    Something like a 4GB RAMdisk when having 8GB of RAM in 32-bit WinXP, for example, without affecting the amount of space the OS can use because awealloc makes ImDisk to use the non-addressable portion of the RAM.
     
  4. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    Seems you overlooked what I said at the end of my post, "Despite being slower, between awealloc and IMDisk it seems awealloc is the only sensible choice, as the way IMDisk works means that the RAM used could be paged to the swapfile on HDD, rather defeating the purpose of a RAMDisk. Awealloc prevents this paging. Perhaps other RAMDisk software does as well but I don't know about that."
     

  5. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    I read what you posted.

    But does ImDisk really work like that?
     
  6. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    Yes, see this thread http://reboot.pro/10333/ which describes the different methods used for IMDisk and awealloc and this post http://reboot.pro/15762/#entry141179

    The author has also apparently said (I don't have the source for this as it was told to me, by someone I respect and trust):
     
  7. TwL

    TwL Ancient Guru

    Messages:
    1,828
    Likes Received:
    0
    GPU:
    2x5850 2x6950 + 9800GTX
    Well, if there's no pagefile windows (any since vista) will reserve still 256MB for paging (you can check docs and see this is the case) regular Windows 7 boxes uses about
    16MB of pagefile total with less than 75% of ram used 4GB reference same with above 4GB until 75% is filled when it is it pushed rest of needed memory to paging, so, the
    idea that you have an ramdrive and you page to it is kinda unusable since you would fill the existing memory faster and push to paging faster aka loop pass to ramdrive which
    would mean slowing down the memory operation by at least few times.

    Ideally if you have enough pagefile on fast space on situation large amount of ram is reserved it would still not move the fast data on it first and your application you are
    running would work faster while low priority applications on background (if not prioritized evenly) would be pushed to paging.

    Much more ideal would be to push the run application to memory, if enough memory (yes, I mean whole 500GB game/software, if you have to) to make the load from ram to ram.
     
    Last edited: Oct 11, 2012
  8. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    There's a new version of SoftPerfect RAMDisk available now which fixes the problems I was having with it before, so you might want to give that a go as the speeds are better than IMDisk and certainly better than awealloc and hopefully it prevents any of the RAM used being paged out, like awealloc, although I need to confirm this.

    FAT32 is a bit faster than NTFS but I think that's normal because of NTFS' overheads.

    [​IMG]

    [​IMG]
     
  9. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    Interesting.
    Too bad using an image file does not ensure it's having the same behavior as using awealloc for the 'file', even if the image file was generated from an 'awealloc-ed' ImDisk volume.


    More ideal to run the system diskless, then. :p
    But it's a hassle I'm still not willing to go through.


    I don't think it has the same behavior as awealloc in terms of allocating memory space, but dunno.
    Maybe the cause of awealloc is (relatively) sluggish on ImDisk is from the overhead of it being treated as a mounted file.
    Then again, even at that 'sluggish' speed it's still faster than the average SSD. =b

    It should be, but I prefer exFAT as an alternative for NTFS.
    Less overhead (which leads to more available space) and supports files bigger than 4GB.
     
  10. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    You'll be pleased to know the author has confirmed "We allocate physical memory directly, so it can't be paged out." :)
     

  11. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    Personally, I prefer knowing a way to test it myself rather than a confirmation from its author. ;)
    It's not a matter of trust, by the way, rather I'm just a bit OCD on such things.
     
  12. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    Fair enough, use the same way you confirmed that awealloc works like that then ;)
     
  13. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    Just tested SoftPerfect, and it kinda left a sour taste for me.
    The app worked fine, until it had to auto-mount the RAM disks on startup.
    It then made any window I currently open loses focus every few seconds on the next restart when I wanted to test its auto-mount capability.
    Apparently, something made wermgr.exe process keeps popping up on Task Manager; it's Windows Problem Reporting, part of the Windows Error Reporting Service.

    At first, I thought it was because I haven't uninstalled ImDisk.
    So then I stopped awealloc service, then uninstalled ImDisk, then restarted my laptop.
    Nope, that didn't work; wermgr.exe keeps popping up on Task Manager, thus kept stealing focus on any open window.
    Then I tried dismounting the RAM disk loaded from an image file, preventing it to be mounted on startup; no dice.
    Then I tried dismounting the rest of the RAM disks that I wanted to be created on every startup.

    That worked.
    As in wermgr.exe stopped showing up every couple of seconds in Task Manager.

    The application itself caused no problem when set to be run on startup.
    It's just when it's set to auto-mount a RAM disk it caused a problem, at least on my laptop.
    This pretty much didn't sit too well for me, so I had to ditch it.
    Quite a shame, though, because it works just fine if I mount a RAM disk after I've logged in to Windows, but I need it to auto-mount at startup (and not screwing up my system) so...the software is unfortunately not usable for me in its current state.
     
  14. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    That's a shame. I don't use the auto-mount feature, as I don't want to be waiting 5mins every time I boot for my 11GB RAMDisk to mount!

    I'd encourage you to report your problems on the forum though. The author is very receptive to feedback and fixed the problems I was having in a few days :)
     
  15. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    Or you could pass a link to this thread on their forum. :p

    Anyway, while SP's RAMdisk is non-paged, does it allocate the space on the highest available address of the installed memory?
    Because that's what awealloc does, and it's useful on 32-bit Windows where those addresses can't be used due to OS limitation.
     

  16. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    Well if you can't be bothered to go and ask the author to fix the problem, then you can't really expect him to do anything about it :p

    I use Win7 x64 so I wouldn't know about your other question. Why don't you ask the author at the same time as asking him to look at your problem? :p

    Or just stick with awealloc if you're happy with it.
     
  17. Basquedude

    Basquedude Guest

    Messages:
    135
    Likes Received:
    0
    GPU:
    Diamond 5970 2GB
    Hmm, im tinkering around with this. Managed to create a 4096 meg drive, im trying to benchmark it but HD tach and HD tune wont recognize it, what am I doing wrong? I can see it in windows,.
     
  18. dove

    dove Master Guru

    Messages:
    312
    Likes Received:
    0
    GPU:
    Powercolor 6950 2GB
    Nothing wrong. Some apps just don't see it. Use Crystal DiskMark or ATTO and you should be fine.
     
  19. Dluke77

    Dluke77 Guest

    Messages:
    4
    Likes Received:
    0
    GPU:
    AMD HD6870
    Hi k1net1cs
    I have always used your first post on windows 7 without any problem
    I used a cmd to load a disk image in ram at startup and another one on shutdown to create that image, using rawcopy.exe, like you explained.
    But now on windows 8, the shoutdown task, does not working.

    If i double click direcly on the .cmd, the prompt says:

    Code:
    C:\RAMDrives>rawcopy -mldv \\.\Z: "C:\RAMDrives\Z.img"
    \\.\Z:: Access is denied.
    But if i run it with right click-> Run as administrator i get:

    Code:
    C:\Windows\system32>rawcopy -mldv \\.\Z: "C:\RAMDrives\Z.img"
    Buffering 524288 bytes.
    Warning! Source device not locked: Access is denied.
    Reading block 1024
    End of input.
    
    512 MB copied.
    It alway says that is locked but the dump works.

    My problem is that i don't find any way to execute this batch with admin privileges when he get the evet 1074 also if the "Run with highest privileges" check is selected

    Please, you are my last hope :D

    A big thanks for your excelent job!


    EDIT:

    I have done an extreme test...
    I have disabled the uac by registry, that in win8 makes to stop all the metro apps, but just for try once ;)

    Now the cmd starts also if i click simply on it, it dosn't tell me "access denied" but it's the same output of the second case that i have explained before (when says 512mb copyed)

    but, the issue remain

    also if it starts well on a double click, for some strange reason, it dosn't work when scheduled on shutdown

    The "last run result" on task scheduler is always 0x8007045B

    (sorry for my terrible english, i'm an italian user ;) )
     
    Last edited: Nov 16, 2012
  20. k1net1cs

    k1net1cs Ancient Guru

    Messages:
    3,783
    Likes Received:
    0
    GPU:
    Radeon HD 5650m (550/800)
    I haven't tested setting it up on Win8, so I don't know (yet) how to properly do it.
    0x8007045B, however, is usually for when a task is being run by Task Scheduler but it's being forced to stop due to the OS shutting down.
    If the Task Scheduler in Win8 is not that different from the one in Win7, there should be a setting that prevents task(s) being forcibly shut down when the OS shuts down.

    Regarding "Warning! Source device not locked: Access is denied.", the -l switch in -mldv was what made rawcopy able to dump it just fine.
    It's basically telling rawcopy to (force) copy the contents whether the RAM disk is being used by another process or not.

    About the privilege thing, make sure you don't just tick the "Run with highest privileges" box, but also set the user account above it to "SYSTEM".
     

Share This Page