Linux: firefox [Cache2 I/O] intensive disk activity

User Help for Mozilla Firefox
Post Reply
postcd
Posts: 54
Joined: April 5th, 2015, 6:24 am

Linux: firefox [Cache2 I/O] intensive disk activity

Post by postcd »

Hello,

i see the process "firefox [Cache2 I/O]" has 98% disk utilization already like 10 minutes. (around 1MB/s, already utilized like 500MB and growing - showing by Linux app: iotop -ao) I have classic HDD kind of drive. Recently i tried to set larger disk cache, because i am on slow internet and want to make FF more utilize HDD rather than re-downloading content.

Here modified values related to cache:
browser.cache.disk.capacity;204857600 (significantly increased)
browser.cache.disk.filesystem_reported;1
browser.cache.disk.hashstats_reported;1
browser.cache.disk.max_entry_size;700100 (significantly increased)
browser.cache.disk.smart_size.enabled;false
browser.cache.disk.smart_size.first_run;false
browser.cache.disk.smart_size.use_old_max;false
browser.cache.frecency_experiment;2

about:cache page is infinitely loading and showing only:
memory
Number of entries: 1
Maximum storage size: 23552 KiB
Storage in use: 9 KiB
Storage disk location: none, only stored in memory
List Cache Entries

(no disk cache..)

I am on Ubuntu 16.04 latest + latest FF stable

After like 10 minutes, HDD utilization stopped and about:cache page fully loaded showing:

disk
Number of entries: 38064
Maximum storage size: 3531008 KiB
Storage in use: 1901372 KiB
Storage disk location: /home/lubuntu/.cache/mozilla/firefox/a21btsjl.default/cache2
List Cache Entries

appcache
Number of entries: 0
Maximum storage size: 512000 KiB
Storage in use: 0 KiB
Storage disk location: /home/lubuntu/.cache/mozilla/firefox/a21btsjl.default/OfflineCache

The FF was started about hard reset of the computer (because of extreme HDD utilization).
Last edited by DanRaisch on September 11th, 2018, 2:25 pm, edited 1 time in total.
Reason: (Linux) added to subject line.
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: Linux: firefox [Cache2 I/O] intensive disk activity

Post by Grumpus »

Under the folder in your home directory using Nautilus.
Look at /Home/yournameforit/cache. (cache is a hidden folder)
There should be two directories if Firefox is operating: Doomed and Entries.
Did you install Firefox using the repository or did you do some other kind of install?
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
postcd
Posts: 54
Joined: April 5th, 2015, 6:24 am

Re: Linux: firefox [Cache2 I/O] intensive disk activity

Post by postcd »

@Grumpus i think i had Firefox preinstalled on my Ubuntu (if not i installed it using apt-get or using firefox website somehow). I update it using apt-get. Original repository.
Yes i found that directories in ~/.cache/mozilla/firefox/*.default/cache2:
drwxr-xr-x 2 me me 20K zář 12 15:57 doomed
drwx------ 2 me me 11M zář 12 15:57 entries
... ?
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: Linux: firefox [Cache2 I/O] intensive disk activity

Post by Grumpus »

You need to be certain as the Firefox from Mozilla page is different than the one for Ubuntu.
Things like internal system connections, etc. Also locations of some folder different.
When you close Firefox are you saving or clearing any of the History.
On the menu bar (if it doesn't show right click on one of the bars and hit Customize and at the bottom hit Toolbars/Menu Bar) Hit clear history and see what is checked. You don't have to clear anything.
It may be you are keeping too much history.
You could also look at your /edit/preferences/Privacy and security - Set History to "Use custom settings" - and see what is checked and also look at Settings.
The Settings button should be the same as the Clear History - read all the options .
Also look at all the Exceptions button on the Privacy & Security page to make sure nothing is being placed on yor system from sites you don't wish.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
postcd
Posts: 54
Joined: April 5th, 2015, 6:24 am

Re: Linux: firefox [Cache2 I/O] intensive disk activity

Post by postcd »

Grumpus wrote:When you close Firefox are you saving or clearing any of the History.
On the menu bar (if it doesn't show right click on one of the bars and hit Customize and at the bottom hit Toolbars/Menu Bar) Hit clear history and see what is checked. You don't have to clear anything.
It may be you are keeping too much history.
I am not clearing history because i want it for convenience/searching, i see my oldest history entry is like 1 year old and i am active internet user. I wish i do not need to delete history and i think FF should be able to cope with it.
Grumpus wrote:You could also look at your /edit/preferences/Privacy and security - Set History to "Use custom settings" - and see what is checked and also look at Settings.
I have set FF will "Remember history", the custom settings has also remembering and not cleaning set.
Grumpus wrote:look at all the Exceptions button on the Privacy & Security page to make sure nothing is being placed on your system from sites you don't wish.
I see i am keeping data, cookies until it expire, not until browser closed. I want it that way, prefer not need to relogin to sites.

When i tried to list the cache2/entries directory on my Linux PC (ls -lt|tail), then the HDD become maxed out for like 15 minutes, CPU is like 70%. and then i seen oldest entries are from March this year.

I really prefer to save data, i have big hdd and slow internet and i believe hdd storage is more efficient than re-downloading. I will see if the "issue" will repeat.. Thank you for your previous feedback!
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: Linux: firefox [Cache2 I/O] intensive disk activity

Post by Grumpus »

One of the things you might consider is losing anything you don't need or trying to refresh the data.
I find bookmarks from time to time have changed and it takes a search to find the new sites.
This is particularly important now with so many sites changing from http top https.

It might be simpler to use nautilus instead of using a terminal, better clarity and you can see ownerships.
Since the repo's Firefox install places the cache2 under .cache/mozilla/yourprofileID/ in the home directory you should be able to edit easily and it may allow more info.
If you set Nautilus preferences to show all the columns you may also be able to check ownerships and permissions.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
postcd
Posts: 54
Joined: April 5th, 2015, 6:24 am

Re: Linux: firefox [Cache2 I/O] intensive disk activity

Post by postcd »

I tried to clear all "Cache" and "Offline Website Data", closed FF and started, yet disk was very bussy (maybe because i was tried to load about:cache page and it calculalted long time data for disk cache:
Number of entries: 47424
Maximum storage size: 358400 KiB
Storage in use: 2152477 KiB
Unsure why it was there when i tried to delete it, so i reseted to default some entries in about:config (search phrase: disk)
Then all was good on next FF start, disk cache cleared, no disk activity.

So History is not issue in excessive disk activity apparently. But issue may be disk cache, i will see if it happen again.. (i changed/increased back the values for the disk cache)
Post Reply