Firefox writes a lot of data on SSD. How to fix it?



    Solid-state drives have finally become available for most laptop and PC users. They have many advantages, the main of which is high performance, but there are also disadvantages. The disadvantages include less durability compared to HDD (recording resource). True, modern solid-state drives usually have a longer service life than obsolescence.

    The full potential of the hard core opens as a system disk. In this configuration, the operating system and applications installed on the system disk read and write data to the solid-state drive. As it turned out , Mozilla Firefox browser writes a relatively large amount of data every day, which kills the SSD resource.

    Most PC users know that browsers write a lot of data to a hard disk or HDD. But how much? Sergei Bobik, who installed the free version of SSDLife on his computer, thought about this. This software allows you to assess the state of the SSD and shows the approximate lifetime of the drive.

    For two days, Sergei did not work with anything except the browser and email. And I was very surprised when I learned that 12 GB of data was recorded on a solid-state drive on one of these two days. Since he didn’t download any large files, and the working sites could not give a cache of such size, it was decided to find the cause of the incident.

    Sergey Bobik monitored the statistics provided by the application for two weeks. As it turned out, even when the computer was not working (but was not turned off), large amounts of data up to 10 GB were loaded onto the solid-state drive.



    The main culprit of the incident was the browser Firefox. He downloaded from 300 KB to 2 MB every second. Record was kept in a file called recovery.js. As it turned out, this is a backup of the Firefox session. It is used if a browser or an operating system crashes. This is a useful but resource-intensive feature. And if we take into account the fact that SSD has a limited resource, then here you need to decide for yourself what is more useful - a working disk or the restoration of the current browser session after its fall.

    Sergey writes that the problem is not only in one file. In order to study the problem more fully, he performed several additional actions:
    1. Set browser.sessionstore.interval to 15000 ms and close all open browser tabs;
    2. Opened a single tab with Google.com, waited a couple of minutes and closed it;
    3. I opened the browser again and checked the size of the recovery.js. Its size has decreased to 5 KB instead of 900 KB;
    4. Opened several reviews of different devices in two different windows. Looked for reviews and opened search results in new tabs;
    5. Opened the third browser window, opened several sites in the tabs of this window;
    6. I launched Process Monitor and started tracking recovery.js files and cookies *.



    7. Removed event logging in “File-> Capture Events”. Existing logs were also cleaned;
    8. Again activated the event logging in “File-> Capture Events”. Left the above three browser windows for 45 minutes. At this time, Sergey turned on Chrome for his own needs;
    9. I looked through browser statistics in Tools-> File Summary.

    As it turned out, during this time, Firefox has written 1.1 GB of data to disk. The main volume is cookies *.



    At the same time, the file, after all the manipulations carried out, grew only to 1.3 MB.

    Sergey returned to Firefox and in one of the windows opened a mailbox in outlook.com. Cleared all event logs in Process Monitor and restarted monitoring. This time, he left Firefox idle for just 10 minutes. After that, the recovery.js size increased to 1.5 MB. Cookies again took up many hundreds of megabytes on the SSD.



    According to the author of the work, the browser can write a bunch of data to the recovery.js file, cookies, or simultaneously record information both there and there. If you take the constant 1.1 GB of recorded Firefox data, then in a working day you can expect to write information of 35 GB, if you do not turn off the system. After the measurements, it turned out that the record in the file recovery.js is kept at a speed of 2 MB / s.

    What can be done?


    If you have a regular hard drive, then you can not worry too much. But if SSD is installed as a system, it is worthwhile to perform a series of actions that can stop the flow of data generated by Firefox browser.

    The main action is to configure one of the Firefox options, browser.sessionstore.interval. This option is available when the command is executed "about:config"in the address bar. By default it is 15 seconds. The time interval can be extended up to 30 minutes. In this case, the amount of data generated by Firefox per day is reduced from 10-15 GB to 2 GB. It is still a lot, but several times less than before setting up the browser.

    The resource of some consumer SSDs is only 20 GB of recorded data per day. Firefox can use half of this resource. If your browser constantly has a lot of windows open, and you work with “heavy” sites, then you can expect an even larger amount of recorded Firefox data than specified above.

    To increase the value of the browser.sessionstore.interval parameter is worth it even if you have a regular HDD as a system disk. The fact is that the permanent recording on the disk reduces its performance, and the PC can become a little faster if you remove the permanent data recording by the browser.

    Firefox developers saythat they know about the problem, but so far it is not possible to solve it, because you will have to completely change the principle of the Session Restore function.

    Also popular now: