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.


Reply With Quote


. Though these virtualization suites are commercial and very expensive


Bookmarks