Ram Drives, do you recommend them?

Discussion in 'Software for Windows' started by berryracer, Jan 22, 2013.

  1. berryracer

    berryracer Platinum Member

    Joined:
    Oct 4, 2006
    Messages:
    2,766
    Likes Received:
    0
    I just read about it today.

    Im wondering if it would benefit me as I have an SSD and 16 GB of 1600 MHz. Ram

    The thing is, now that I have all my programs installed on C: My SSD.

    How will the RAM drive work? like do I need to reinstall Firefox and all my other programs for example on the RAM Drive?

    Or is it just good for caching files and temporary files to reduce SSD Thrashing?

    My System Specs are in my sig
     
  2. Soundmanred

    Soundmanred Lifer

    Joined:
    Oct 26, 2006
    Messages:
    10,784
    Likes Received:
    1
  3. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,537
    Likes Received:
    525
    A ram drive is more for temp storage. They are good for situations where you'll need constant or very high I/O. When you restart your computer, it's contents will be gone. You can script certain things to move certain data to it and what not though.

    I have a Linux server that has a 16MB ram drive, I have a script that polls data from an arduino device and writes a text file on it every second. Another app reads it at similar intervals. That one file gets tons of I/O. So rather than put that on the hard drive where it may slow things down, or a SSD which has a write limitation, the ram drive is ideal for this.

    By default Linux has several ram drives and you can just mount them. They're not big, but you can change it.

    In windows you need special software. Not aware of any free ones but I'm sure there's some.

    You can do all sorts of cool stuff with them though. What would be interesting is putting a VM on a ram drive to see how fast the guest OS operates.

    In simple terms, one does not really recommend/not recommend a ram drive specifically, it's more one of those things you can use if you have a need for it.
     
  4. bruceb

    bruceb Diamond Member

    Joined:
    Aug 20, 2004
    Messages:
    7,816
    Likes Received:
    1
    On a related query: Is it possible to use a USB Flash Drive as an external RAM with say Windows XP ? Could this be used to increase RAM available to programs on a computer that does not have a lot of internal RAM ? (in my case 512MB of old Rambus, costly ram)
     
  5. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    ReadyBoost started with Vista and I don't think any 3rd parties released anything similar for XP.

    But no caching method will increase the amount of memory available to processes, you're just giving yourself another level of paging. Just like the pagefile that flash drive can't be mapped directly into the process' address space so anything stored on it has to be paged into main memory before it can be used by the process. It may alleviate the pain of the thrashing a little, but the thrashing and slowdown will still be there.
     
  6. Ken g6

    Ken g6 Programming Moderator, Elite Member
    Moderator

    Joined:
    Dec 11, 1999
    Messages:
    11,768
    Likes Received:
    53
    It occurs to me that, with a large initial amount of RAM, a RAM drive formatted with a compressed and/or deduplicated filesystem, with a swapfile on it, might make sense. Anybody ever tried that? Is it even possible on Windows?
     
  7. lxskllr

    lxskllr Lifer

    Joined:
    Nov 30, 2004
    Messages:
    44,406
    Likes Received:
    38
    Seems like that would be gilding the lily. For the setup and hassle, it wouldn't be much better than just using an SSD. You'd need a readyboost-like system that loaded the program into ram before you needed it, yet wouldn't get in the way when you wanted to do something else. It would also need to write to disk to prevent disasters if power were lost. It could be done, but outside of edge cases, I don't think the work involve would pay off.
     
  8. gevorg

    gevorg Diamond Member

    Joined:
    Nov 3, 2004
    Messages:
    5,075
    Likes Received:
    0
    RAM drive is great for browser cache folder. Less strain on your SSD (if you use one), and every time you restart your machine, the cache clears automatically.
     
  9. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    If you understood what the pagefile was actually used for in Windows you would know that would be a terrible idea.
     
  10. bononos

    bononos Diamond Member

    Joined:
    Aug 21, 2011
    Messages:
    3,198
    Likes Received:
    1
    I give up, why would it a terrible idea?
     
  11. EagleKeeper

    EagleKeeper Discussion Club Moderator<br>Elite Member
    Staff Member

    Joined:
    Oct 30, 2000
    Messages:
    42,600
    Likes Received:
    0
    The Page file was used by Windows when the RAM was full and in needed a chunk of MEMORY

    If you put the Pagefile into memory, you would have less memory to work with; there by moving stuff around in memory when you might not have to.

    A RAM drive makes sense only if an application is reading/writing temp files to disk continually.

    And the system is not memory constrained.
    If you take a 16GB system and put 4GB available for a RAM drive; then you need to ensure that you are not pushing the 12GB memory usage limit for other applications. If you do so; then the OS will roll out to the hard drive applications/data to allow the requested need to run in 12GB space.

    Most systems will not have this happen with; however, most applications to not allocate temp files to a specific drive; they just let the OS handle it.
     
  12. Ken g6

    Ken g6 Programming Moderator, Elite Member
    Moderator

    Joined:
    Dec 11, 1999
    Messages:
    11,768
    Likes Received:
    53
    I guess you missed the part about:
    Yeah, probably. I'm just thinking of those "ram doubling" software packages of days gone by, and wondering if I could do something like that with a swapfile.
     
  13. boochi

    boochi Senior member

    Joined:
    May 21, 2011
    Messages:
    984
    Likes Received:
    0
    I have 32GB of RAM and it is fun sometimes to play around with virtual machines that run completely in and from RAM. It smokes running a virtual machine even from a SSD.
     
  14. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    No, I didn't. A pagefile on a RAM drive never makes sense because its entire job is to be temporary storage in order to free up physical memory. If you put the pagefile in physical memory you're essentially wasted that memory and just made the pagefile use happen more quickly.

    The OS could technically do dedup (and kinda does just by using virtual memory) on it's physical memory already, but compression wouldn't work well because the data would need to be decompressed before a process could use it. Linux already has memory dedup, actually. It's called KSM or Kernel Samepage Merging. It only currently works on memory ranges specially marked as merge candidates but that could easily be expanded.

    http://www.linux-kvm.org/page/KSM
     
  15. TheRyuu

    TheRyuu Diamond Member

    Joined:
    Dec 3, 2005
    Messages:
    5,396
    Likes Received:
    4
    And just to go a little more off topic (sort of) there's an expanded version of that, UKSM (there's a drop down box in the top right which offers english but many pages, including the download page are not available in english), which offers what KSM does but everywhere (it actively scans all memory).

    So yea, on a windows desktop probably not useful at all (likely even more useless since you have a ssd).
     
  16. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,537
    Likes Received:
    525
    With today's cheap and abundant ram a page file is almost pointless. Unless you have an app that for some reason absolutely needs one, it's best to just disable it. Now lot of people get their panties in a bunch over that statement, but on any system that has more than 4GB of ram, I've always disabled it and never had any issues.

    Putting it on a ram drive would kinda defeat it's whole purpose.
     
  17. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    You've never had any issues? That's gotta be the most ironic thing I've ever seen you post, all you seem to do is have problems and I'm glad you made this recommendation because anyone who's seen your posts will know to do the exact opposite.
     
  18. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,537
    Likes Received:
    525
    They're not memory related issues. It's all GUI related stuff that has nothing to do with ram.

    My issues are more due to limitations of Linux. I highly doubt if I enable a swap file I'll suddenly be able to have 3 monitors working properly. I suppose it's worth a try, but I doubt it will do anything.
     
    #18 Red Squirrel, Jan 24, 2013
    Last edited: Jan 24, 2013
  19. TheRyuu

    TheRyuu Diamond Member

    Joined:
    Dec 3, 2005
    Messages:
    5,396
    Likes Received:
    4
    4GB seems far to low to recommend that. Lets not forget that HDD space is also usually equally as cheap and throwing a few GB for a swap file for peace of mind is worth it.

    Maybe with something like 16GB of RAM then yea, you could start thinking about it under certain conditions. Also, lets not forget the file system cache can also swapoff (at least on linux, I'm not sure if Windows has an equivalent to something like swappiness and the likes).

    I'm not sure how we got here from RAM drives...
     
  20. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    I wasn't even talking about the 3 monitors thing, that's configuration only a very small niche of people would even consider so I'm not surprised that you're having issues with that.

    But 4G isn't nearly enough memory to decide to disable the pagefile in Windows. Ignoring the fact that there are some apps that will fail without a pagefile, disabling it doesn't gain you anything but disk space which is insanely cheap. Did you also remove the seatbelts from your car to lower it's weight in the hopes to get more speed?

    Linux is a different beast though, it can run just fine without swap because it was designed to do so. Windows wasn't, to the point that even the embedded versions require a pagefile. Don't you think that MS would have liked to have saved that space on their WinRT tablets?
     
  21. Miramonti

    Miramonti Lifer

    Joined:
    Aug 26, 2000
    Messages:
    28,198
    Likes Received:
    48
    I use a 7gb ram drive for a very read/write intensive db program to increase speed and take the i/o off the ssd. I also put portablefirefox and my temp folder on it.

    The software saves the entire disk to the ssd (smartsave...only what's changed) on shutdown and loads it on boot up. The best ram drive software available I've found these days is from romex software. I used to use superspeed.com until they pretty much abandoned development of new features a number of years ago.
     
  22. KirklandBrand

    KirklandBrand Member

    Joined:
    Feb 15, 2012
    Messages:
    56
    Likes Received:
    0
    I have 16gb of RAM and I just use RAM disk for my browsers and certain steam caches. I only have 512mb allocated for the ram drive and I never use it all up when I shut it down at the end of the day. For webkit browsers I notice significant boost to the page load speeds for the pages that can actually benefit from caches. Like for example bing.com isn't cache heavy when gmail.com is. I see that Amazon.com seems to rely heavily on caches so it's blazing on amazon.com. This is just what I notice and I tinker with but I don't recommend it for a normal user.

    I only symlink the C\Users\[username]\AppData\Local\Google\Chrome\User Data\Default to my ramdrive.
     
  23. Netopia

    Netopia Diamond Member

    Joined:
    Oct 9, 1999
    Messages:
    4,776
    Likes Received:
    0
    This
     
  24. Miramonti

    Miramonti Lifer

    Joined:
    Aug 26, 2000
    Messages:
    28,198
    Likes Received:
    48
    What exactly triggers the usage of the pagefile (ie in Windows), preservation of ram or to overcome depleted ram resources? or both?

    Theoretical and practical can be very different. I've always assumed the pagefile was often in use even before the system runs out of ram.

    In which case, as long as the system has plenty of ram to spare (which is easy to achieve with such large ram capacity these days), a ramdisk can still speed up i/o operations (as well as take i/o activity off the hard drive.)
     
  25. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    The pagefile can have pages stored there before memory pressure becomes too high, I'm not exactly sure of the metrics Windows uses for that. But in that case it simply becomes a cache and when memory pressure does hit it can free those pages up without having to wait to do the I/O for the page out. One must also remember that the pagefile is only 1 source of hard paging, for instance, anything already stored on disk that hasn't been modified will simply be dropped when memory pressure goes up because Windows knows it can just page the data back in from the original file (e.g. binaries, shared libraries, mmap'd files, etc) when necessary.