Browser caches are typically designed to maximize hit rates---if all other factors are held equal, then the highest hit rate will result in the highest performance. However, if the performance of the underlying cache storage (i.e. the file system) varies with differing workloads, then these other factors may in fact not be equal when comparing different cache strategies.
Mobile systems such as smart phones are typically equipped with low-speed flash storage, and suffer severe degradation in file system performance under sufficiently random write workloads. A cache implementation which performs random writes will thus spend more time reading and writing its cache, possibly resulting in lower overall system performance than a lower-hit-rate implementation which achieves higher storage performance.
We present a log-structured browser cache, generating almost purely sequential writes, and in which cleaning is efficiently performed by cache eviction. An implementation of this cache for the Chromium browser on Android was developed; using captured user browsing traces we test the log-structured cache and compare its performance to the existing Chromium implementation.
We achieve a ten-fold performance improvement in basic cache operations (as measured on a Nexus 7 tablet), while in the worst case increasing miss rate by less than 3% (from 65% to 68%). For network bandwidths of 1Mb/s or higher the increased cache performance more than makes up for the decrease in hit rate; the effect is more pronounced when examining 95th percentile delays.
[1]
Cristian Ungureanu,et al.
Revisiting storage for smartphones
,
2012,
TOS.
[2]
Mendel Rosenblum,et al.
The design and implementation of a log-structured file system
,
1991,
SOSP '91.
[3]
Predrag R. Jelenkovic,et al.
Optimizing LRU Caching for Variable Document Sizes
,
2004,
Combinatorics, Probability and Computing.
[4]
Larry L. Peterson,et al.
HashCache: Cache Storage for the Next Billion
,
2009,
NSDI.
[5]
László Böszörményi,et al.
A survey of Web cache replacement strategies
,
2003,
CSUR.
[6]
Carl Staelin,et al.
An Implementation of a Log-Structured File System for UNIX
,
1993,
USENIX Winter.
[7]
Peter Desnoyers,et al.
Performance models of flash-based solid-state drives for real workloads
,
2011,
2011 IEEE 27th Symposium on Mass Storage Systems and Technologies (MSST).
[8]
Zhen Wang,et al.
How effective is mobile browser cache?
,
2011,
S3 '11.
[9]
Feng Qian,et al.
Web caching on smartphones: ideal vs. reality
,
2012,
MobiSys '12.
[10]
Sang Lyul Min,et al.
A space-efficient flash translation layer for CompactFlash systems
,
2002,
IEEE Trans. Consumer Electron..
[11]
Jia Wang,et al.
A survey of web caching schemes for the Internet
,
1999,
CCRV.