Closed Bug 1938792 Opened 2 months ago Closed 2 months ago

Cache data suddenly drops from disk

Categories

(Core :: Networking: Cache, defect)

Firefox 133
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: td44.ringo.apple, Unassigned)

Details

(Whiteboard: [necko-triaged])

Attachments

(7 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0

Steps to reproduce:

I use cache disk with browser.cache.disk.smart_size.enabled = false and browser.cache.disk.capacity = 2,000,000 from before.

In addition to this, change default value of network.buffer.cache.count or network.buffer.cache.size count, cause drops cache data from disk at a certain timing.

Actual results:

"Storage in use: " grows up to a certain level, but suddenly drops cache data to bellow 30MB.

Expected results:

browser.cache.disk.smart_size.enabled = false and network.buffer.cache.count or network.buffer.cache.size is not default value, keep cache data to "Maximum storage size: ".

Group: firefox-core-security
Component: Untriaged → Networking: Cache
Product: Firefox → Core

Thank you for reporting this bug.
Please note that the prefs network.buffer.cache.count and network.buffer.cache.size has nothing to do with cache configuration.
Kindly check the comment here.

If you dont alter network.buffer.cache.count and network.buffer.cache.size prefs do you see the problem?

Flags: needinfo?(td44.ringo.apple)
Whiteboard: [necko-triaged][necko-priority-review]
Whiteboard: [necko-triaged][necko-priority-review] → [necko-triaged]

Thank you for your support.

Please note that the prefs network.buffer.cache.count and network.buffer.cache.size has nothing to do with cache configuration.

Yes, I think so too. But for some reason it happenes.

By the way, the source code you suggest me seems different from current default value.
network.buffer.cache.size = 32768
#208 uint32_t nsIOService::gDefaultSegmentSize = 4096;

If you dont alter network.buffer.cache.count and network.buffer.cache.size prefs do you see the problem?

I noticed that these settings cause same probrem.
browser.cache.disk.smart_size.enabled = false
browser.cache.disk.metadata_memory_limit = 8192
network.buffer.cache.count = 24(default value)
network.buffer.cache.size = 32768(default value)

Flags: needinfo?(td44.ringo.apple)

It reproduced by these settings.
browser.cache.disk.smart_size.enabled = true(default value)
browser.cache.disk.metadata_memory_limit = 250(default value)
network.buffer.cache.count = 24(default value)
network.buffer.cache.size = 32768(default value)

I added two screenshots.

  • 21-02-17 grow cahce data to disk
  • 22-05-46 drop cache data from disk

(In reply to Grey Orion from comment #5)

It reproduced by these settings.
browser.cache.disk.smart_size.enabled = true(default value)
browser.cache.disk.metadata_memory_limit = 250(default value)
network.buffer.cache.count = 24(default value)
network.buffer.cache.size = 32768(default value)

I added two screenshots.

  • 21-02-17 grow cahce data to disk
  • 22-05-46 drop cache data from disk

Sorry that I still don't understand how to reproduce this issue.
Could you explain the steps in detail again?
Thanks.

Flags: needinfo?(td44.ringo.apple)

Result of "about:cache?storage=disk" at 2024-12-31 06:21:01

  • Number of entries: 10410
  • Storage in use: 1252868 KiB

About an hour has passed since Firefox was started.

Flags: needinfo?(td44.ringo.apple)

Result of "about:cache?storage=disk" at 2024-12-31 08:05:56.

  • Number of entries: 4046
  • Storage in use: 419282 KiB

Firefox has been running for about 2 hours without stopping.

I attaced two files. Those are result of "about:cache?storage=disk".

I'm not doing anything special, I just occasionally check about:cache without stopping Firefox.

(Points of concern #1)
line 904 of Network Cache Storage Information1.html
Data size: 16413449 bytes
expires: 2024-12-31 08:09:11

This cache data is kept to line 33575 of Network Cache Storage Information2.html

(Points of concern #2)
line 45845 of Network Cache Storage Information1.html
Data size: 1890 bytes
expires: 2024-12-31 08:11:53

This cache data seems dropped from cache.

It seems don't related to any options. I supporsed browser.cache.frecency_half_life_hours is handling expiration of cache data, but some cache data seems to have been deleted before the expiry date.

Please note that Firefox is designed to respect the cache-control headers, including the age directive, to manage cache entries.
Based on the information provided, it's difficult to determine whether Firefox is behaving incorrectly regarding cache management. Therefore, I will close this bug as incomplete for now. Please feel free to reopen it with more details if you observe that Firefox's behavior does not align with the cache specifications.

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Resolution: --- → INCOMPLETE

I tried Firefox ESR 128.6.0.

The behaivier of cache data control seems different clearly.

Below is a comparison of cache usage over time.
(I added three screenshot files, when I use Firefox ESR)

Firefox ESR 128.6.0
2025-01-10 07:38:30 1606866 KiB
2025-01-11 08:21:05 1999992 KiB
2025-01-11 19:38:41 1999760 KiB

Firefox 133.0.3
2024-12-25 21:02:17 978059 KiB
2024-12-25 22:05:46 6886 KiB

Looking at these results, it seems that the cache control logic has changed since Firefox 129 or later. Is this correct?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: