Open Bug 708436 Opened 10 years ago Updated 4 years ago

Telemetry to get "working set" for HTTP cache

Categories

(Core :: Networking: Cache, defect, P5)

x86_64
Linux
defect

Tracking

()

People

(Reporter: jduell.mcbugs, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-would-take])

The idea is to get telemetry on what the average working set size for the HTTP cache is, for some definition(s) of "working set".   For instance, if we define working set as "items read from cache within the last week", we'd get some telemetry to indicate that for user N that took up 120 MB of cache (everything else in their cache has been accessed less recently than a week).  The numbers will obviously vary widely between users, but getting stats on this would be useful.  If 95% of users aren't using more than 500 MB of cache in their working set, that's a good argument for not gobbling up 1 GB.  

Ideally we could get stats for several different working sets (last 24 hours, last week: or perhaps some metric based on browser uptime, i.e. "accessed within last 5 hours browser has been running."  I'm not sure how to get stats on uptime.

Logically, we have the information we need here (it's just cache items sorted by LRU), but I'm not so confident we have an efficient way to get it.  I'm hoping that Michal or Bjarne or Nick have some idea of when we could gather this info without incurrent too much cost.

One idea is that we could get a statistical sample for this info from accumulating LRU data as we scan cache items when we're doing evictions: that might be a good way to free-ride on existing computation (though it would mean we only get data from users who have full caches.  That's probably fine).  I'm assuming that when we scan for evictions, we're getting random sample of items in the cache (i.e. they're not already sorted by LRU in any way)--true?
Whiteboard: [necko-would-take]
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.