The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    SSD owners: Set Firefox to memory cache instead of disk

    Discussion in 'VAIO / Sony' started by Oscar2, Nov 14, 2010.

  1. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    Small block disk writes are the bane of SSD's everywhere :), and Web browsers are one of the worst perpetrators of small block disk writes.

    Two ways to address this are: Create a RAM disk and point the browser cache to it, -OR-
    Set Firefox to use memory cache (thusly):

    1. open up about:config (type it into the url bar)
    2. type browser.cache into the filter bar at the top.
    3. Find browser.cache.disk.enable and set it to false (by double clicking on it).
    4. set browser.cache.memory.enable to true
    5. create a new preference by right clicking anywhere, hit New, and choose Integer.
    6. Call the new preference browser.cache.memory.capacity and hit OK.
    7. In the next window, where it asks for the number of kilobytes you want to assign to the cache, just enter -1 to tell Firefox to dynamically determine the cache size.

    See: Speed Up Firefox by Moving Your Cache to RAM, No RAM Disk Required

    Truth in lending disclosure. The downsides (currently) are small but here they are:

    -Disk cache, unlike the memory cache, persists across restarts.
    -Size of memory cache is capped at a lower number than size of disk cache.
    -Possible slight slowdown for some plug-ins such as Adobe reader, which get to their data as a disk file.

    See: moving cache to RAM instructions making the rounds - mozilla.dev.apps.firefox | Google Groups

    Future Firefox may be able to have both disk and memory cache and so will have the best of both worlds.

    Edit: Accidentally wiped out the original post (intended to paste from it) :eek:. so here it is recreated (as best as I could)
     
  2. 18000rpm

    18000rpm Notebook Consultant

    Reputations:
    9
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    30
    Is this really a good idea? The SSD is still thousands of times slower than RAM.
     
  3. Blahman

    Blahman Notebook Consultant

    Reputations:
    25
    Messages:
    256
    Likes Received:
    5
    Trophy Points:
    31
    think about what you read, and then what you said. also it's not "thousands" of times slower than RAM.
     
  4. SurferJon

    SurferJon Notebook Evangelist

    Reputations:
    6
    Messages:
    620
    Likes Received:
    18
    Trophy Points:
    31
    I haven't really noticed any difference. :(

    Also, #4 was already set to true.
     
  5. TheBugMan

    TheBugMan Notebook Consultant

    Reputations:
    44
    Messages:
    234
    Likes Received:
    0
    Trophy Points:
    0
    I don't notice anything diff in while visiting flash intensive sites or watching vids through the browser. Everything is super snappy with 64bit 7 and SSD.

    Has anyone tried the E9 beta in comparison?
     
  6. thomaskc.dk

    thomaskc.dk Notebook Deity

    Reputations:
    84
    Messages:
    1,252
    Likes Received:
    0
    Trophy Points:
    55
    why would anyone use IE9 beta to begin with? :p

    Anyway I don't see the bigger break through here on the SSD / memory front?
     
  7. skagen

    skagen Notebook Deity

    Reputations:
    278
    Messages:
    885
    Likes Received:
    0
    Trophy Points:
    30
    Anyone know how to do this in Chrome?
     
  8. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
  9. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    The main "break-through" is that you save the SSD from doing millions of small block writes, over the years.
     
  10. James D

    James D Notebook Prophet

    Reputations:
    2,314
    Messages:
    4,901
    Likes Received:
    1,132
    Trophy Points:
    231
    OK. But can I use this advise if I have slow HDD (5400 rpm) to make my Mozilla go faster???
     
  11. Hungry Man

    Hungry Man Notebook Virtuoso

    Reputations:
    661
    Messages:
    2,348
    Likes Received:
    0
    Trophy Points:
    55
    This completely defeats the purpose of having a cache. Every time the computer powers down you lose the cache... which makes it virtually useless.

    Wait for firefox 4 to implement this. They're going to have a compromise of sorts where it's stored in both.
     
  12. thegre8tone

    thegre8tone Notebook Enthusiast

    Reputations:
    0
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    5
    I think the point of this is to save all the writes that will be going on with the SSD...Given that TRIM isn't supported in RAID. Personally I rather save the SSD from being constantly written to.
     
  13. DustB00

    DustB00 Notebook Enthusiast

    Reputations:
    3
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    15
    Is there any way to do this on IE 8 ? 9 ?
     
  14. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    Always one can wait and just around the corner something better is always waiting for us... :)

    But seriously, I disagree that it defeats the point of cache to use memory cache instead of disk. You still benefit from the cache in all the many ways in which one benefits from having a cache (and let's not forget that it all happens quicker in a memory based cache than disk based). The thing you lose is reloading some images, ads and whatnot the next time you boot up. Not so bad. Balance that against thousands writes to the ssd and quicker response all the while. ;)

    I can see where, in the case of a slow internet connection, it may be useful to have a gigantic disk cache to ensure nothing ever gets reloaded. But most of the time it doesn't offer so much benefit.
     
  15. Hungry Man

    Hungry Man Notebook Virtuoso

    Reputations:
    661
    Messages:
    2,348
    Likes Received:
    0
    Trophy Points:
    55
    Cache stores a page when you visit it so that the next time you use your computer it can load that page faster. When you delete your cash it has to build it again every time... This completely defeats the purpose of having a cache. Mozilla also reported this breaks some extensions.

    This is not one of those "oh you can always wait for new technology" because there's only two steps here; right now with a poor workaround that will not benefit you all that much or in a month or two when mozilla has perfected this.
     
  16. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    I disagree when you say " This completely defeats the purpose of having a cache" when in actuality it is defeating about 0.1% of the purpose for having a cache. 99.9% of the time this "total defeat" you refer to would not be either noticeable or measurable. I suspect you know this so I don't understand why you resort to such hyperbole.

    The key to your statement is when you say " ...next time you use your computer...has to build it again every time...". Obviously if the cache were wiped every time you used your computer that would be stupid, but that's not really what we are talking about here is it?

    On a more useful note, It would be interesting to know which extensions Mozilla has indicated would be impacted by this.
     
  17. Jim_Kirk

    Jim_Kirk Newbie

    Reputations:
    4
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    5
    I have several OCZ SSD's in my desktop and in another laptop. Here is a very complete discussion on various tweaks to Win 7 which will improve SSD performance and life.

    Guide * Windows 7 Ultimate Tweaks & Utilities *

    Near the bottom of the OCZ thread is a discussion of the Firefox cache tweak and just below is a similiar cache tweak for IE.
     
  18. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    There are some very good suggestions in there. Most of these have been discussed on this forum, but its good to collect them once in a while for those who missed them the first time around. The SSD ones that apply to the Z would be:

    -Enable Write Caching: On the Z use the Intel Rapid Storage Technology app: Manage | Advanced | Write-back cache: Enabled

    -Disable indexing: In Windows Explorer (or My Computer): Right click on C: Drive -> Properties -> Uncheck Allow files on this drive to have contents indexed...

    -Turn Off the Disk Defragmenter Schedule: Run Disk Defrag, turn off regular schedule

    -Disable Superfetch: in regedit: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management\PrefetchParameters. Change EnableSuperFetch value from 3 to 0.

    -Disable Prefetch: in regedit: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management\PrefetchParameters. Change EnablePrefetcher value from 3 to 0.

    -Firefox - Use memory cache instead of disk cache (see OP or create a ram disk)

    The other ones they recommend in there I'm not too sure I would recommend those on the Z, as either having no benefit or not being worth the risk:
    -Disable the Page File
    -Disable System Restore
    -Disable Hibernate
    -TRIM Commands
    -TRIM Utility Script
     
  19. beaups

    beaups New Jack Hustler

    Reputations:
    476
    Messages:
    2,376
    Likes Received:
    4
    Trophy Points:
    56
    Why would you want to turn off indexing?
     
  20. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    It's optional. Indexing imposes some overhead every time you write, modify , or delete files. If you do this with lots of small files it can have a noticeable impact. Even with it off, searching happens lightning fast anyway.
     
  21. beaups

    beaups New Jack Hustler

    Reputations:
    476
    Messages:
    2,376
    Likes Received:
    4
    Trophy Points:
    56
    I'd die without indexing...I'll take the risk of premature wear. Especially in outlook, search is instantaneous and I use it a LOT.
     
  22. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
  23. psyang

    psyang Notebook Consultant

    Reputations:
    62
    Messages:
    213
    Likes Received:
    8
    Trophy Points:
    31
    Regarding browser memory caches, the link above has a link to freeware ramdisk software (up to 4gig). What's nice is that the ramdisk can be set to automatically save its image on shutdown/reload image on startup. That way, items that are cached do persist across reboots.

    I just set this up in Chrome, and it works great. One note about Chrome - you can only set the directory for all user-based data (bookmarks, history, etc), not just for the cache. This makes the persistable ramdisk even more important, though it may not be that big of a deal if you use Chrome's sync ability.

    -Peter
     
  24. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    Thanks for the suggestion Peter. I added it to the SSD tips thread at http://forum.notebookreview.com/sony/533819-ssd-tweaks-tips.html
     
  25. Hungry Man

    Hungry Man Notebook Virtuoso

    Reputations:
    661
    Messages:
    2,348
    Likes Received:
    0
    Trophy Points:
    55
    Yeah I couldn't find this topic after I last replied but I meant to mentioned ramdisk.
     
  26. arth1

    arth1 a҉r҉t҉h

    Reputations:
    418
    Messages:
    1,910
    Likes Received:
    0
    Trophy Points:
    55
    For browser disk cache, I augment it with caching proxy servers. Not only do I have far more cache than I have disk on my laptop, but it also works when I jump between computers.
     
  27. Oscar2

    Oscar2 Notebook Deity

    Reputations:
    209
    Messages:
    1,030
    Likes Received:
    0
    Trophy Points:
    55
    So how, pray tell, does one go about setting up something that?