Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

iotop -a (accumulated I/O) on Linux shows after about 10 min. of browsing Internet:

Total DISK READ:       0.00 B/s | Total DISK WRITE:       0.00 B/s               
  TID  PRIO  USER     DISK READ DISK WRITE>  SWAPIN      IO    COMMAND           
17330 be/4 wojdyr     1540.00 K     38.48 M  0.00 %  0.00 % firefox              
  403 be/3 root          0.00 B     31.65 M  0.00 %  0.06 % [jbd2/sda5-8]        
17276 be/4 wojdyr      800.00 K     31.06 M  0.00 %  0.00 % firefox              
17329 be/4 wojdyr        0.00 B     20.96 M  0.00 %  0.00 % firefox              
31896 idle wojdyr        0.00 B   1200.00 K  0.00 %  0.00 % virtuoso-~.ini +wait 
31924 be/4 wojdyr        0.00 B   1064.00 K  0.00 %  0.00 % akonadi_n~ail_feeder 
18959 be/4 wojdyr        0.00 B    796.00 K  0.00 %  0.01 % firefox

I'm quite surprised by the amount of data written to disk. I turned off to-disk caching, but it didn't make notable difference. I turned off block-reported-attack-sites/web-forgeries -- nothing changed.

Is this rate of writing to disk normal in Firefox (10.0.1)? It quickly exceeds the total size of my firefox profile.

Looking at modification times of files in the firefox profile I see that a few files are modified very often:

cookies.sqlite{-wal,-shm}
sessionstore.js
places.sqlite{-wal,-shm}
permissions.sqlite

Is there something wrong with my system or configuration, or is it typical for FF?

I don't like this pointless writing to (SSD) disk. Can I do something about it?

EDIT: I've found this guide how to relocate the entire Firefox profile to RAM. It reduced almost to zero data written by firefox during session. (I know this is a bit paranoid and probably not worth the hassle.)

share|improve this question
7  
I think you are too concerned with the write limit of SSDs. Unless it is a first gen SSD, your laptop will die before the SSD does. –  surfasb Mar 11 '12 at 19:06
    
You are right. I know I there is no reason to worry so much about this disk, but I can't help it :-) –  marcin Mar 12 '12 at 17:41

7 Answers 7

up vote 7 down vote accepted

I did an investigation of where writes to my SSD come from. I found the same thing you did. After analyzing logs of writes as well as thinking about things I realized that it is Firefox's crash recovery. In order to be able to recover from a crash Firefox has to write the session to disk. The session information is stored in the four files you listed. Firefox updates these every ~30 seconds. With lots of tabs in a big session this adds up to a few GB per day.

But as surfasb says, it is not really anything to worry about.

share|improve this answer
    
Thanks! good analysis. Do you know if it's possible to change the frequency of disk writing? Every 30 seconds seems rather too often for me –  marcin Mar 12 '12 at 21:40
3  
In about:config there is a setting called browser.sessionstore.interval. Interestingly according to it Firefox should store every 15 sec. This was not the interval I observed. –  Mr Alpha Mar 13 '12 at 5:59

FF was writing to disk constantly at 2.5+ MB/s! I ran sudo iosnoop -p PID and found that the Evernote Web Clipper was doing all the writing. I removed it and disk writes went down to 0 to a few kb/s.

share|improve this answer

How many writes do you have each day? Maybe it's not worth worrying about that? Calculate it for a day and check it here: http://www.ssdready.com/measure/

share|improve this answer

There is a setting in Firefox that controls how often the session restore saves files. Go to about:config and change:

  • browser.sessionstore.interval to change how often the session is saved. On my system, the default was 15000 (milliseconds) so it was writing to disk every 15 seconds. If you increase this to 300000, it will only write every 5 minutes.

  • browser.sessionstore.enabled can be turned to false to disable this feature completely. This will reduce the amount of disk writes Firefox does, but this will also prevent Firefox from restoring your session when it crashes.

share|improve this answer

AFter loading about 10 pages and some in Chrome mine looks like this:

iotop -a output

So I guess thats normal swap/page file use.

(Although one would think with me only using 31% of RAM it wouldn't swap at all)

share|improve this answer
    
Thanks for testing! I doesn't look like swapping, apparently firefox if forcing writing some files to disk as often as possible rather than keeping them in memory. –  marcin Mar 12 '12 at 17:38

Perhaps someone has a compromised the machine and is using it for anonymous P2P or F2F networking with obfuscated and encrypted filesystems? Like:

https://en.wikipedia.org/wiki/I2P

or

https://en.wikipedia.org/wiki/Darknet_(file_sharing)

https://en.wikipedia.org/wiki/Botnet

share|improve this answer
    
that's probably not this, but thanks for trying to help, -1 was not by me :) –  marcin Mar 12 '12 at 17:44
    
i probablyy made too many assumptions anyway, but I guess one shouldn't suggest disaster without testing first. and i forgot how big images and stuff on web pages can be. –  conspiritech Mar 13 '12 at 3:42
    
they may do that because they don't want to take up RAM when you decide to start up photoshop or something, and its impractical/not allowed to write rules around it, at a guess. –  conspiritech Mar 13 '12 at 3:44

It is perfectly normal for a browser to store changes to cookies and sessions to the disk. The data about which tabs you had open has to be kept somewhere. Your usr directory (I assume that is where Firefox stores those things) shouldn't be located on an SSD to begin with, move it to an HDD.

share|improve this answer
    
The problem is with large amount of written data, several orders of magnitude more than what is needed to store cookies or open tabs. Regarding HDD, I have only SSD. –  marcin Mar 11 '12 at 13:52
    
Is it a laptop or a similar device? Using a pure SSD setup isn't very efficient, so if you could help it I'd advise getting an HDD to store volatile files. I suppose it's possible that there's something wrong with your FF, but I doubt it would be easy to diagnose with the data we have. Have you tried backing up your FF profile and doing a clean install? –  kotekzot Mar 11 '12 at 13:59
2  
I don't see how not using SSD is supposed to help. If the file is accessed frequently it's perfectly fine and even recommended to keep it on SSD. I can understand storing movies/photos on HDD since the time/speed isn't that important here but since the files are accessed frequently it should be stored where it is. If you would put this in your answer I would -1 it. The answer itself is good, just the comment not really something to relay on. –  MadBoy Mar 11 '12 at 16:51
    
@MadBoy It shouldn't matter much for overall speed if these files are located on an HDD, but it will do wonders for SSD longevity. –  kotekzot Mar 11 '12 at 16:55
    
kotekzot - "it will do wonders for SSD longevity" - any resource to support your claim? I would say that storing sessions on SSD is much better because it is fast and doesn't make neverending noise / is not annoying. –  Tomas Jul 23 '13 at 14:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.