Bug 232928

Summary: NetWorkCache size more than 1GB
Product: WebKit Reporter: pi He <18846049301>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, kkinnunen, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: iPhone / iPad   
OS: Unspecified   

Description pi He 2021-11-10 01:13:30 PST
source code In WebKit/NetworkProcess/NetworkCacheStorage.cpp Line 1142:

        if (approximateSize() > m_capacity)
              shrink();

and m_capacity MAX_SIZE is 1 * GB, but, my log shows that the size of this folder is nearly 2GB, I want to know the reason. THANKS!
Comment 1 pi He 2021-11-10 01:33:55 PST
sorry, my log shows that the size of this folder is nearly 1266MB, not 2GB
Comment 2 Antti Koivisto 2021-11-10 09:47:30 PST
The capacity computation is not exact, 1.2GB is not too far. Also the cache uses hard links and depending on how you measure the size it is easy to double count entries.
Comment 3 pi He 2021-11-10 23:05:17 PST
(In reply to Antti Koivisto from comment #2)
> The capacity computation is not exact, 1.2GB is not too far. Also the cache
> uses hard links and depending on how you measure the size it is easy to
> double count entries.

Thanks!There are two pieces of abnormal data in my logs. They show that the size of the 'Version 16/Records' folder is 2.5GB and 4.2GB respectively, while the size of their corresponding fields folder 'Version 16/Blods' is 4.6GB and 8.6GB respectively. These data are far greater than 1GB. I'm not sure if this is real data or dirty data. Do you know why? THANKS!
Comment 4 Radar WebKit Bug Importer 2021-11-17 01:14:30 PST
<rdar://problem/85494718>