Fun with RAM disks and Media Browser cache.

Posted by Jon | HTPC,Tips, Tricks & Guides | Wednesday 28 January 2009 10:37 am

I’ve not had any issues with the cache performance, for the most part, in Media Browser, but I’ve wondered if cache performance would be affected if it were located on different media types.  I had already tried a network location for certain parts of the cache so that I could “universalize” my watched ticks, but it didn’t work out too well.  OK, it didn’t work out at all.

I’ve also tried a few of my flash media drives in hopes that the better access speeds may make a difference, but I found that it lead to much slower load times, so I scratched that idea also.  However, the flash media experiment did give me another idea – RAM disks.  I had used RAM disks with MyMovies to store the database and images before it started using a SQL backend and it worked wonderfully.  I still used it for images after that and it did help.  I figure it couldn’t hurt to try for the Cache directory for MediaBrowser, so I had my next little project.

I had a copy of SuperSpeed RAMDisk, but unfortunately for me, it did not include Vista support.  Suck.  I turned to the Internet and found a nice freeware RAMDisk (with GUI) here.  It’s very nice, although it doesn’t include a save-on-shutdown feature.  I’m going to look into the command line for it to see if I can create a batch file to schedule to do that on a daily basis for me.  Otherwise, I’ll just manually create a cache image when I think of it.  I’m doing this on my son’s HTPC and his cache doesn’t change so drastically that it would be a problem anyway.

I ran the included application and installed the RAMDisk driver.  After a minute or so, I was good to go.  I set a RAMDisk emulation of a fixed disk to 256MB, hit Apply and I had a new X: to play with.  I then browser to C:\ProgramData\MediaBrowser, cut my Cache folder and pasted it directly to my newly created RAMDisk (X:).  I then fired up the command line (CMD from Run prompt), changed my path to C:\ProgramData\MediaBrowser and created a new NTFS junction pointing to the X:\Cache folder:

C:\ProgramData\MediaBrowser>mklink /J Cache X:\Cache

I was greeted with a success message and I was all ready to fire up Media Browser.  I decided to clear my cache so that I could see if there was anything to gain there and I did notice that my collection populated a little quicker.  The increased transfer rate and decreased access times definitely seemed snappier to me.  My son’s system is only a Pentium D on a single channel memory platform and an old PATA IBM 80GB HDD, so it was a bit laggy.  What I witnessed was no fluke…populating the cache and subsequent browsing was much smoother for me.

I can’t say that this will do much for faster systems, but if you’ve got an HTPC that barely meets the mark for Vista, this could certainly help.  It really doesn’t require much to setup and once you get things setup the way you want and your cache set well, saving an image to load after reboots won’t be much of a hassle.  Hopefully there is something in the command switches that allows it to be loaded automatically upon reboot.  We’ll see.

I’m going to trial some X64 RAMDisk software in the next bit to see what it does for my test system.  I’ll also be trying this out on my faster HTPCs to see if there is any improvement.  I’ll update later on what I come up with.

If you decide to try this yourself, let me know how it goes.


UPDATE:

I found a free public beta of another RAMDisk software that supports startup-to-image and save-image-on-shutdown features.  I don’t see any indication of it expiring, although I’m sure the non-beta will not be free.  So far, it works very well and is what I plan to use on my remaining HTPCs.  It supports both x86 and x64 systems.

Download is here.

  • Share/Bookmark

