Open Bug 1712457 Opened 3 years ago Updated 3 years ago

Firefox on macOS constantly writes to disk even with no page opened and cache disabled

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P3)

Firefox 88
defect

Tracking

()

UNCONFIRMED

People

(Reporter: m.hello, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15

Steps to reproduce:

Disable disk caching "browser.cache.disk.enable" and also disable session store "browser.sessionstore.enabled ".

Open Firefox. Do not open any tab.
Open Activity Monitor and observe "Disk Written" for Firefox process in the "Disk" tab

Actual results:

Firefox constantly writes to disk, even without any tab opened. Initially it writes 10Mb the disk and additional 100kb every 15 seconds or so. With tab opened this gets even worse and more bytes are written. The worse is youtube for some reason. When youtube video is played in Safari there is no disk activity, but Firefox writes constantly to disk.

Expected results:

No writes when there is no tab open and also no writes when tab is opened but there is not activity,

The Bugbug bot thinks this bug should belong to the 'Core::Networking: Cache' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Networking: Cache
Product: Firefox → Core

I think the disk IO is not caused by http cache.
Reporter, could you open about:cache?storage=disk and see if there is any cache entry related to youtube? Thanks.

Flags: needinfo?(m.hello)

There are youtube entries there. Summary:

memory
Number of entries: 178
Maximum storage size: 32768 KiB
Storage in use: 27267 KiB
Storage disk location: none, only stored in memory
List Cache Entries

disk
Number of entries: 178
Maximum storage size: 32768 KiB
Storage in use: 27267 KiB
Storage disk location: none, only stored in memory
List Cache Entries

Also I created new profile stored in the ramdisk. And I see some files in /cache2/entries directory. At least one is font file. Not sure why disk folder even exists when caching is disabled.

Flags: needinfo?(m.hello)

(In reply to m.hello from comment #3)

There are youtube entries there. Summary:

memory
Number of entries: 178
Maximum storage size: 32768 KiB
Storage in use: 27267 KiB
Storage disk location: none, only stored in memory
List Cache Entries

disk
Number of entries: 178
Maximum storage size: 32768 KiB
Storage in use: 27267 KiB
Storage disk location: none, only stored in memory
List Cache Entries

Also I created new profile stored in the ramdisk. And I see some files in /cache2/entries directory. At least one is font file. Not sure why disk folder even exists when caching is disabled.

I think those entries were created before you disabled browser.cache.disk.enable.
I'd like to change the component to localStorage, since I think the disk activity with youtube page is not caused by http cache.

Component: Networking: Cache → Storage: localStorage & sessionStorage

You'right about those cache2/entries. Cleared cache and history and any new one were not created.

Anyway the problem is this constant writes, when disk caching and sessionstore should be disabled. And I don't have any extensions installed nor enabled.

I remember once I've seen 40 gigabytes written in about a week or so, in contrast with Safari, which doesn't write anything if you only watch youtube and don't open new sites. Sometimes right after opening Firefox I see 140 Mb written without any tab opened. 

I've recorded video, where it can be clearly seen that Firefox writes at least 100 kb every 10 seconds or so (but some times it's megabytes).

https://youtu.be/4NRuLwviBY4

Hi Jan, can you please help me to triage this one? Thanks!

Flags: needinfo?(jvarga)
Severity: -- → S4
Priority: -- → P3
Flags: needinfo?(jvarga)
You need to log in before you can comment on or make changes to this bug.