Bug 259371 - Use mapped files in CacheStorageDiskStore
Summary: Use mapped files in CacheStorageDiskStore
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Website Storage (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ben Nham
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-07-20 15:13 PDT by Ben Nham
Modified: 2023-07-20 21:48 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Nham 2023-07-20 15:13:33 PDT
Currently CacheStorageDiskStore reads entire files into dirty memory. When many DOMCache operations in flight, this can lead to an temporary explosion in NetworkProcess memory usage (in the gigabytes of footprint).

To fix this issue, we should explore using read-only mapped files in CacheStorageDiskStore instead, as we do with the regular network cache. This trades dirty footprint for higher vnode usage. But presumably that's okay as the number of vnodes that would be consumed by DOMCache should be much lower than the number of vnodes used by NetworkCache.
Comment 1 Radar WebKit Bug Importer 2023-07-20 15:13:56 PDT
<rdar://problem/112623177>
Comment 2 Ben Nham 2023-07-20 15:24:28 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15957
Comment 3 EWS 2023-07-20 21:48:32 PDT
Committed 266199@main (470bd54de983): <https://commits.webkit.org/266199@main>

Reviewed commits have been landed. Closing PR #15957 and removing active labels.