Closed Bug 920606 Opened 8 years ago Closed 7 years ago

HTTP cache v2: add telemetry for the intermediate memory cache purging

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: mayhemer, Assigned: mayhemer)

References

(Blocks 1 open bug)

Details

(Whiteboard: [cache2])

Attachments

(2 files, 2 obsolete files)

- how often we throw away something that we reload again and after how long
- how long it takes until we start throwing stuff away (i.e. fill the pool)
- lifetime of an entry in the pool
Blocks: cache2enable
No longer blocks: 913608
[ No longer blocks enabling cache2, expected to be fixed after cache2 is on ]
No longer blocks: cache2enable
Blocks: cache2enable
No longer blocks: cache2enable
Blocks: cache2enable
No longer blocks: cache2enable
Let's make the list more useful:

- time between purge and next load
- how often we purge/reload
- how many times an entry has been used before it's being purged
Attached patch v1pre (obsolete) — Splinter Review
So far backing up, I'll go though the patch once more and probably ask for review.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attached patch v1 (obsolete) — Splinter Review
- 3 probes: 
  - time an entry is alive (in the pool, max 2h), 
  - count of usage (equal to frecency update count that is equal to asyncOpen call count), 
  - time between purge and subsequent reload of the same entry again, 15 minutes max
- service keeps a hashtable to track the reload time (urls could be large, maybe we should somehow compress them?)
- registration and deregistration are used to track addition and removal of entries, this way it's ensured that a new same-URL entry cannot be first added and the previous one only after that removed
Attachment #8446811 - Attachment is obsolete: true
Attachment #8449685 - Flags: review?(michal.novotny)
Comment on attachment 8449685 [details] [diff] [review]
v1

Review of attachment 8449685 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/cache2/CacheStorageService.cpp
@@ +1795,5 @@
> +  if (!TelemetryEntryKey(entry, key))
> +    return;
> +
> +  TimeStamp now = TimeStamp::NowLoRes();
> +  mPurgeTimeStamps.Enumerate(PrunePurgeTimeStamps, &now);

I think we should somehow limit the call to PrunePurgeTimeStamps. It isn't necessary to do it every time we register/unregister an entry.
Attachment #8449685 - Flags: review?(michal.novotny) → feedback+
Attached patch idiff v1 -> v1.1Splinter Review
Good catch.  Pruning limited to happen just once in a minute.
Attachment #8449685 - Attachment is obsolete: true
Attachment #8452047 - Flags: review?(michal.novotny)
Attached patch v1.1Splinter Review
Attachment #8452047 - Flags: review?(michal.novotny) → review+
https://hg.mozilla.org/mozilla-central/rev/5f466ad69b21
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Depends on: 1441726
You need to log in before you can comment on or make changes to this bug.