Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] Firefox and tmpfs: a surprising improvement
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Jun 25, 2009 10:00 am    Post subject: Reply with quote

and what if your computer hangs? you're losing, among other things, the history since the previous backup?
_________________
The End of the Internet!
Back to top
View user's profile Send private message
El_Goretto
Advocate
Advocate


Joined: 29 May 2004
Posts: 2862
Location: Paris

PostPosted: Thu Jun 25, 2009 10:09 am    Post subject: Reply with quote

truc wrote:
and what if your computer hangs? you're losing, among other things, the history since the previous backup?

It is true with the local.stop method too isn't it?
If the computer is faily unstable I assume that both wrapper and crontab should be used... (but why using an unstable computer and trying to make it faster rather than fixing it first?) Otherwise wrapper should be enough IMHO.
_________________
-PC: 2500K/P8Z68V, 8Go DDR3 1600 1.35V, R9-290, ARC1220+5xWD500RE3, M4 256Go
-Home servers (hardened): µ-serv N40L, 2Go ECC + NF9D-2700, 4Go
-Réseau: ERL-3 + 3x switches GS108Tv2
-NAS: RDNU2000
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Thu Jun 25, 2009 10:45 am    Post subject: Reply with quote

well, I may have misunderstood you a little, I thought this thread was about calling the script through a cronjob, and that's all. I didn't know about the local.{start,stop} method.

Anyway, I'm personnally calling the, let's say, firefox-tmpfs script, first in ~/.xinitrc, then in a cronjob, and with a wrapper (kind of alias ff="firefox; firefox-tmpfs")
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Compintuit
n00b
n00b


Joined: 11 Mar 2009
Posts: 22

PostPosted: Thu Jul 02, 2009 3:14 am    Post subject: Reply with quote

So... If I do this, having a 44MB places.sqlite file will no longer make searching my history take about 10 secs? Would we now be talking milliseconds? Because that would be nice... but I'm still a gentoo noob, so I think I'll have to wait a bit before I try. But this has definitely worked well for some people?
Back to top
View user's profile Send private message
Evincar
Apprentice
Apprentice


Joined: 13 Feb 2007
Posts: 217
Location: Madrid

PostPosted: Thu Jul 02, 2009 7:19 am    Post subject: Reply with quote

Compintuit wrote:
So... If I do this, having a 44MB places.sqlite file will no longer make searching my history take about 10 secs? Would we now be talking milliseconds? Because that would be nice... but I'm still a gentoo noob, so I think I'll have to wait a bit before I try. But this has definitely worked well for some people?

It works, indeed, and the difference here is abysmal. From 3-4 seconds chokes to near instantaneous seeking.
_________________
<@Chin^> My sister caught me jacking off the other week and calls me a pervert
<@Chin^> just the other day i walked into my room and caught my sister masturbating
<@Chin^> So she calls me a pervert again?!?
<@Chin^> there is no justice in the world...
Back to top
View user's profile Send private message
loudmax
n00b
n00b


Joined: 30 Mar 2005
Posts: 7

PostPosted: Wed Sep 02, 2009 9:01 pm    Post subject: QPFox on Github Reply with quote

I started a Github project based on stevenrobertson's script. The most significant changes I added are compression, sqlite vacuuming, and printing a nice usage message. It's available here: http://github.com/nickaubert/QPFox/tree/master
Back to top
View user's profile Send private message
Bircoph
Apprentice
Apprentice


Joined: 27 Jun 2008
Posts: 258
Location: Moscow

PostPosted: Wed Sep 23, 2009 4:47 pm    Post subject: Reply with quote

I don't see great benefit from this on my system.
I moved .firefox to /dev/shm and first startup time dropped from ~2.5 secs to 2.0 secs, repeated startups doesn't differ at all. Anyway, this is filesystem's job to cache I/O and ext4 does this in a nice way.
_________________
Per aspera ad astra!
Back to top
View user's profile Send private message
Bill Cosby
Guru
Guru


Joined: 22 Jan 2005
Posts: 430
Location: Aachen, Germany

PostPosted: Thu Sep 24, 2009 8:47 am    Post subject: Reply with quote

Agreed, with ext4 I hardly notice any improvement.
_________________
The Creature from Jekyll Island.
Back to top
View user's profile Send private message
krinpaus
n00b
n00b


Joined: 01 Sep 2004
Posts: 15

PostPosted: Thu Sep 24, 2009 8:09 pm    Post subject: Reply with quote

Bircoph wrote:
I don't see great benefit from this on my system.
I moved .firefox to /dev/shm and first startup time dropped from ~2.5 secs to 2.0 secs, repeated startups doesn't differ at all. Anyway, this is filesystem's job to cache I/O and ext4 does this in a nice way.


I too, tried this "solution", among MANY other combos, to try and improve firefox performance,
especially once updating to FF 3.5.x, with no meaningful result. (I've been running reiserfs
for years on most partitions except /boot and my media collection (xfs), and that combo
has suited me and all the systems I touch fine (except Oracle DB's those aren't on Gentoo, sadly)).

Employing NoScript and Adblock and Flashblock only helped slightly, Flashblock moreso.
. It's when I bit the bullet (lose all those cookies, etc...) and moved .mozilla to .mozilla-old
and restarted that performance improved. Evidently too much carry-over "crud" from previous versions,
including my customized settings, weren't (rightfully) in FF's best performance "interest".

