TUTORIAL: How to Leverage a Ramdisk in Gaming

Discussion in 'PC Gaming' started by TantrumusMaximus, Feb 20, 2009.

  1. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
    I've decided to type up this rather lengthy tutorial since it benefitted me with amazing real game performance results. I hope this tutorial helps other people wishing for some better performance out of their games. It is not meant to increase FPS, this is meant to help with the disk bottleneck. If you have issues in your game like I did then please read on and enjoy.

    If you are suffering from a game that HITCHES because the game you are using accesses the HD too much??? A perfect example is when your mouselooking hitches and stutters OR when you move in the world that your avatar will stutter step. A common misperception is server-side lag, not a fast enough vid card, or cpu, whatever. Well if you see your HD light constantly lighting up while playing your favorite game chances are you can improve the performance by taking the disk bottleneck out of the equation. MMOs as a whole will benefit the most from this tutorial as generally there is a lot of disk access going on caching world data etc.

    This works on ALL games if you take some extra time to evaluate & monitor them.

    DISCLAIMER:
    Use this information at your own risk if you end up losing your game data don't come crying to me... back up any game data first that you may try this with. This tutorial is "fairly" advanced and you shouldn't mess with this tutorial at all if you are not comfortable browsing directories in a command prompt or moving folders around. I provide no support whatsoever.

    If this tutorial is followed correctly data loss will not be a concern.

    --------------------------------------------

    How to Supercharge your games HD access times with 4GB+ RAM & Vista

    Required Components: Vista***, Ramdisk, Excess System RAM

    1) If you have a 64bit version of Vista, great! You can make a nice Ramdisk 1GB+ easily that will run in microseconds vs. milliseconds.

    2) Process Monitor to monitor your game's access of the HD

    3) Ramdisk software

    4) Creating a symbolic link to the Ramdisk so that the game will transparently hit the Ramdisk.

    Once completed you should notice a drastic performance improvement IF you migrate the proper data for your game to the Ramdisk.


    Instructions:

    I am going to loosely describe what to do as I am assuming if you are going to follow this tutorial you have some understanding of MS-Dos commands and are familiar with digging and figuring out how to use basic programs.

    1) Find a Ramdisk program. There is a free one MS was including in Vista however I haven't even messed with it since the reading I did said the drives were limited to very small sizes. These are the 2 that I've tested and work very well, however they are not free, but you get what you pay for:

    Both of these can save the drive image to a file at system shutdown/start:

    Cenatek Ramdisk 30 trial uses: http://www.cenatek.com/product_page_ramdisk.php
    Superspeed 15 day evaluation: http://www.superspeed.com/desktop/ramdisk.php

    (Cenatek's Ramdisk seemed to run better for me in my testing. Even though Superspeed's seems more robust.)

    2) Install Process Monitor and setup a filter by process for your game executable. Start your game and give it a good play session. Drop to the desktop occasionally and see that the monitor is capturing what you'd expect. Get back in and play some more. After you play it for about 30 min or so and have a good capture, take a look scroll through the captured data and look what directories or files are called upon the most. Then decide upon what would best be moved to a ramdisk.

    Get it here: http://technet.microsoft.com/e...nternals/bb896645.aspx

    3) Based on your system RAM you have some decisions to make... how much can I move, and how large a ramdisk to I need? I leave this to you to test and decide as it's a game by game basis.

    4) Create a Ramdisk the size you came up with. Go into Disk Management and initialize and format it, give it a drive letter. (I formatted mine FAT32)

    4a Recommended) if you are using one of the 2 programs I suggested... you can set them up to save to HD image file at shutdown and load the HD image file at start up. Highly recommended.

    5) Backup what you are going to move to the Ramdisk!

    6) Move the data to the Ramdisk. MOVE, NOT COPY. The next step needs the data to be OFF the hard drive.

    7) Make a symbolic link to the data so that the game has no clue anything changed at all. This step is tricks the game to go to the Ramdisk.

    7a) Drop to a command prompt.
    7b) Change directories to where the folder or file WAS on the HD.
    7c) Create the symbolic link:

    Type: MKLINK /D <filename or foldername> <x:\filename or foldername>

    Examples:

    MKLINK /D bin e:\bin
    MKLINK /D superpakfile.file e:\superpakfile.file

    8) ENJOY! Start up your game and see if the data you chose is indeed what was needed to speed up your performance. If not rinse & repeat until you do get the proper data into the ramdisk for your particular game.

    In my case the game I am reaping the most benefits from is the old MMO Vanguard which was severely impacted with Stuttering and Hitching. Most people thought it was CPU, Video Card related.... TOTAL BULL$Hit... It's the hard drive access. Too bad it wasn't ready for primetime it's a beautiful game. Sigh but that's not the meat of this topic. If you are interested in Vanguard the below is what I moved:

    I moved .\Vanguard\bin & .\Vanguard\Assets\Sound directories to a Ramdisk and all hitching its GONE! Zone loading is insane! Crossing zone lines "CHUNKING" as they call it is like 1 1/2 seconds. Used to be like 5-10 seconds for me.

    I have survived countless graceful reboots over the past week with no lost of data.

    JUST BACKUP your data before moving the data to the Ramdisk and you should have no worries. Worst case scenario you are reloading your game LOL!

    I hope this will help some of you out there, Game On!

    Next Ramdisk Project: Warhammer Online! This game peggs a HD constantly during combat! My LED is light up all the time. Going to monitor it and post here what I moved at a later date. Wish me luck.
     
  2. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
  3. SunnyD

    SunnyD Belgian Waffler

    Joined:
    Jan 2, 2001
    Messages:
    32,541
    Likes Received:
    3
    #1 - the act of copying data to the ramdisk is time intensive, and would need to be done either prior to playing or every boot. Not only that, but you have to take into account that game data can and will change, so you have to copy files back. Pray that you don't crash.

    #2 - Using Process Monitor renders some titles useless, or may trigger blacklisting and/or banning on some titles. (I believe PM is considered a "hack" by WoW last I knew, for example).

    #3 - Especially for Vista, this is pretty much useless unless you have > 4GB ram. (Apparently some products can bypass the OS RAM limit, interesting trick)
     
  4. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
    All valid points.

    There are pros and cons to every solution.

    1) I'm running a 1GB RAM disk which is at most 1/2 full. In my case if I moved the sounds directory out of the equation I'd only have the bin folder which is barely 120+mb.

    Most other games can be tweaked with even smaller. I myself will take the trade off of the extra 5-10 seconds at boot to smooth out 3-4 hours of gaming. The extra 5-10 seconds flushing time at shutdown is a fair trade off as well.

    2) Hmmm. That is interesting I didn't realize an officially supported Microsoft Tool would be considered a hack. Does that mean Performance Monitor is a hack too???

    3) Did you notice the price of RAM? :) What you don't have 8GB? LOL this worked so good that I almost went to Microcenter to pick up another 6GB of DDR3 at lunch today.

    The bottom line IT WORKS. Worked so great I thought I would share. Take it for what it's worth.
     
  5. SunnyD

    SunnyD Belgian Waffler

    Joined:
    Jan 2, 2001
    Messages:
    32,541
    Likes Received:
    3
    Sorry - didn't mean to imply it doesn't work. :)

    I forgot to mention #4 - games' ever-increasing appetite for content storage. WoW clocks in at what, something like 10GB on disk now? Yes, picking and choosing with the Process Monitor trick will help some... but not in the cases where content is packed into one jinormous multi-gigabyte file, unless you have a huge ramdisk.
     
  6. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
    Yep. I was speaking with a friend today on the phone about how to handle Warhammer online's constant disk access and we both pondered how to handle the files that sit in the root of the install folder. One is almost 4GB which is the worldart file if I recall correctly.

    There will definately be some games that it will not be the end-all solution for. This may be one of them.

     
  7. nanobreath

    nanobreath Senior member

    Joined:
    May 14, 2008
    Messages:
    978
    Likes Received:
    0
    This is interesting, I'll have to look into it some more. Some things I see that might make this hard for me is Blizz's anti-hacking checks and if this would set them off in anyway. Are any usefull files kept in something besides the giant .mpq file? And WoW seems pretty well optimized to not never really have a problem with freezing due to lack of data from the HD. Like I said, I'll look into it some more, as it is an interesting idea, but if anybody has some answers to these questions would make my looking a lot easier!
     
  8. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
    WoW is pretty well put together little to no hitching in that game. About all you would benefit from is going into instances or taking the Zepplin/Boat I suspect.
     
  9. Denithor

    Denithor Diamond Member

    Joined:
    Apr 11, 2004
    Messages:
    6,198
    Likes Received:
    0
    i7 system with 12GB - 8GB RAMdisk - fit your whole WoW folder on the RAMdisk. And many other games, especially the older ones, would also fit entirely onto a RAMdisk this size. That should improve things considerably.
     
  10. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
    Right on dude. I've been fighting the urge to buy another 6GB. :)
     
  11. Byte

    Byte Platinum Member

    Joined:
    Mar 8, 2000
    Messages:
    2,855
    Likes Received:
    1
     
  12. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
  13. chizow

    chizow Diamond Member

    Joined:
    Jun 26, 2001
    Messages:
    9,537
    Likes Received:
    0
    This is something I've looked into on and off for years, the biggest problems though imo have been the lack of capacity when constrained by motherboard/memory controller/memory density limitations, especially once confronted with the growing size of current games which can easily exceed 10GB once fully installed, updated and unpacked.

    The use of Process Explorer is very interesting though, that could certainly narrow down which files to cache/mount, but overall it just seems extremely tedious. Personally I envisioned mounting entire game folders as you wanted to play, but again, capacity limitations prevent that from happening realistically.

    I've looked into a few alternatives, like iRAM, which would be excellent if it supported DDR2 and more dimms. Imagine an iRAM with 4, or even 8 dimm slots. That'd be 8-16GB for maybe.....$80-160 with current DDR2 pricing. Unfortunately the rumored DDR2 version of the iRAM seems to have been scrapped.

    At this point I've turned my attention away from RAM disks toward SSDs. They're somewhere inbetween in terms of speed and technology, without the major capacity limitations. Another option would be for larger memory densities and dimms combined with i7, but the price for 4GB dimms is insane right now. 12GB is nice, but I still think a 4/8GB split isn't quite sufficient. A 6/18 split or 8/16 split would be much better imo, but again, that's like....$2400 of RAM at least.

    In the meantime, I've been very happy with Vista 64 + SuperFetch with a faster storage subsystem. Very noticeable improvements, particularly in MMOs as you mentioned. Biggest improvement for me in LOTRO was when they made it /largeaddressaware with Vista 64, I'd expect WAR would see similar gains if they did the same.
     
  14. TantrumusMaximus

    TantrumusMaximus Senior member

    Joined:
    Dec 27, 2004
    Messages:
    515
    Likes Received:
    0
    Agree 100% on i-RAM hehe I was real interested in that until I saw it maxed out at 4GB! Bummer and only old DDR.

    SSDs are definately the current/next big thing for the PC industry. I've been watching OCZ, they seem to really be aggressively coming out with new products and have a very active SSD forum with tons of tips for getting the most out of them.

    Setting up a ramdisk and mounting a few folders really is not that involved, the fun part is actually figuring out what to move. Once that's in place there isn't much you need to do except enjoy the benefits.

    There are other things too that this is good for aside from just tweaking game speed... moving your browser cache folder is one example.

    I look at my system RAM differently now... before it was just like "there" but most games didn't really use it... I know mine is being utilized now and for good purpose.
     
  15. Craig234

    Craig234 Lifer

    Joined:
    May 1, 2006
    Messages:
    34,673
    Likes Received:
    2
    On my old computer, there's a ton of hitching.

    I can port to Dalaran and wait minutes to be able to move.

    I can blink and 10 seconds later have the sound and graphic.

    In some dungeons the fight can be far underway while my computer is frozen loading information (not usually though).

    Common description especially in dalaran - slowsly wait to be able to take steps to get quest, to turn and face the right direction, wait to open bags, the cursor moves part way to bag and hangs, closer to bag and hangs, click item nothing click item again and it takes effect, hold cursor over item waiting for it to change from an arrow, etc.
     
  16. dchaples

    dchaples Junior Member

    Joined:
    Feb 27, 2009
    Messages:
    1
    Likes Received:
    0
    I also play vanguard.

    Can't you just tweak the paths.ini file? Why use MKLINK?
     
  17. Phew

    Phew Senior member

    Joined:
    May 19, 2004
    Messages:
    477
    Likes Received:
    0
    That link says the limit is 400 MB for the free version, not 4 GB. Am I missing something?
     
  18. bunnyfubbles

    bunnyfubbles Lifer

    Joined:
    Sep 3, 2001
    Messages:
    12,250
    Likes Received:
    0
    yeah, it really is a shame there aren't more i-RAM-like products out on the market

    Gigabyte's i-RAM concept involves a battery backup to make it a viable hard drive solution, however that's not something that is completely necessary for a product like that to be successful as long as software is included to save/load information from a hard drive.

    When RAM is getting under $10 per GB (much less with rebate deals) it really is almost a shame not to be able to use more.
     
  19. BaboonGuy

    BaboonGuy Diamond Member

    Joined:
    Aug 24, 2002
    Messages:
    4,125
    Likes Received:
    0
    I just tried to do this on Windows XP and found it's impossible unfortunately. There's no way to symbolic link single files in XP and also, I think (not sure), that you can't symbolic link across drives.
     
  20. pcslookout

    pcslookout Diamond Member

    Joined:
    Mar 18, 2007
    Messages:
    9,620
    Likes Received:
    4
    That sucks.
     
  21. pcslookout

    pcslookout Diamond Member

    Joined:
    Mar 18, 2007
    Messages:
    9,620
    Likes Received:
    4
    TantrumusMaximus and everyone. One thing I did that really seem to make a huge performence difference, at least it felt and appeared like it, is moving my tcpip.sys and a few other files onto a small ramdrive. It made browsing speed lightening fast! This is before Google Chrome even existed! So it wasn't the browser that was fast. I think I was using Internet Exporer so I can just imagine what this could do with Opera, Firefox, Google Chrome, or Safari!

    I really want to try it again but the last time I tried it, which was around a few years ago it wouldn't work. May be because the tweak is still written for Windows XP only it seems so far but there has to be a way to do it on Windows Vista/7 :(
     
  22. Golgatha

    Golgatha Lifer

    Joined:
    Jul 18, 2003
    Messages:
    11,590
    Likes Received:
    0
    One of the dream products I wish some hardware manufacturer would make is a PCIe 4/8/16x card with something like 16 DDR2 SODIMM slots on it. Populating that with 16-32GB of memory wouldn't be exceedingly expensive and the performance would be to die for.