+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 15 of 38

Thread: Move 99% of All Firefox Writes off your SSD

  1. #1

    Default Move 99% of All Firefox Writes off your SSD

    NOTE: I almost totally changed step 4 because I eliminated the batch program and created a program in autoit. It's much, much, better. Plus, it allows unlimited firefox profiles.

    NOTE: v1.2 fixes some major bugs which would prevent any installed extensions from not working. v1.3 fixed a bug where the script would error if the path for "ramprofile_dir" did not already exist on your ram drive; the fix will try to create that directory first, which should solve the issue.

    To eliminate virtually every write from firefox to your ssd, here is what you need to do:

    01. Move the Firefox CACHE folder to your RAM disk

    Note: If you perform step 4, then do not perform this step because it is not necessary because it will be stored in the ram drive by default.

    a. Create a new folder on your ram disk to store the cache in (e.g., E:\FF_cache)
    b. Open Firefox and type "about:config" in the address bar and hit Enter.
    c. Right click anywhere on page and from context menu select "New" and "String".
    d. For string name, type in "browser.cache.disk.parent_directory" (without the quotes).
    e. For string value, type in the path to where you want to move your cache directory. IE D:\FF_cache if D is the RamDisk and you created a folder called FF_cache.
    f. Restart Firefox.


    02. Disable the URL classification file constantly updated on your HD! This file does NOT use the ramdisk!!

    a. Open Firefox
    b. Tools -> Options -> Security
    c. Uncheck "Tell me if the site I'm visiting is a suspected attack site"
    d. Uncheck "Tell me if the site I'm visiting is a suspected forgery"
    e. Search "C:\Documents and Settings\Administrator\Local Settings\Application Data\Mozilla\Firefox\Profiles\" for "urlclassifier3.sqlite" and delete it


    03. Disable the "etilqs" (aka: sqlite) temp files

    NOTE: Firefox uses SQLite as its database. Even by moving the cache and disabling the urlclassifier, Firefox still CONSTANLY writes to files begining with "etilqs" (e.g., "etilqs__asdflkj342n45"). I discovered that by replacing the sqlite3 dll file that firefox uses with the latest one from the sqlite.org website fixes this issue.

    a. In "C:\Program Files\Mozilla Firefox\", rename "sqlite3.dll" to something like "sqlite3.dll.old"
    b. Download this file from the sqlite.org website
    c. Unzip it and place the newly downloaded "sqlite3.dll" into "C:\Program Files\Mozilla Firefox\"


    04. Create a Profile for FireFox on your RamDisk

    NOTE: This is the MOST IMPORTANT step. This is the cause for hundreds of small writes to your SSD. What we do here is create a profile on your ramdisk, then make a batch file which will zip up the profile when you exit Firefox and then store the zip file on your SSD. When you re-open Firefox, the batch file will auto-unzip the profile and put it back on your ram disk.

    NOTE: 7zip is a prerequisite!

    a) Run "C:\Program Files\Mozilla Firefox\firefox.exe -ProfileManager" in the command prompt

    b) In the pop-up window that appears, click "create a new profile", name it "RamDiskProfile" (or whatever you want the name to be), then click "Choose Folder" and set the folder to a location on your ram disk (e.g., E:\Firefox\RamDiskProfile)

    c) Click "Start Firefox" which will populate the profile directory on the ram disk

    d) Now go to your RAM disk and manually ZIP everything INSIDE of the directory that firefox created (e.g., E:\Firefox\RamDiskProfile)

    WARNING: When I say zip "inside", don't capture the parent directory path (i.e., RamDiskProfile), but rather only capture its contents...

    e) Now copy the zip file to the directory you assigned to "hddprofile_dir" in the .ini file. I prefer to set the "hddprofile_dir" to my firefox profile directory stored on my C drive. However, you can set it to whatever you like.

    Once you have copied the zip file to the directory, then we are almost home free...

    From now on, anytime we want to load FireFox we are going to use a handy tool. It will automatically unzip our profile onto the ram drive, then start firefox up, and when we close firefox, it will zip back up the profile and store it on your SSD. Neat huh?

    You should have two files, LoadFFRamProfile.exe and LoadFFRamProfile.ini. Place them both somewhere on your SSD in the same directory. Whenever you want to load FireFox, you will need to run LoadFFRamProfile.exe. So you will probably want to create a shortcut to it in your quick-launch bar or somewhere.

    All you have left to do is configure the LoadFFRamProfile.ini file. Follow the instructions in the ini file, it's very easy. You can also create other profiles within the ini file; so you can have like 20 to choose fun and run multiple at the same time! To make a new profile, first create a new one using the "firefox.exe -ProfileManager" and then load up firefox to let it build the new profile directory, then zip up the profile directory and store it in the location discussed above, then finally duplicate the settings in the ini file for your new profile. It's cake.

    Finally, this script is built using AutoIt. So if you want to fool around with the ini_path or compression factor, you will need to compile it yourself. I did some tests and anything above compression factor 1 is a waste of time. Setting it at 1 takes an uncompressed 14MB zip file to a compressed size of 4MB. So I figure'd it's worth it to set it to 1.

    Well, that's all. In the attached zip are three files.
    .au3 (source code), .exe (compiled), .ini (settings)

    If there are any questions, just ask.
    Attached Files
    Last edited by kiger; 05-28-2009 at 04:39 AM.

  2. #2
    Moderator HDCHOPPER's Avatar Flag of United States
    Join Date
    Jan 2009
    Location
    Phoenix
    Posts
    4,853
    Mobo: Foxconn MARS P-35
    BIOS: Quatum Force G-28
    CPU: Intel E-8400
    RAM: OCZ Reaper HPC 1066
    Vid: ATI4850 crossfire
    PSU: Quattro 1000W
    HDD: OCZ Vertex 30 gig
    OS: win XP sp2

    Default

    Sweet ! thanks kiger for your efforts
    I do not work for OCZ...READ STICKY'S FIRST ! ... OCZ Drives best in IDE mode for compatibility but single member raid is some times the best ... ..Read through the wiki section at the top of the forumtrouble with flashing:http://www.ocztechnologyforum.com/fo...ad.php?t=64121
    http://www.ocztechnologyforum.com/fo...ad.php?t=53832
    SSD Tweaking and Diagnostics Tools: http://www.ocztechnologyforum.com/fo...ad.php?t=51522

  3. #3
    SSD TIGER Tony's Avatar
    Join Date
    May 2003
    Posts
    10,247
    Blog Entries
    6
    Mobo: various as always testing
    BIOS: various as they never work correctly
    CPU: usually AM3, but sometimes AM2+ and i7
    RAM: I test so much its hard to say
    Vid: 3870x2's...this is the one fixed variable
    PSU: PCPC 1200W/860W
    HDD: Vertex or Vertex EX
    OS: All M$ from XP forward

    Default

    nice work...how does FF feel to use once you have done all this...snappy?

  4. #4

    Default

    Quote Originally Posted by Tony View Post
    nice work...how does FF feel to use once you have done all this...snappy?
    Yes, considerably more snappy. I had read about setting up the profiles on a ram drive awhile ago but it sounded too hard; but after fooling with it, it's really very easy.

    Also, one last thing I forgot to mention. If you want to switch to your original default profile (not the ramdisk one) you can do so by loading firefox with the following switch:

    firefox.exe -ProfileManager

    Then just select the profile you want. This is needed after you setup your ramdisk profile because it will allow you to go back in and export your bookmarks to a file, then switch back to your ramdisk profile, and then import the bookmarks.

  5. #5
    OCZ Guru Flag of United States
    Join Date
    Jan 2009
    Posts
    614
    Mobo: Apple Early 2008 Macbook Pro 17"
    CPU: Intel Core 2 Duo 2.5Ghz Penryn
    RAM: 4GB DDR2
    Vid: nVidia 8600M GT 512MB
    HDD: Vertex 120GB (1.41 GC)
    OS: Mac OS X Snow Leopard 10.6.4

    Default

    NOTE: This is to reduce the amount of writes to disk, not to completely eliminate the writes. You have to do that with ramdisk.

    I just basically disable the disk caching and enable memory caching in the about:config.

    The easiest method is to use private browsing feature in 3.5, it should reduce the amount of writing as well since it doesn't store anything except for session history and that will be deleted as soon as you kill the session.

    browser.cache.disk.enable;false
    browser.cache.memory.enable;true
    Last edited by MikhailT; 05-11-2009 at 02:40 PM.

  6. #6
    OCZ User Flag of Canada
    Join Date
    Apr 2009
    Posts
    22
    Mobo: Gigabyte P35-DS3L v2
    BIOS: F9
    CPU: Intel E8400
    RAM: 6GB
    Vid: EVGA 8800GT
    PSU: ******* 520HX
    HDD: Vertex 60GB, WD 640 Black
    OS: Windows 7 Pro 64-bit

    Default

    What I've been doing is using a security program called SandboxIE.
    I have my sandbox placed on another drive and basically most writes go to my sandbox folder instead of the actual Firefox profile folder. I leave some stuff alone like history, cookies, etc and they still write to the SSD but I don't feel the need to disable most of the writes. I suppose if you have enough RAM for a ramdisk, you could place the entire sandbox there too


    The batch/7-Zip method seems interesting though. I might want to give that a try.

  7. #7

    Default

    @mikhailt
    If you check MS Process Monitor, you will still see a TON of writes in 3.5 beta while private browsing. For example, there are still tons of
    writes to: C:\Documents and Settings\kiger\Application Data\Mozilla\Firefox\Profiles\fxj6xijz.default\pla ces.sqlite

    @w0de
    WOW. That's a tight idea! I'm going to try that out.

  8. #8
    OCZ Addict Flag of Russian Federation
    Join Date
    Mar 2009
    Location
    Moscow
    Posts
    479
    Mobo: P5Q Pro
    BIOS: 1613
    CPU: Core 2 Quad Q9650 @ 3.0 GHz
    RAM: 8Gb DDR2-800 GAIL 4-4-4-12 @ DDR2-667 4-4-4-12
    Vid: ECS GeForce 8800 GTS 512Mb
    PSU: Termaltake TR2-550W
    HDD: 2 x Vertex v1.5 30Gb RAID0 @ Ports 4&5, 750Gb Samsung @ Port 0
    OS: Windows XP Professional SP3 32bit

    Default

    It is possible to fully virtualize FF (and almost any other app) using VMWare ThinApp or Xenocode Virtual Application Studio and place the sandbox into RAM Disk. The app will not write a single byte outside the sandbox . Though these virtualization suites are commercial and very expensive .

    Also there is free portable Firefox out there (http://portableapps.com/apps/internet/firefox_portable), it writes only to the sandbox too and the sandbox can be moved using a simple junction anywhere you need (or you could place the FF itself with its sandbox onto RAM Disk if you wish ).
    Last edited by Hell Racer; 05-11-2009 at 02:24 PM.

  9. #9
    OCZ Guru Flag of United States
    Join Date
    Jan 2009
    Posts
    614
    Mobo: Apple Early 2008 Macbook Pro 17"
    CPU: Intel Core 2 Duo 2.5Ghz Penryn
    RAM: 4GB DDR2
    Vid: nVidia 8600M GT 512MB
    HDD: Vertex 120GB (1.41 GC)
    OS: Mac OS X Snow Leopard 10.6.4

    Default

    Quote Originally Posted by kiger View Post
    @mikhailt
    If you check MS Process Monitor, you will still see a TON of writes in 3.5 beta while private browsing. For example, there are still tons of
    writes to: C:\Documents and Settings\kiger\Application Data\Mozilla\Firefox\Profiles\fxj6xijz.default\pla ces.sqlite

    @w0de
    WOW. That's a tight idea! I'm going to try that out.
    My setting is to reduce the amount of writes, not eliminate it completely.
    I'm on mac, so I use fseventer instead of MS Process monitor. according to that, I only had 4 changes (not sure read/write) in 15 min of intense browsing to places.sqlite. The only thing that was getting a lot of changes were sessionstore.js (over 115 changes).

  10. #10

    Default

    @w0de

    I just tried sandboxie on firefox in xp and I am really amazed it captured so much and sent it to the ram drive. A few interesting things though... I always thought sandboxie really locked everything down, but apparantly it let some writes go through to the c: drive... that's really interesting. Also, I realized there are two downsides to using it with firefox. First, no settings are saved; so if you add a bookmark, it won't commit I figure right? Second, in process monitor I saw tons of FileCreate C:\Program Files, FileCreate C:\Program Files\Mozilla, etc. It looks like firefox is getting confused on where to store the profile and so its losing performance with a lot of unneeded calls.

    I'll stick to my batch script, but I'm going to test out sandboxie with other stuff; I never even considered that idea.

  11. #11
    OCZ Convert Flag of United Kingdom
    Join Date
    Feb 2009
    Posts
    106
    Mobo: Gigabyte P35-DS3L
    CPU: Core2Duo E4500
    RAM: 4GB non-OCZ
    Vid: ATi Radeon 3850
    PSU: *******
    HDD: Vertex 30GB, Vertex 60GB, Spinpoint F3
    OS: Windows XP Home

    Default

    Nice one, thanks for sharing. I think I'll give that a try, although I'm likely to replace the batch file with a VB6 app to make it a bit neater.

  12. #12

    Default

    Hi,
    Nice tut, but it's a lot of efforts compared to Firefox portable on the Ramdsik.
    I use the last Firefox build, Minefield 3.6, portable, which auto-updates itself.
    With these parameters:

    _ network.dns.disableIPv6;disable
    _ network.http.pipelining;true
    _ network.http.pipelining.maxrequests;8
    _ network.http.max-connections;48
    _ network.http.max-connections-per-server;16
    _ network.http.proxy.pipelining;true
    _ content.notify.backoffcount;5
    _ content.interrupt.parsing;true
    _ nglayout.initialpaint.delay;0
    _ content.notify.interval;750000
    _ content.max.tokenizing.time;2250000
    _ content.notify.ontimer;true
    _ content.switch.threshold;750000
    _ browser.cache.memory.enable;true
    _ ui.submenuDelay;0
    _ plugin.expose_full_path;true

    It runs very smooth
    Last edited by 4board; 05-12-2009 at 04:51 AM.

  13. #13

    Default

    Isn't this a little overkill guys?

  14. #14
    SSD TIGER Tony's Avatar
    Join Date
    May 2003
    Posts
    10,247
    Blog Entries
    6
    Mobo: various as always testing
    BIOS: various as they never work correctly
    CPU: usually AM3, but sometimes AM2+ and i7
    RAM: I test so much its hard to say
    Vid: 3870x2's...this is the one fixed variable
    PSU: PCPC 1200W/860W
    HDD: Vertex or Vertex EX
    OS: All M$ from XP forward

    Default

    Some want to limit writes as much as they can to decrease drive wear, some just use core or solid SSD and want to help the drive along as best they can.

    In the end it is all fun, and you never know we may stumble onto something that makes a ton of difference...

  15. #15
    OCZ Tweaker Flag of Germany
    Join Date
    Apr 2008
    Posts
    278
    Mobo: ASUS Crosshair III Formula
    BIOS: 1702
    CPU: AMD Phenom II X6 1090T
    RAM: OCZ3P1600LVAM4GK
    Vid: XFX Radeon HD5870
    PSU: be quiet! Dark Power PRO 750W
    HDD: OCZ Vertex 2 60GB (System) + OCZ Vertex 60GB (Games) on SB750 / WD Raptor 150GB (Data) on SB750
    OS: Windows 7 Ultimate (64-Bit)

    Default

    Thanks for the info about the updated SQLite.dll !

    Dia
    Sicknature

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts