Tag Archive for performance

Ubuntu: Howto drastically speed up Firefox

Ubuntu: Howto drastically speed up Firefox

Make firefox store its cache in the /tmp directory — which when we have moved it to a tmpfs according to this wiki is *fast*.

  • Firefox 3.x uses a sqlite db that creates many write accesses, so this can reduce it:
    1. In Firefox go to (type as url) “about:config”, right click, add new string „browser.cache.disk.parent_directory“ with value “/tmp/firefox”
    2. In Firefox change options/security/ and disable phishing if you dare. – Your firefox will run even faster then but won’t warn you about phishing any more so take care!

Alternatively, to speed up Firefox further, enter “about:config” (without the quotes) as an url in Firefox, then change the following settings:

// disable disk and offline cache
set browser.cache.disk.enabled: false
set browser.cache.disk.capacity: 0
set browser.cache.offline.enable: false
set browser.cache.offline.capacity: 0
// just as a precaution
add browser.cache.disk.parent_directory: /tmp
// apparently safebrowsing slows things down – disable at your own risk!
set browser.safebrowsing.malware.enabled: false
set browser.safebrowsing.enabled: false
set network.prefetch-next: false
// don’t show suggestions in the search bar
browser.search.suggest.enabled: false
// don’t spellcheck as I type
layout.spellcheckDefault: 0

Ubuntu: Reduce SSD Disk wear

Ubuntu: Howto reduce the SSD wear

Open fstab, and add the following lines:

# sudo gedit /etc/fstab

tmpfs /var/log tmpfs defaults 0 0
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0

There is currently a bug in sysklogd where it cannot handle booting with an empty /var/log directory (bug #290127). This can be fixed by modifying /etc/init.d/sysklogd:

Find this function:

fix_log_ownership()
for l in `syslogd-listfiles -a`
do
chown ${USER}:adm $l
done
}

..and replace it with this:

fix_log_ownership()
{
for l in `syslogd-listfiles -a –news`
do
# Create directory for logfile if required
ldir=$(echo ${l} | sed ‘s/[^\/]*$//g’)
if [ ! -e $ldir ] ; then
mkdir -p $ldir
fi
# Touch logfile and chown
touch $l && chown ${USER}:adm $l
done
}

Warning: this will cause some packages to fail mysteriously when they cannot access the log directories that were installed with the packages and then disappeared at reboot.

To rebuild the rest of the directory structure inside /var/log on each reboot, add these lines to /etc/rc.local above the ‘exit 0′ line:

for dir in apparmor apt ConsoleKit cups dist-upgrade fsck gdm installer news ntpstats samba unattended-upgrades ; do
if [ ! -e /var/log/$dir ] ; then
mkdir /var/log/$dir
fi
done

Close
loading...