Hi,
this is a renewed guide for optimize flash on firefox browser based on my old guide plus new hints.
This guide is intended for poor old 32bit pc (like mine) with Lucid, Firefox 3.6.6 and Flash 10.1.x. Of course, anyone can give a try.
I do not guarantee that these instructions works for you. On my box these settings improve the performances pretty much.
1) Install flash plugin
Code:
sudo apt-get --purge remove gnash adobe-flashplugin swfdec-mozilla && sudo apt-get install flashplugin-nonfree
2) Optimize Firefox
Open Firefox
Code:
Choose the menu Edit -> Preferences -> Advanced -> Network -> Connection -> Settings
and choose No proxy option, then click Ok, then Close
In the address bar type about:config and filter/change the following settings:
Code:
network.dns.disableIPv6 true
network.http.max-connections 96
network.http.max-connections-per-server 32
network.http.max-persistent-connections-per-server 8
network.http.pipelining true
network.http.pipelining.ssl true
network.http.pipelining.maxrequests 8
network.http.proxy.pipelining true
network.prefetch-next false
network.dns.disableipv6 true
browser.sessionstore.interval 240000
mousewheel.accelleration.factor 5
mousewheel.accelleration.start 3
3) Install Firefox extensions
Install Flashblock extension: https://addons.mozilla.org/en-US/firefox/addon/433
Install LSO, this is a handy privacy FF extension for Flash: https://addons.mozilla.org/en-US/firefox/addon/6623
Install ADBlock Plus extension: https://addons.mozilla.org/en-US/firefox/addon/1865/
Install BetterCache extension (and leave the default values): https://addons.mozilla.org/en-US/firefox/addon/6371/
Install Load Tabs Progressively extension: https://addons.mozilla.org/en-US/firefox/addon/91919/
Now restart Firefox and close Firefox
4) Disable xgl
Code:
mkdir ~/.config/xserver-xgl
touch ~/.config/xserver-xgl/disable
5) Set OverrideGPU
Code:
sudo mkdir /etc/adobe
echo "OverrideGPUValidation=true" > ~/mms.cfg
sudo mv ~/mms.cfg /etc/adobe/
6) Disable Pango
Edit this file:
and add this line at the end of the file, save and close
Code:
export MOZ_DISABLE_PANGO=1
7) Disable localhost for IPv6
Edit the file:
Code:
sudo gedit /etc/hosts
remove localhost entry in IPV6 section of /etc/hosts
Before:
Code:
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
After:
Code:
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
Be careful on this setting if you are using IPV6 (I'm not usisg it), see: https://bugs.launchpad.net/ubuntu/+s...se/+bug/301430
8 ) Optimize FF sqlite (updated)
Install sqlite3
Code:
sudo apt-get install sqlite3
Close Firefox
Create & edit script for cron:
Code:
sudo touch /etc/cron.daily/start-sqlite-ff
sudo chmod +x /etc/cron.daily/start-sqlite-ff
sudo gedit /etc/cron.daily/start-sqlite-ff
Insert the following text and save:
Code:
#!/bin/bash
PROC=`pgrep -n firefox`
if [ "$PROC" != "" ]; then echo "Firefox is running"; exit 1; fi
find $HOME/.mozilla/ \( -name "*.sqlite" \) -exec sqlite3 {} "vacuum" \;
Run the script:
Code:
sudo /etc/cron.daily/start-sqlite-ff
Done.
9) Xorg optimization
Edit this file (if not exist, as supposed to be, create it):
Code:
sudo gedit /etc/X11/xorg.conf
Paste the following text:
Code:
Section "DRI"
Mode 0666
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
Save the file and exit. This boost a lot.
(Thx Labello & Lovinglinux for this)
10) Optimize RWIN settings
Go to http://www.speedtest.net/ test your connection speed and track down the values.
On terminal window paste this command:
Code:
sudo sysctl -w net.core.rmem_default=524288 net.core.rmem_max=524288 net.core.wmem_default=524288 net.core.wmem_max=524288 net.ipv4.tcp_wmem="4096 87380 524288" net.ipv4.tcp_rmem="4096 87380 524288" net.ipv4.tcp_mem="524288 524288 524288" net.ipv4.tcp_rfc1337=1 net.ipv4.ip_no_pmtu_disc=0 net.ipv4.tcp_sack=1 net.ipv4.tcp_fack=1 net.ipv4.tcp_window_scaling=1 net.ipv4.tcp_timestamps=1 net.ipv4.tcp_ecn=0 net.ipv4.route.flush=1
Then go back on http://www.speedtest.net/ and re-test your connection; the results should be improved in evident way, if so, make the command implemented above permanent; open the file:
Code:
sudo gedit /etc/sysctl.conf
And add the following at the end of the file:
Code:
net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1
Save and close; then:
Source: http://swik.net/Ubuntu/Only+Ubuntu/H...and+RWIN/cbnda
11) Fix css fixed background bug
Bug source: https://bugzilla.mozilla.org/show_bug.cgi?id=438911
Edit this file:
Code:
gedit ~/.mozilla/firefox/*.default/chrome/userContent.css
Past the following lines and save:
Code:
/* Smooth Scrolling: Disable Fixed Background Images */
body {
background-attachment: scroll !important;
background-repeat:no-repeat;
}
12) Tune memory + FF cache in RAM (at least with 1GB RAM on board)
Edit this file:
Code:
sudo gedit /etc/sysctl.conf
and past the following lines at the end:
Code:
# Improve memory
vm.swappiness=10
# Improve file/folder browsing speed
vm.vfs_cache_pressure=50
# Set maximum amount of memory allocated to shm to 256MB
kernel.shmmax = 268435456
Save and do the following command:
Open Firefox and type in the address bar about:config; then with right click on window choose New -> String and insert browser.cache.disk.parent_directory and as a value /dev/shm
Close Firefox
Now reboot your pc and enjoy!
-------------------------------------------------------------------------
*11/14/2010 Updated extensions
*10/23/2010 Tune memory
*10/18/2010 Updated RWIN optimization
*10/17/2010 Added userContent.css workaround
*10/16/2010 Remove Ondemand tweak and added Xorg optimization
*10/16/2010 Added RWIN optimization
Bookmarks