I reimported my bookmarks and went back to setting up my unique logins for each site, and
all is well, I am much more satisfied (with Flashblock/NoScript/Adblock, performance or not...).
Back to top
View user's profile Send private message
waterloo2005
Apprentice
Apprentice


Joined: 26 Aug 2008
Posts: 248

PostPosted: Wed Oct 27, 2010 11:29 am    Post subject: Reply with quote

firefox /home/steven/.mozilla/firefox/abcd1234.default tmpfs size=128M,noauto,user,exec,uid=1000,gid=100 0 0

here uid gid is about steven ?

I want to run .pack_ffox.sh when I reboot and shutdown computer .
How to do it ?

Do i need to use ordinary user to run .pack_ffox.sh ?

I know there is /etc/conf.d/local.stop , but all commands in it run as root .
How to run as ordinary user in /etc/conf.d/local.stop ?
thanks
_________________
i5-2450M, gnome, amd64
R,Mathematica,Emacs
Back to top
View user's profile Send private message
pierro78
n00b
n00b


Joined: 08 Oct 2007
Posts: 15

PostPosted: Sun Nov 21, 2010 8:37 pm    Post subject: Re: [TIP] Firefox and tmpfs: a surprising improvement Reply with quote

stevenrobertson wrote:

set browser.safebrowsing.enabled to false
set browser.safebrowsing.malware.enabled to false

Wow I've used the 2 above settings + browser.cache.disk.enable set to false on my gentoo install on a slow (2MB/s write) sdhc card (using ext4 without journal) and I can already see a big speed improvement ! much less annoying slowdowns ... thanks for the tip !

PS :
found some more tweaks to test on my slow SDHC card gentoo install :
- toolkit.storage.synchronous set to 0 ( http://www.roytanck.com/2009/04/05/more-eee-pc-firefox-speed-tweaks/ )
- browser.sessionstore.max_tabs_undo and browser.sessionstore.max_windows_undo to 0 (found on http://startupmeme.com/the-coolest-firefox-aboutconfig-tricks/ )
- using the SQLite Manager, under the DB Settings tab, change the "temporary data store" setting to "memory" ( http://forums.mozillazine.org/viewtopic.php?f=7&t=696145 )
- history set to max 21 days

PS2 :
eventually, even after I applied all the above tweaks, I ended using the initial tip of this thread because I still had slowdowns due to the slowness of my SDHC card. My firefox profile is about 25MB so a 64MB tmpfs is more than enough (that's a compressed tar of less than 7MB). Now my firefox is very fast and smooth :) ... thanks again for the tip !
_________________
gentoo on :
SDHC card (panasonic R4) with a fast firefox
512MB IBM Thinkpad X40
HP 2510p
PC with FOXCONN G9657MA-8KS2H MB & Intel Q6600 CPU
Back to top
View user's profile Send private message
tclover
Apprentice
Apprentice


Joined: 10 Apr 2011
Posts: 295

PostPosted: Sun May 08, 2011 9:04 pm    Post subject: YET another script! but this one do all necessaries... Reply with quote

This a simple script to take care of everything.
Quote:
#!/bin/sh
#~/.ffp-pack.sh
PF=""
FFH="${HOME}/.mozilla/firefox"
die() {
echo "$1"
exit 1
}
cd "${FFH}"
[ -n ${PF} ] || PF=`basename ${FFH}/*.default`
[ -z ${PF} ] && die "profile is empty."
[ -z "`mount|grep -F ${FFH}/${PF}`" ] && { sudo mount ff-p-`id -u` ${FFH}/${PF} -t tmpfs -o user,exec,uid=`id -u`,gid=`id -g`,size=128M || \
die "failed to mount ff-p-`id -u` tmpfs."; }
[ -f "${PF}/.unpacked" ] && {
tar --exclude $PF/.unpacked -cpf $PF.tmp.tbz2 $PF || die "failed to pack the profie."
mv $PF.tbz2 $PF.old.tbz2 || die "failed to override .old profile."
mv $PF.tmp.tbz2 $PF.tbz2 || die "failed to move the profile."
} || { tar xpf $PF.tbz2 && touch $PF/.unpacked || die "failed to unpack the profile."; }

If no profile is set, the script will take care of it, mount the tmpfs and unpack the profile. Of course you'll had to manually rm your profile... The tmpfs will just be mounted over your original profile dir. There's no need for whatever fstab line. Just add the script in bashrc or in the autostart applications, so you can start browsing after loggin.
EDIT: YOU HAVE TO MANUALLY ARCHIVE YOUR PROFILE THE FIRST TIME [and rm it, because you won't need it anymore].
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 372
Location: Svedala

PostPosted: Tue May 10, 2011 4:32 pm    Post subject: Re: [TIP] Firefox and tmpfs: a surprising improvement Reply with quote

pierro78 wrote:
stevenrobertson wrote:

set browser.safebrowsing.enabled to false
set browser.safebrowsing.malware.enabled to false

Wow I've used the 2 above settings + browser.cache.disk.enable set to false on my gentoo install on a slow (2MB/s write) sdhc card (using ext4 without journal) and I can already see a big speed improvement ! much less annoying slowdowns ... thanks for the tip !


I am from a world of security-first. So I am just asking - Is this good practice? I am just curious how this will affect my browsing if I do this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum