Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Jan 2018, 01:40
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Firefox is eating your SSD, here is the solution
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Author Message
tallboy


Joined: 21 Sep 2010
Posts: 854
Location: Oslo, Norway

PostPosted: Sat 05 Aug 2017, 00:11    Post subject:  Firefox is eating your SSD, here is the solution  

Firefox is constantly writing to a file recovery.js in your storage, also when idle, to be able to restore your browser, if it for some reason crashes.
It can be modified in about:config, the setting is named browser.sessionstore.interval, and has a default value of 15 seconds. (setting is in milliseconds) .
The setting means that the last 15s is all the work you will lose if the browser is restarted after a crash. Chrome has the same problem.
Here is a couple of good articles covering the subject, with a detailed analyzis of the problem, and a solution:

https://www.servethehome.com/firefox-is-eating-your-ssd-here-is-how-to-fix-it/
http://www.myce.com/news/firefox-chrome-can-shorten-ssd-lifetime-80534/

In Palemoon the default setting is 60s. (60000)

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8405
Location: Perth, Western Australia

PostPosted: Sat 05 Aug 2017, 07:31    Post subject:  

Thanks for that info.

I found that SeaMonkey does the same thing.

It can also be fixed by editing 'prefs.js', but do so when SeaMonkey is not running.

Posted about it on blog:
http://barryk.org/news/?viewDetailed=00639

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
watchdog

Joined: 28 Sep 2012
Posts: 1506
Location: Italy

PostPosted: Sat 05 Aug 2017, 11:05    Post subject:  

BarryK wrote:

It can also be fixed by editing 'prefs.js', but do so when SeaMonkey is not running.


It can also be fixed by copying in browser's profile a file user.js leaving prefs.js untouched:

Code:
// set to half 1 hour writing on device recovery.js:
user_pref("browser.sessionstore.interval", 1800000);


Tested in palemoon.

Last edited by watchdog on Sat 12 Aug 2017, 06:29; edited 1 time in total
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9877
Location: Charleston S.C. USA

PostPosted: Sat 05 Aug 2017, 13:23    Post subject:  

I do not have a big need for this option at all.

Here is how to Completely disable session store.

in about:config

Firefox 3.5 and above:
you can set the preferences browser.sessionstore.max_tabs_undo and browser.sessionstore.max_windows_undo to "0".

More info here on modifying features of session restore:
http://kb.mozillazine.org/Session_Restore

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 854
Location: Oslo, Norway

PostPosted: Fri 11 Aug 2017, 11:14    Post subject:  

Thank you, watchdog and bigpup.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2193

PostPosted: Fri 11 Aug 2017, 12:12    Post subject:  

Writes to something like

~/.mozilla/firefox/xxxxxxxx.default/sessionstore-backups/recovery.js

where xxxxxxxx is a alphanumeric series unique to your firefox profile

Perhaps yet another alternative might be to set that to be a ram based file.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 854
Location: Oslo, Norway

PostPosted: Fri 11 Aug 2017, 20:43    Post subject:  

The sessionstore.js file itself is not very big. I don't know if writing to it every 15 sec. is regarded as download time. If so, even for a short time and a friendly ISP, it eventually has to be paid for.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
8Geee


Joined: 12 May 2008
Posts: 1334
Location: N.E. USA

PostPosted: Sat 12 Aug 2017, 00:12    Post subject:  

Most of this is already done in my particular spins for Slacko5.7. However, I agree that

browser.sessionstore.max_resumed_crashes
browser.sessionstore.max_tabs_undo
browser.sessionstore.max_windows_undo

should all be set to zero in about config

browser.sessionstore.interval;3600000
interval is 1 hour

Thanks for bringging this to everyone's attention.

Regards
8Geee

_________________
Linux user #498913

Good God!, by the stars in the sky we are lost!
And into the breach we got tossed!
And the world is comin' on fast! --Florence Welch
Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1416

PostPosted: Sat 12 Aug 2017, 08:08    Post subject:  

8Geee wrote:
Most of this is already done in my particular spins for Slacko5.7. However, I agree that

browser.sessionstore.max_resumed_crashes
browser.sessionstore.max_tabs_undo
browser.sessionstore.max_windows_undo

should all be set to zero in about config

browser.sessionstore.interval;3600000
interval is 1 hour

Thanks for bringging this to everyone's attention.

Regards
8Geee



I'd like to add to 8Geee's good advice above to also make sure:

browser.sessionstore.restore_on_demand
browser.sessionstore.restore_from_crash


are both changed to "false", and not left at the default "true"
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 854
Location: Oslo, Norway

PostPosted: Sun 13 Aug 2017, 06:19    Post subject:  

Thank you 8Geee and belham2 for following up.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 854
Location: Oslo, Norway

PostPosted: Thu 17 Aug 2017, 17:32    Post subject:  

One of the about:config settings mentioned above, made my Palemoon unresponsive to 'Undo Close Tab'! So by resetting one by one, I found that browser.sessionstore.max_tabs_undo should not be set to 0 if you want to be able to reopen closed tabs. The 'reset' option set the value back to default 10, and everything is OK again.

BTW, with my Palemoon modified according to suggestions above, it crashed because of stupid behaviour from it's user (me Embarassed ), but reopened with most of the relevant tabs intact, i.e. those which had been open for more than one hour.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 9877
Location: Charleston S.C. USA

PostPosted: Thu 17 Aug 2017, 18:47    Post subject:  

tallboy you have sessionstore turned on and working.
What you describe is what it does for the browser.

You may only have the tab part working, but it is doing what this topic started out trying to tell people how to make it stop.

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 386

PostPosted: Thu 17 Aug 2017, 23:06    Post subject:  

For the nuclear option, that is to say, stop Firefox writing to a SSD altogether, it is possible to run Firefox with the --profile <path to profile folder>
argument.

If the profile folder is copied from the SSD to /tmp, and /tmp is mounted tmpfs then the writes tend to be in RAM and will spare the SSD.

Of course if there is a need to reboot or the system panics, all the work is lost. It might be possible to use a script to loop the cp -ur command (copy only changed files) to the SSD every five or ten minutes. It might also be possible to set up a bespoke profile folder on tmpfs but use symlinks for certain files or folders that need to be kept on permanent storage, for example cookies, history, the cache.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 854
Location: Oslo, Norway

PostPosted: Fri 18 Aug 2017, 14:28    Post subject:  

bigpup and Peterm321, I set my browser.sessionstore.interval to 3600000, which equals a 1 hour interval between writes.
Besides, I usually run off a live CD, so the SSD part does not mean much to me personally. But, the setting above also writes to the same file sessionstore.js when it is localized somewhere in RAM, so I believe anything that will free up RAM and CPU activity is good.
Here are my settings: (Palemoon 27.4.1)
about-config.jpg
 Description   
 Filesize   73.66 KB
 Viewed   258 Time(s)

about-config.jpg


_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 854
Location: Oslo, Norway

PostPosted: Fri 18 Aug 2017, 20:08    Post subject:  

Some additional comments, I hope the moderator will se the relevance, and keep it here.
If some form of sessionstore is kept or applied, one question may be what to do with the setting browser.sessionstore.privacy_level:
mozillazine.org wrote:
This preference controls when to store extra information about a session: contents of forms, scrollbar positions, cookies, and POST data.
Possible values and their effects
0 Store extra session data for any site. (Default starting with Firefox 4.)
1 Store extra session data for unencrypted (non-HTTPS) sites only. (Default before Firefox 4.)
2 Never store extra session data.
As you can see above, Palemoon defaults to 1, I will change to mine to 2.
mozillazine.org wrote:
browser.sessionstore.privacy_level_deferred (new in Firefox 4) - controls what gets saved by Session Restore when quitting (not crashing or restarting to install updates/addons) with browser.startup.page *not* set to restore previous session on startup.
Possible values and their effects
0 Store extra session data for any site.
1 Store extra session data for unencrypted (non-HTTPS) sites only.(Default)
2 Never store extra session data.
Palemoon defaults to 1, I will change to mine to 2.

browser.sessionstore.postdata
POST data contains info that potentially could resend an email or re-submit an order, it defaults to 0, and should be kept at that!
Possible values and their effects
-1 No limit on amount of stored POST data
0 Do not store POST data in saved sessions (Default)
Choose any positive integer: Store this many bytes’ worth of POST data per saved history entry in saved sessions.
browser.sessionstore.postdata in Palemoon defaults to 0, and I see no reason to modify that.
If this preference is set to anything other than 0, you may want to also keep browser.sessionstore.privacy_level set to 1.
keep browser.sessionstore.privacy_level must be set to 0 or 1 for this preference to have an effect.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [17 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0719s ][ Queries: 12 (0.0176s) ][ GZIP on ]