11 Comments »

  1. Comment by Yossi — January 28, 2009 @ 2:47 pm
    Browser: Internet Explorer 7.0 OS: Windows Vista

    Hi Jon,

    This is great, I was thinking of doing the same on my old media box. a P4 machine with 2 gigs DDR ram. with over 1000 Movies, it can lag abit when moving around media broswer.

    Thanks for the details, going to try it tonight.

    [Reply]

  2. Comment by branson1027 — July 2, 2009 @ 8:14 pm
    Browser: Internet Explorer 8.0 OS: Windows Vista

    Hi Jon,
    I know that this post is dated, but I was hoping you had another link to the RamDisk software you are using. I am trying to do the same thing you have setup. I’ve got 2 HTPCs running off of Penturm 4′s and MediaBrowser is slowing it way down.

    Thanks for all the info.

    [Reply]

    Jon Reply:

    The version I used has since been pulled (it was a time-limited free beta). It had no expiration date, however and I found it on my NAS. You can download here. I really haven’t run it since I posted that as it interfered with the SVN builds I was constantly testing, but I’d be interested in hearing back if it still provides a little bit of a boost for you.

    [Reply]

  3. Comment by Mike — July 29, 2009 @ 9:27 pm
    Browser: Internet Explorer 8.0 OS: Windows Vista

    I tried this on my HTPC running a dual core processor and 4 gigs of ram, even on a higher end system using Ramdisk for MediaBrowswers cache made a big difference. Great job!

    [Reply]

  4. Comment by Jason — November 18, 2009 @ 11:11 am
    Browser: Firefox 3.5.5 OS: Windows Vista

    The ramdata site still has free ramdisks

    http://memory.dataram.com/products-and-services/software/ramdisk/download-ramdisk

    the link may not work as it wanted personal details but you can find it from products / software.

    there is a free version for vista and a new beta for w7

    [Reply]

    Jon Reply:

    Thanks for the info! Many are finding this still useful, but having difficulties finding compatible (and free) RAMDisk software.

    [Reply]

  5. Pingback by RAMDisks take 2! | theHTPC.net — December 16, 2009 @ 3:47 pm WordPress 2.8.6

    [...] is more of an update to my Fun with RAMDisks post made nearly a year ago.  With the alpha testing for the upcoming Media Browser Firestorm [...]

  6. Comment by reallango — January 6, 2010 @ 9:20 pm
    Browser: Internet Explorer 8.0 OS: Windows 7 x64 Edition

    I’m currently trying to get my media browser to share resume capability and play tics across multiple computers which I have had luck with the play tics but haven’t really tested the resume feature yet. But it causes the cache to run extremly slow on my current test machine (which runs slow anyway but not this bad). So I’m thinking I may try making the share on a ramdisk instead and see if it works any faster. Also I’m wondering if the whole cache folder needs to be moved rather then just the actual cache folders or if there’s information in other places that is needed.

    on a side not though I just noticed that my xbox and pc aren’t sharing play tics and resume information which I could have sworn they where doing before.

    [Reply]

    Jon Reply:

    Shared playstate and display is something that has worked better on paper than in reality for me. I’ve tried to get this to work long before it was an added feature and it has never been reliable enough for me to fool with anymore. If you are insistent on trying it, there are a few things that have to be true in order to have any chance. The first is to make sure your share permissions are correct for all systems involved for both read and write access. Second, all HTPCs must have their virtual folders setup identically. If you map drives on one system, map them identically on all others. For example, if your Movies virtual folder is Z:\MOVIE FILES on one HTPC, then it must be the same on all others. Second, set the XML config file element on all HTPCs to the shared settings path \\SERVER\PATH\TO\SHARE. When you set that and run it Media Browser, it will create the necessary folder. I would start with a blank folder and manually set your playstate for your files over again. I know that may not be what you want to hear, but that’s what I had to do to get it to work uniformly for all systems. Finally, don’t use the experimental SQLite if you want to share playstate. It won’t work.

    You can use the RAMDisk as your share, but I wouldn’t use a RAMDisk for anything other than local caching. It’s not going to speed anything up over the network as that is where the real bottleneck is.

    [Reply]

  7. Comment by cw823 — January 6, 2010 @ 10:36 pm
    Browser: Firefox 3.5.6 OS: Windows XP

    I use whichever one is linked to @ hack7mc.com but agree on the backup, I have a batch file which copies the contents every night just in case I need to reboot and forget to copy the data beforehand.

    I have my whole mb folder there though, should I just have the cache there?

    [Reply]

    Jon Reply:

    Well, copying the entire programdata folder for Media Browser makes for a decent backup, but you really only need the XML config file, the Cache folder and the ImagesByName directory.

    [Reply]

RSS feed for comments on this post. TrackBack URI

Leave a comment