Overclock.net › Forums › Software, Programming and Coding › Other Software › How to: Increasing Firefox performance with a Ramdisk
New Posts  All Forums:Forum Nav:

How to: Increasing Firefox performance with a Ramdisk

post #1 of 10
Thread Starter 
My firefox often got slow-downs or even freezes when browsing on script-intense pages, or having tons of tabs open with active content on all etc. so i decoded to try to find out what caused all these lags and freees, and one of the biggest problems i found were the disk activity, for example the sessionstore.js which saves all the content on open pages so you can resume where you left off after closing firefox.

And to eliminate this disk activity problem, i tought of putting these stuff to a Ramdisk, and so far it has worked like a dream.

Goods about doing this:
* Firefox dont freeze or slow down as much as it used to (Especially on Facebook, and Facebook's Chat etc. script-intense web pages)
* Firefox itself, and add-ons are faster and more responsive
* Firefox has almost no HDD activity

Bads about doing this:
* Less free RAM
* Sudden loss in power might lead to unsaved firefox data (such as newly installed add-ons or bookmarks)
* Firefox's Appdata folder must not exceed the size of the Ramdisk (the size of the ramdisk can be increased by the cost of free ram)

in this guide, i will be using SuperSpeed Ramdisk Plus on my Windows 7 Ultimate x64, any other version of windows or ramdisk should work aswell

1. Check the size of the Firefox's Appdata folder (usually C:\\Users\\Username\\Appdata\\Roaming\\Mozilla\\fi refox\\ (on Windows 7 & Vista) or C:\\Documents And Settings\\Username\\Application Data\\Mozilla\\Firefox\\ (on Windows XP & older))


2. Open Ramdisk configuration app (i will be using SuperSpeed Ramdisk Plus)


3. Add a new Ramdisk


4. Make sure its size is bigger than the firefox's Appdata folder, i'm using 128MB


5. I recommend using NTFS


6. I highly recommend checking the "Save at system shutdown" checkbox, unless you plan to keep the appdata some other way when system is powered off


7. Finish the creating of the ramdisk, also leave all other options there on default, and at this point, you MUST close firefox and keep it closed untill this is done, so either save this guide or use some other browser to view this

8. Backup Firefox's Appdata folder, i recomemnd backing it up under Mozilla folder


9. Delete the contents of the original Firefox folder, so that there's just an empty Firefox folder

10. Open up Disk Management tool, start -> run -> diskmgmt.msc


11. Right click on the Ramdisk and select "Change drive letter and paths..."


12. Click on Add


13. Browse for the original, empty firefox folder


14. Click OK on everything (you can remove the drive letter if you wish, its not necessary) and then go back to the firefox's Appdata folder to see that the folder icon is changed


15. Copy the contents from the Backup to this "changed" Firefox folder

16. Try opening firefox, it should open just like usual, but it should be faster now, especially on "problematic pages" such as Facebook, especially when using Facebook's Chat feature


Additional:

I keep my computer on 24/7, so i never turn off my computer, so abiviously the Ramdisk wont be saved unless i manually save it or shut down, so i made a Batch Script (a .bat file) which backs up the Ramdisk into the Backup folder:

Code:
xcopy C:\\Users\\Prime7\\AppData\\Roaming\\Mozilla\\Firefox\\* C:\\Users\\Prime7\\AppData\\Roaming\\Mozilla\\Firefox_Backup\\ /E /C /F /G /H /K /Y
so, what that does is to copy contents from C:\\Users\\Prime7\\AppData\\Roaming\\Mozilla\\Fire fox\\ to C:\\Users\\Prime7\\AppData\\Roaming\\Mozilla\\Fire fox_Backup\\

and also, i made this a scheduled task using the windows Task Scheduler so that the batch script is run every morning at 06:00

also, i made a "reversed" copying script so it copies data from the backup folder to the original folder when the contents of the original folder were not saved, for example when a power outtage has happened, or a BSOD

Code:
xcopy C:\\Users\\Prime7\\AppData\\Roaming\\Mozilla\\Firefox_Backup\\* C:\\Users\\Prime7\\AppData\\Roaming\\Mozilla\\Firefox\\ /E /C /F /G /H /K /Y
Doomsday Device
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i5-3550 Intel DZ77RE-75K Geforce GTX 670 Geforce GTX 470 
GraphicsRAMHard DriveHard Drive
Geforce GTX 275 Kingston HyperX Black 32GB (4x8GB) WD Caviar Black (SATA-III) OCZ Vertex 4 
Optical DriveCoolingOSOS
TSSTcorp DVD RW Scythe Ninja 3 Xubuntu 13.04 Windows 7 
MonitorMonitorMonitorMonitor
Samsung Syncmaster 2494HS Dell E228WFP Dell E228WFP Fujitsu Siemens SCENICVIEW A19-3A 
KeyboardPowerCaseMouse
Ducky Shine 2 Nexus RX-8500 BitFenix Shinobi XL Steelseries Sensei [RAW] 
AudioOther
Integrated 10 channel HD audio Dual Gigabit LAN subsystems using the Intel® 82... 
  hide details  
Reply
Doomsday Device
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i5-3550 Intel DZ77RE-75K Geforce GTX 670 Geforce GTX 470 
GraphicsRAMHard DriveHard Drive
Geforce GTX 275 Kingston HyperX Black 32GB (4x8GB) WD Caviar Black (SATA-III) OCZ Vertex 4 
Optical DriveCoolingOSOS
TSSTcorp DVD RW Scythe Ninja 3 Xubuntu 13.04 Windows 7 
MonitorMonitorMonitorMonitor
Samsung Syncmaster 2494HS Dell E228WFP Dell E228WFP Fujitsu Siemens SCENICVIEW A19-3A 
KeyboardPowerCaseMouse
Ducky Shine 2 Nexus RX-8500 BitFenix Shinobi XL Steelseries Sensei [RAW] 
AudioOther
Integrated 10 channel HD audio Dual Gigabit LAN subsystems using the Intel® 82... 
  hide details  
Reply
post #2 of 10
You can disable HDD caching and enable RAM caching in the Firefox about:config page. A RAM disk isn't needed.


* Type about:config into the address bar and press enter.
* Set the value of browser.cache.disk.enable to false.
* Create a new integer value named disk.cache.memory.capacity and set its value to 32768 (for 32MB), 65536 (for 64MB), or 131072 (for 128MB).
* Restart Firefox.
Edited by DuckieHo - 2/22/10 at 8:02am
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
Once again...
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 [4.28GHz, HT] Asus P6T + Broadcom NetXtreme II VisionTek HD5850 [900/1200] + Galaxy GT240 2x4GB G.Skill Ripjaw X [1632 MHz] 
Hard DriveOSMonitorKeyboard
Intel X25-M 160GB + 3xRAID0 500GB 7200.12 Window 7 Pro 64 Acer H243H + Samsung 226BW XARMOR-U9BL  
PowerCaseMouseMouse Pad
Antec Truepower New 750W Li Lian PC-V2100 [10x120mm fans] Logitech G9 X-Trac Pro 
  hide details  
Reply
post #3 of 10
Thread Starter 
Quote:
Originally Posted by DuckieHo View Post
You can disable HDD caching and enable RAM caching in the Firefox about:config page. A RAM disk isn't needed.


* Type about:config into the address bar and press enter.
* Set the value of browser.cache.disk.enable to false.
* Create a new integer value named disk.cache.memory.capacity and set its value to 32768 (for 32MB), 65536 (for 64MB), or 131072 (for 128MB).
* Restart Firefox.
that method still wont speed-up those add-ons that have extra HDD activity or any other than just caching

also sessionstore.js gets huge activity even if you do that, and this sessionstore.js problem were my biggest problem here, especially with Facebook's Chat feature
Doomsday Device
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i5-3550 Intel DZ77RE-75K Geforce GTX 670 Geforce GTX 470 
GraphicsRAMHard DriveHard Drive
Geforce GTX 275 Kingston HyperX Black 32GB (4x8GB) WD Caviar Black (SATA-III) OCZ Vertex 4 
Optical DriveCoolingOSOS
TSSTcorp DVD RW Scythe Ninja 3 Xubuntu 13.04 Windows 7 
MonitorMonitorMonitorMonitor
Samsung Syncmaster 2494HS Dell E228WFP Dell E228WFP Fujitsu Siemens SCENICVIEW A19-3A 
KeyboardPowerCaseMouse
Ducky Shine 2 Nexus RX-8500 BitFenix Shinobi XL Steelseries Sensei [RAW] 
AudioOther
Integrated 10 channel HD audio Dual Gigabit LAN subsystems using the Intel® 82... 
  hide details  
Reply
Doomsday Device
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i5-3550 Intel DZ77RE-75K Geforce GTX 670 Geforce GTX 470 
GraphicsRAMHard DriveHard Drive
Geforce GTX 275 Kingston HyperX Black 32GB (4x8GB) WD Caviar Black (SATA-III) OCZ Vertex 4 
Optical DriveCoolingOSOS
TSSTcorp DVD RW Scythe Ninja 3 Xubuntu 13.04 Windows 7 
MonitorMonitorMonitorMonitor
Samsung Syncmaster 2494HS Dell E228WFP Dell E228WFP Fujitsu Siemens SCENICVIEW A19-3A 
KeyboardPowerCaseMouse
Ducky Shine 2 Nexus RX-8500 BitFenix Shinobi XL Steelseries Sensei [RAW] 
AudioOther
Integrated 10 channel HD audio Dual Gigabit LAN subsystems using the Intel® 82... 
  hide details  
Reply
post #4 of 10
Wait so only the Appdata is in RAM, and not the Firefox exe?
Project Chloe
(16 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz 1.280v Fatal1ty Z68 Professional Gen3 MSI R6950 Twin Frozr III Corsair Vengence 8GB 1600MHz 
Hard DriveHard DriveOptical DriveOS
OCZ Vertex 4 Samsung Spinpoint F3 Asus 24X DVD Burner Windows 7 Ultimate 64bit 
MonitorMonitorKeyboardPower
ASUS VE228H ASUS VE228H Razor Blackwidow  Corsair 850HX 
CaseMouseMouse PadAudio
HAF X Logitech G500 Razer Goliathus Logitech G930 
  hide details  
Reply
Project Chloe
(16 items)
 
  
CPUMotherboardGraphicsRAM
i5-2500k 4.4GHz 1.280v Fatal1ty Z68 Professional Gen3 MSI R6950 Twin Frozr III Corsair Vengence 8GB 1600MHz 
Hard DriveHard DriveOptical DriveOS
OCZ Vertex 4 Samsung Spinpoint F3 Asus 24X DVD Burner Windows 7 Ultimate 64bit 
MonitorMonitorKeyboardPower
ASUS VE228H ASUS VE228H Razor Blackwidow  Corsair 850HX 
CaseMouseMouse PadAudio
HAF X Logitech G500 Razer Goliathus Logitech G930 
  hide details  
Reply
post #5 of 10
Thread Starter 
Quote:
Originally Posted by tryceo View Post
Wait so only the Appdata is in RAM, and not the Firefox exe?
correct, as the exe is read only once, when firefox is launched, but the appdata is accessed hudrseds or thousands times in one session, so theres more benefit in having the appdata on ramdisk instead of the program files.
ofcourse you can do the same trick to the firefox's program folder
Doomsday Device
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i5-3550 Intel DZ77RE-75K Geforce GTX 670 Geforce GTX 470 
GraphicsRAMHard DriveHard Drive
Geforce GTX 275 Kingston HyperX Black 32GB (4x8GB) WD Caviar Black (SATA-III) OCZ Vertex 4 
Optical DriveCoolingOSOS
TSSTcorp DVD RW Scythe Ninja 3 Xubuntu 13.04 Windows 7 
MonitorMonitorMonitorMonitor
Samsung Syncmaster 2494HS Dell E228WFP Dell E228WFP Fujitsu Siemens SCENICVIEW A19-3A 
KeyboardPowerCaseMouse
Ducky Shine 2 Nexus RX-8500 BitFenix Shinobi XL Steelseries Sensei [RAW] 
AudioOther
Integrated 10 channel HD audio Dual Gigabit LAN subsystems using the Intel® 82... 
  hide details  
Reply
Doomsday Device
(22 items)
 
  
CPUMotherboardGraphicsGraphics
Intel Core i5-3550 Intel DZ77RE-75K Geforce GTX 670 Geforce GTX 470 
GraphicsRAMHard DriveHard Drive
Geforce GTX 275 Kingston HyperX Black 32GB (4x8GB) WD Caviar Black (SATA-III) OCZ Vertex 4 
Optical DriveCoolingOSOS
TSSTcorp DVD RW Scythe Ninja 3 Xubuntu 13.04 Windows 7 
MonitorMonitorMonitorMonitor
Samsung Syncmaster 2494HS Dell E228WFP Dell E228WFP Fujitsu Siemens SCENICVIEW A19-3A 
KeyboardPowerCaseMouse
Ducky Shine 2 Nexus RX-8500 BitFenix Shinobi XL Steelseries Sensei [RAW] 
AudioOther
Integrated 10 channel HD audio Dual Gigabit LAN subsystems using the Intel® 82... 
  hide details  
Reply
post #6 of 10
Thanks so much for this my Firefox is running so much faster now I knew there was an everyday reason for the last ram upgrade...
Hackintosh
(13 items)
 
  
CPUMotherboardGraphicsRAM
I3 550 GIGABYTE|GA-H55M-S2V Saphire 5770 Patriot Sector 5 8gb 
Hard DriveOSCase
500gb 7200rpm Triple Boot OS-X, Win7, Ubuntu Lian Li pc-60 
  hide details  
Reply
Hackintosh
(13 items)
 
  
CPUMotherboardGraphicsRAM
I3 550 GIGABYTE|GA-H55M-S2V Saphire 5770 Patriot Sector 5 8gb 
Hard DriveOSCase
500gb 7200rpm Triple Boot OS-X, Win7, Ubuntu Lian Li pc-60 
  hide details  
Reply
post #7 of 10
So a final edit...I couldn't get your program to work on my x64 7 so after a few lines of profanity and a little reading on the OCZ forums I found this.
http://memory.dataram.com/products-a...ftware/ramdisk

Free and same setup without the need of batch files to save/load.

My settings are this and so far it works...not sure on the last image however I think I might set it lower.





Then I followed your guide and it worked like magic. I might lower some of the numbers but will see how it goes with this setup first. It doesn't appear to save if nothing changes so lets hope this works out
Edited by Therian86 - 12/4/10 at 11:17am
post #8 of 10
how do you make it where it when i shut down the computer it wont erase everything constantly ? like backup for history passwords and all that?
post #9 of 10
Quote:
Originally Posted by DuckieHo View Post

You can disable HDD caching and enable RAM caching in the Firefox about:config page. A RAM disk isn't needed.



* Type about:config into the address bar and press enter.

* Set the value of browser.cache.disk.enable to false.

* Create a new integer value named disk.cache.memory.capacity and set its value to 32768 (for 32MB), 65536 (for 64MB), or 131072 (for 128MB).

* Restart Firefox.

Which amount would be good or recommend it for firefox?
OC'ing
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68 Deluxe Sapphire Radeon Hd 6950 2gb 8gb DDR3 Gskill SNIPER 1600Mhz F3-12800CL9D-8GBS 
Hard DriveOptical DriveOSMonitor
Crucial M4 64GB - Maxtor 250GB Raid0 -2tb WD Green LG DVD Drive Windows 7 Ultimate x64 23" LG 2340v 
PowerCaseMouse
PowerCooler HE850w (almost cooked) Lancool k60 Genius (basic) 
  hide details  
Reply
OC'ing
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k Asus P8Z68 Deluxe Sapphire Radeon Hd 6950 2gb 8gb DDR3 Gskill SNIPER 1600Mhz F3-12800CL9D-8GBS 
Hard DriveOptical DriveOSMonitor
Crucial M4 64GB - Maxtor 250GB Raid0 -2tb WD Green LG DVD Drive Windows 7 Ultimate x64 23" LG 2340v 
PowerCaseMouse
PowerCooler HE850w (almost cooked) Lancool k60 Genius (basic) 
  hide details  
Reply
post #10 of 10
could i do this with chrome? will i see a noticeable performance difference opposed having chrome on my ssd? worth the hassle?
switch
(13 items)
 
  
CPUMotherboardGraphicsHard Drive
3770k asus p8z77-lk AMD Radeon HD 7950 adata s510  
Hard DriveHard DriveCoolingMonitor
spinpoint caviar blue noctua nh d 14 x-star 1440p 96hz 
KeyboardPowerCaseMouse
filco majestouch 2 antec neo eco 620w nzxt switch 810 razer deathadder 
Mouse Pad
steelseries qck+ 
  hide details  
Reply
switch
(13 items)
 
  
CPUMotherboardGraphicsHard Drive
3770k asus p8z77-lk AMD Radeon HD 7950 adata s510  
Hard DriveHard DriveCoolingMonitor
spinpoint caviar blue noctua nh d 14 x-star 1440p 96hz 
KeyboardPowerCaseMouse
filco majestouch 2 antec neo eco 620w nzxt switch 810 razer deathadder 
Mouse Pad
steelseries qck+ 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Other Software
Overclock.net › Forums › Software, Programming and Coding › Other Software › How to: Increasing Firefox performance with a Ramdisk