Fact-checked by Grok 2 weeks ago

Page cache

A page cache is a kernel-level caching mechanism in operating systems that stores pages of data from files or block devices in main to accelerate subsequent read and write operations by reducing the need for direct disk I/O. It acts as a buffer between the slower persistent storage and faster RAM, holding file contents in fixed-size pages (typically 4 KB) that can be quickly accessed or modified. This caching is essential for modern file systems, as it enables efficient sharing of data across processes and supports features like memory-mapped files. In Unix-like systems such as , the page cache is implemented as an XArray (a type of ) of pages backed by regular files, block devices, or swap space, managed through the (VFS) layer. Pages are added to the cache on demand during file reads or via read-ahead mechanisms for , and they are organized using inodes and offsets for rapid lookup. employs least-recently-used (LRU) lists to reclaim pages when is scarce, distinguishing between active and inactive lists to prioritize frequently accessed data while allowing clean pages to be discarded without writing back to disk. Writes typically use a write-back policy, marking pages as "dirty" for deferred flushing by threads like the page-out daemon (kswapd), balancing performance with . Windows implements a similar system file cache, managed by the cache manager, which buffers file data in system cache memory and supports lazy writing to delay disk commits until necessary. This cache handles both read caching (fetching from memory if available) and write buffering, with a lazy writer process scanning and flushing portions of dirty data every second to prevent excessive memory use. Developers can via flags like FILE_FLAG_NO_BUFFERING for direct I/O or enforce immediate writes with FILE_FLAG_WRITE_THROUGH, though the default enables caching for optimal throughput. Across operating systems, the page cache significantly enhances I/O-bound workloads, such as database operations or serving, by leveraging temporal and spatial locality in file access patterns.

Fundamentals

Definition and Purpose

A page cache is a dedicated region of physical memory () that temporarily stores copies of recently accessed pages from secondary storage devices, where each page is a fixed-size of , typically 4 , to minimize the incurred by disk (I/O) operations. This caching mechanism operates transparently within operating systems that employ paging-based management, holding file , , and other disk-backed content in a unified structure for efficient retrieval. The primary purpose of the page cache is to address the vast disparity in access speeds between and slower storage media like hard disk drives (HDDs) or solid-state drives (SSDs), enabling applications to interact with persistent as if it resided entirely in main . By keeping frequently used pages in , the page cache eliminates repeated trips to storage for subsequent accesses, thereby improving overall system responsiveness and allowing systems to treat disk contents more like . The concept of the page cache originated in the alongside early implementations, such as in the system, where paging allowed direct mapping of file segments into for on-demand loading from disk. It was further formalized in the 1970s within Unix kernels, which introduced paging mechanisms to unify file caching with . Among its key benefits, the page cache dramatically lowers average access latencies—from milliseconds for disk seeks to around 100 nanoseconds for RAM reads—while avoiding the inefficiency of caching an entire filesystem in .

Relation to Virtual Memory

The page cache operates as an integral component of the subsystem in modern operating systems, such as , where it serves to cache data from disk-backed files in physical memory to accelerate access. Disk pages are mapped to virtual addresses through page tables maintained by the (MMU), enabling the operating system to treat cached data transparently as part of a process's without requiring explicit application awareness. This integration allows the page cache to leverage the same hardware mechanisms used for all , including address translation and protection, ensuring that file data appears contiguous and directly accessible in . Demand paging enhances this synergy by loading pages into the cache only upon access misses, triggered by page faults that prompt the kernel to fetch data from the backing store and update the relevant page table entries (PTEs). For instance, when a process reads from a file, a major page fault may occur if the page is not in memory, leading to disk I/O and insertion into the page cache; subsequent accesses to the same page often result in minor page faults, which resolve quickly by mapping the already-resident physical page to the virtual address without disk involvement. This mechanism unifies file-backed caching with the broader virtual memory framework, where the kernel's page allocator manages physical frames for both cached pages and other memory types. Unlike CPU caches such as L1 or , which store small blocks of recently accessed to bridge the processor-memory speed gap and operate at the level for transient instructions and , the page cache handles larger, persistent blocks (typically 4 pages) sourced from secondary like disks or SSDs. It focuses on reducing I/O for operations rather than CPU cycle efficiency, with pages tracked for cleanliness to optimize write-back policies. This distinction ensures the page cache complements rather than overlaps with lower-level caches in the . In a 's , cached pages manifest as either file-backed memory—such as those loaded via memory mapping () for executables or data files—or integrated alongside anonymous memory (e.g., or allocations), all unified under the MMU's address translation. For example, when a maps a , its pages are added to the page cache and linked to the 's page tables, allowing multiple es to share the same physical pages efficiently while maintaining isolation through . This unified view enables the operating system to reclaim or evict pages from the cache dynamically under memory pressure, treating them similarly to other components.

Mechanisms

Cache Population and Lookup

The page cache lookup process begins when an application requests data from a file, prompting the operating system to search for the corresponding page in memory. In , this search utilizes an XArray data structure (a reimplementation of the ) associated with each file's inode, indexed by the file offset (page index) to enable efficient retrieval. The XArray allows for lookups in O(log n) , where n is the number of pages in the cache for that file, outperforming earlier approaches by providing better scalability for large files. Upon a cache miss—when the requested is not found in the XArray—the operating system initiates population by reading the data from disk. This involves allocating a physical using functions like page_cache_alloc_cold and submitting a block I/O request via bio structures, which encapsulate the disk read operation. The retrieved is then inserted into the XArray at the appropriate offset using add_to_page_cache_lru, marking it as part of the least recently used (LRU) list for future management. This process can occur synchronously for blocking reads, ensuring the application waits for completion, or asynchronously for non-blocking operations to improve responsiveness. Cache hits, in contrast, allow the kernel to return the page directly from RAM without disk access, significantly reducing latency. The find_get_page function performs the lookup and increments a reference count on the page if found, enabling immediate data access. For misses, the system falls back to the population mechanism described, integrating with the virtual memory subsystem to map the page into the process's address space. To maintain consistency, the page cache synchronizes with filesystem during lookups and accesses. On a , the updates the file's access time (atime) in the inode , reflecting the recent usage without requiring disk I/O unless explicitly needed. This ensures that filesystem operations, such as listings, remain accurate while minimizing overhead through delayed or relative atime updates in modern implementations.

Page Replacement Policies

Page replacement policies are algorithms employed by operating systems to select which pages in the page cache to evict when the cache reaches capacity and a new page must be brought in from , with the primary goal of minimizing page faults and associated I/O overhead. These policies leverage the principle of , where recently accessed pages are likely to be accessed again soon, to retain useful data in . Evaluation of such policies typically focuses on metrics like page traffic—the rate at which pages are swapped in and out—as lower traffic indicates better performance in reducing interruptions to program execution. A theoretical ideal for page replacement is Belady's optimal algorithm, an offline policy that evicts the page whose next access will occur farthest in the future, achieving the minimum possible number of page faults for a given reference string. However, since future access patterns are unknown in real systems, practical policies approximate this optimum using historical access information. The Least Recently Used (LRU) policy is a widely adopted approximation, which evicts the page that has not been accessed for the longest time, assuming temporal locality. LRU can be implemented using a to track recency or counters to accesses, though exact implementations incur significant overhead from maintaining per-page . To reduce the complexity of true LRU, the Clock algorithm provides an efficient approximation by organizing pages in a (or list) and using a "hand" pointer to sweep through them. Each page has a bit set by the on access; when eviction is needed, the algorithm advances the hand, clearing the bit if set (giving the page a "second chance" by deferring eviction) and evicting the page only if the bit is already clear. This Second Chance variant, essentially a modified with bits, balances simplicity and effectiveness, performing nearly as well as LRU for many workloads while avoiding full recency tracking. Modern operating systems often employ adaptive variants of these policies. For instance, as of 6.1, the kernel uses the Multi-Gen LRU (MGLRU) framework, which extends the traditional approximated LRU with multiple generations of lists to better protect active working sets and adapt to diverse workloads under memory pressure. Pages are aged into older generations based on access patterns and reclaimed preferentially from the oldest generation, with hardware reference bits aiding promotion to younger generations for a second-chance-like mechanism; this approach, building on per-zone lists since kernel 2.6, improves scalability and performance. Despite their strengths, these policies involve trade-offs. LRU excels with sequential or locality-strong access patterns but can underperform on random references, where it may evict frequently reused pages, and its metadata maintenance adds CPU and memory overhead. The Clock and Second Chance algorithms mitigate LRU's costs with lower precision, potentially leading to suboptimal evictions in multiprogrammed environments, though they scale better for large caches by approximating recency through bit sampling rather than exact timestamps. Overall, no policy perfectly matches Belady's optimum online, but approximations like those in achieve near-optimal fault rates for typical applications while prioritizing implementation efficiency.

Write Handling

Read-Only Caching

In read-only caching, the handles data retrieval from files by first consulting the page to determine if the requested pages are already resident in memory. For both sequential and random read operations, if a page is absent, the populates the by issuing a read request to the underlying storage device, loading the page without marking it as modified or dirty. This process ensures efficient access to unmodified data, as subsequent reads to the same page can be served directly from memory, bypassing disk I/O. To further optimize performance in sequential read patterns common in many applications, the implements readahead, a prefetching mechanism that asynchronously loads anticipated future pages into the based on access history, such as doubling the readahead window size up to a configurable maximum (typically 128 KB) upon detecting sequential behavior. The for read-only caching maintains synchronization between the page cache and the persistent storage by invalidating stale entries when underlying changes occur. In the , structural modifications to a —such as or resizing—trigger the invocation of functions like invalidate_inode_pages2, which removes or unmaps affected pages from the to prevent serving outdated data on future reads. Standard content updates via writes instead modify pages in the and mark them as dirty. This invalidation is automatically handled during operations, ensuring that the cache reflects the disk's current state without requiring explicit user intervention, though mechanisms like file leases or modification time checks can supplement this in networked file systems. Read-only caching proves especially effective in scenarios involving immutable or infrequently modified data, such as the loading of executable binaries and shared libraries, where code segments are repeatedly accessed across processes without alteration. In these cases, the kernel maps file pages directly into process address spaces via mechanisms like mmap, leveraging the cache for rapid execution startup and library sharing. Similarly, database systems handling query-intensive workloads on static datasets benefit from this approach, as read operations on tables or indexes populate the cache to accelerate repeated analytical queries without the overhead of write synchronization. Optimizations in read-only caching focus on exploiting access patterns to minimize latency, including the clustering of related pages within each file's address space structure. The Linux kernel employs a radix tree (now largely replaced by XArray in recent versions) to index pages by their offsets, naturally grouping contiguous or nearby blocks to enhance spatial locality and enable efficient range-based lookups during sequential reads. This organization reduces traversal overhead and improves hit rates by keeping spatially proximate data in closer memory proximity, thereby decreasing I/O demands in workloads with predictable access clusters, such as streaming file reads or block-aligned database scans.

Write-Back and Write-Through Strategies

In write-through caching, modifications to pages in the page cache are immediately propagated to the underlying device, ensuring that the disk always reflects the current state of the cache for durability. This strategy eliminates the risk of from cached modifications during system crashes but incurs high I/O overhead due to synchronous writes on every update, making it suitable for scenarios prioritizing over , such as systems or configurations with non-volatile . The write-back strategy, commonly used in modern operating systems like , updates the page cache immediately upon modification while marking the affected pages as "dirty" and deferring the write to disk. This allows for batching multiple updates into fewer, more efficient I/O operations, reducing latency and improving throughput, though it introduces the risk of losing recent changes if a crash occurs before flushing. In , dirty pages are tracked and managed through the kernel's writeback subsystem, which employs background flusher threads to asynchronously write them out. Flushing in write-back occurs via several triggers: periodic intervals controlled by vm.dirty_writeback_centisecs (default 500 centiseconds, or 5 seconds), where flusher threads wake to scan and write eligible dirty pages aged beyond vm.dirty_expire_centisecs (default 3000 centiseconds, or 30 seconds); explicit requests through system calls like fsync(), which force immediate synchronization of specific files; or pressure, where the kswapd daemon initiates writeback during page reclamation to free dirty pages when system is low. Background writeback begins when dirty exceeds vm.dirty_background_ratio (default 10% of total system ), aiming to keep dirty data low without blocking applications. If dirty reaches vm.dirty_ratio (default 20%), writing processes block directly to perform writeback, preventing excessive accumulation. Hybrid approaches combine elements of write-through and write-back to optimize the trade-off, often integrating filesystem-specific mechanisms for atomicity. For instance, the filesystem in supports multiple data modes that interact with the page cache: in data=ordered mode (the default), write-back caching is used, but data pages are flushed to disk before journaling metadata commits, ensuring consistency on recovery without full journaling overhead; in data=writeback mode, pure deferred writes occur with no data journaling, maximizing but risking inconsistency; and in data=journal mode, all data and are first written to the before final placement, providing write-through-like at the expense of double writes. These modes leverage page cache thresholds, such as triggering background flushes when dirty ratios exceed configured limits (e.g., 20% for process blocking), to balance I/O efficiency with crash recovery guarantees.

Performance and Efficiency

Memory Conservation Techniques

To conserve memory in the page cache, operating systems like employ dynamic sizing mechanisms that allocate portions of based on current availability and workload demands. The page cache grows or shrinks elastically, utilizing free memory to buffer file data while ensuring essential system operations have sufficient resources. Typically, it can occupy a significant of total —often approaching 50% or more under light load—before pressure triggers reclamation, preventing overcommitment that could lead to out-of-memory conditions. The swappiness parameter plays a key role in this sizing by controlling the kernel's preference for reclaiming page cache versus anonymous memory pages during memory pressure. Ranging from 0 to 200 (with a default of 60), a lower value prioritizes retaining page cache contents over out application data, thereby conserving cache effectiveness at the expense of potential swap usage; conversely, higher values encourage earlier cache eviction to protect active processes. This tunable allows administrators to fine-tune allocation for specific environments, such as servers with ample where maximizing cache hit rates is beneficial. Pressure management techniques further safeguard RAM usage by reserving minimum free memory and enabling manual reclamation. The vm.min_free_kbytes tunable enforces a baseline of free kilobytes—typically at least KB—to support critical allocations like those under PF_MEMALLOC contexts, computing zone watermarks to trigger proactive reclamation before exhaustion. For emergency scenarios, the drop_caches interface in /proc/sys/vm/drop_caches allows non-destructive eviction of clean page cache (value 1), reclaimable slab objects like dentries and inodes (value 2), or both (value 3), freeing without but potentially incurring short-term performance overhead from refetching. These controls ensure the page cache does not monopolize , maintaining stability under varying loads. As of 5.16, the Multi-Gen LRU framework enhances page replacement policies for the page cache and other lists, using generation-based tracking to better approximate least-recently-used eviction, improving efficiency for workloads with varied access patterns. extends effective memory for the page cache indirectly by handling inactive anonymous pages that might otherwise pressure cache eviction. In , zswap provides a compressed pool for swap pages, using algorithms like LZ4 to store evicted anonymous pages compactly, reducing the need for disk I/O and allowing more data to remain in memory overall. When the pool fills (governed by max_pool_percent, defaulting to 20% of RAM), least-recently-used pages are decompressed and written to backing swap, effectively amplifying available cache space by 2-4x depending on compressibility. Deduplication techniques complement these by identifying and merging redundant pages, though primarily for anonymous memory rather than direct page cache files. Kernel Same-page Merging (KSM), enabled via CONFIG_KSM, scans for identical private pages across processes or virtual machines and replaces duplicates with a single shared, write-protected copy, potentially saving up to 50% memory in high-duplication scenarios like KVM guests. While KSM does not target file-backed page cache pages, its reductions in overall anonymous memory pressure indirectly preserve more RAM for cache growth, with tunable scanning via /sys/kernel/mm/ksm/pages_to_scan balancing CPU overhead against savings.

Impact on I/O Performance

Page caching significantly reduces I/O by serving cache hits directly from main , which typically takes around 100 nanoseconds, compared to 5-10 milliseconds for a random disk seek on traditional hard disk drives (HDDs) or about 0.1 milliseconds on solid-state drives (SSDs). This disparity means that even modest cache hit rates can dramatically lower average access times; for instance, in web serving workloads where hit rates often exceed 90%, systems achieve performance close to pure speeds, minimizing the effective to sub-microsecond levels. Throughput improvements arise as the page cache buffers sequential reads and writes, supporting bursty I/O patterns without constant disk involvement and enabling higher overall transfer rates. Benchmarks demonstrate that page caching can yield 10-100x speedups in access operations, particularly when combining caching with techniques like readahead for sequential . In practical scenarios, this translates to sustained throughput increases, such as up to 44% higher I/O in scanning workloads on fast . The benefits vary by workload: page caching excels in random read-heavy scenarios, such as accessing database indexes, where it mitigates the high of scattered disk seeks by keeping hot data in . However, pure write-intensive workloads see diminished gains without batching or write-back mechanisms to coalesce operations. On SSDs, these advantages are amplified due to the devices' inherently lower baseline (e.g., 20-100 microseconds for random reads), allowing the cache to further optimize already responsive . Cache effectiveness is measured using tools like iostat, which tracks disk read/write ratios to infer hit rates by comparing application reads to actual disk I/Os, and fio, which simulates workloads to quantify cache impacts through metrics like and latency under buffered versus direct I/O modes. These tools reveal hit percentages and throughput ratios, helping administrators tune systems for optimal I/O performance.

Security Implications

Side-Channel Vulnerabilities

Page cache side-channel vulnerabilities arise from the timing differences in accessing cached versus uncached pages, allowing attackers to infer sensitive data through observable access patterns. These attacks exploit the page cache's role in buffering disk-backed pages in , where the presence or absence of a page can be probed via system calls, revealing information about victim processes' I/O activities. Early research in the demonstrated cache-based side-channels in operating systems, showing how timing variations in cache accesses could leak cryptographic keys during algorithm execution. A prominent attack type involves cache timing methods akin to Prime+Probe, where an attacker populates the page cache with their own pages, observes eviction delays caused by victim accesses, and measures timing to infer data access patterns. This technique targets the fully associative nature of the page cache, enabling unprivileged attackers to monitor residency of 4 pages with high , such as 2 μs on systems. In multi-tenant environments like , these attacks apply to shared caches across processes, sandboxes, or containers, where common files or libraries are cached collectively, facilitating cross-isolation leakage. Exploitation often involves malicious code repeatedly probing cache state changes to deduce sensitive information, such as portions of cryptographic keys or user passwords from I/O patterns. For instance, attackers have recovered temporary passwords generated by vulnerable software like PHP's password_hash function by timing page cache accesses during computation, achieving accuracy within 1.5 ms. Similarly, keystroke timing attacks monitor cache eviction patterns from shared libraries during user input, inferring typing rhythms in applications like Ubuntu's gksu. These methods have been demonstrated to bypass address space isolation via UI redressing attacks that measure latency differences in cached UI elements. The scope of these vulnerabilities is particularly pronounced in virtualized setups, such as containers or sharing host-level page cache for system files, enabling covert channels with capacities up to 100 kB/s on Windows and 9.7 kB/s on . In contrast, fully isolated processes face reduced risk, as dedicated page caches limit shared state observation, though local attacks within the same domain remain feasible. Replacement policies, like those influencing timing, can amplify these leaks by creating predictable patterns in cache behavior.

Mitigation Approaches

Mitigation approaches for page cache side-channel attacks focus on restricting access to probing mechanisms and adjusting management to obscure observable patterns, while preserving overall system efficiency. These techniques address the shared nature of page caches in multi-tenant environments, where processes or virtual machines compete for space. Following the 2019 disclosure of page cache attacks (CVE-2019-5489), operating systems implemented targeted fixes to the system calls exploited for probing. In version (released January 2019) modified the mincore() syscall to report only pages actually mapped in the calling process's , rather than indicating potential page cache residency for unmapped pages. This change prevents unprivileged users from inferring other processes' file access patterns via the syscall, with the patch applied via commit 574823bfab82d9d8fa47f422778043fbb4b4f50e. The mincore() call is rarely used in practice, minimizing performance impact. On Windows, starting with version 10 1903 (19H1, released May 2019), required the PROCESS_QUERY_INFORMATION privilege—instead of the more permissive PROCESS_QUERY_LIMITED_INFORMATION—for the QueryWorkingSetEx function. Additionally, the ShareCount field was omitted from the returned , reducing the leakage of page sharing information across processes. These changes limit unprivileged access to details that could reveal page cache state. Replacement Policy Adjustments. Switching to working-set-based algorithms, as used in Windows, can make page eviction less susceptible to manipulation and improve overall performance by reducing predictable patterns that attackers exploit for timing-based inference. Linux has explored similar shifts away from global LRU policies to mitigate denial-of-service via targeted evictions. Encryption and Isolation Techniques. Filesystem-level encryption, such as Linux's fscrypt (available since kernel 4.1, with enhancements up to 2025), encrypts , ensuring that pages in the cache contain rather than . This obscures content correlations even if access timings are observed, though metadata patterns may still leak. In containerized or virtualized environments, using namespaces or dedicated filesystems can limit shared page cache exposure, though this may increase memory overhead. These mitigations effectively address the identified vulnerabilities with low overhead—typically under 1% performance impact in benchmarks—and remain current as of 2025, with no major new page cache side-channels reported since 2019.

References

  1. [1]
    Chapter 10 Page Frame Reclamation - The Linux Kernel Archives
    The page cache is a set of data structures which contain pages that are backed by regular files, block devices or swap. There are basically four types of pages ...
  2. [2]
    [PDF] The Page Cache - COS 316 Lecture 11 - cs.Princeton
    The Linux page cache solves two problems: 1. How to access disk blocks from the CPU. 2. How to avoid allocating multiple memory pages for shared file system ...
  3. [3]
    Chapter 3 Memory Management
    It is used to cache the logical contents of a file a page at a time and is accessed via the file and offset within the file. As pages are read into memory from ...
  4. [4]
    File Caching - Win32 apps - Microsoft Learn
    Jan 7, 2021 · By default, Windows caches file data that is read from disks and written to disks. This implies that read operations read file data from an area in system ...Missing: definition | Show results with:definition<|control11|><|separator|>
  5. [5]
    [PDF] Complete Virtual Memory Systems - cs.wisc.edu
    Linux, in this regard, is no different than traditional operating systems. The Linux page cache is unified, keeping pages in memory from three primary sources: ...
  6. [6]
    [PDF] Chapter 11: File System Implementation
    Silberschatz, Galvin and Gagne ©2009. Operating System Concepts – 8th Edition ... A unified buffer cache uses the same page cache to cache both memory-mapped ...
  7. [7]
    Multics Virtual Memory - Tutorial and Reflections
    Multics has a segmented, paged virtual address space that offers 8 nested levels of privileged (called rings). The Multics file system supports a tree- ...
  8. [8]
    Definition of access time - PCMag
    While access times of fast hard disks are typically from 5 to 10 milliseconds, solid state drive (SSD) access times are in the 25 to 100 microsecond range. SSDs ...
  9. [9]
    What is Access Time? | Webopedia
    May 24, 2021 · Static RAM (SRAM) has access times as low as 10 nanoseconds. Ideally, the access time of memory should be fast enough to keep up with the CPU.<|separator|>
  10. [10]
    Concepts overview - The Linux Kernel documentation
    The most notable categories of the reclaimable pages are page cache and anonymous memory. In most cases, the pages holding internal kernel data and used as DMA ...Missing: operating | Show results with:operating
  11. [11]
    Page Cache - The Linux Kernel documentation
    The page cache is the primary way that the user and the rest of the kernel interact with filesystems. It can be bypassed (e.g. with O_DIRECT), but normal reads, ...Missing: implementation | Show results with:implementation
  12. [12]
    Trees I: Radix trees - LWN.net
    Mar 13, 2006 · A Linux radix tree is a mechanism by which a (pointer) value can be associated with a (long) integer key. It is reasonably efficient in terms of storage, and ...
  13. [13]
    [PDF] Linux Kernel Programming The Page Cache and Page Writeback
    In case of a read() operation, data presence in the page cache is first checked. ▷ If data is present in the cache, cache hit. ▷ Otherwise, cache miss: VFS ...
  14. [14]
    15.1. The Page Cache - Understanding the Linux Kernel, 3rd Edition ...
    The page cache is the main disk cache used by the Linux kernel. It stores data read from disk and is used when writing to disk.
  15. [15]
    The working set model for program behavior - ACM Digital Library
    The working set model for program behavior. Author: Peter J. Denning. Peter J ... Published: 01 May 1968 Publication History. 762citation6,999Downloads.
  16. [16]
    A study of replacement algorithms for a virtual-storage computer
    A study of replacement algorithms for a virtual-storage computer. Author ... 1, 43-61 (January 1966). Digital Library · Google Scholar. Cited By. View all.
  17. [17]
    [PDF] Understanding The Linux Virtual Memory Manager
    Jul 9, 2007 · The Linux VM is a core kernel subsystem that affects OS performance, but is poorly understood and badly documented. This book provides a ...
  18. [18]
    [PDF] Linux readahead: less tricks for more
    Jun 30, 2007 · A readahead cache hit happens when a page to be readahead is found to be cached already. A long run of readahead cache hits indicates an al-.Missing: mechanism | Show results with:mechanism
  19. [19]
    Readahead: the documentation I wanted to read - LWN.net
    Apr 8, 2022 · Readahead reads data into the page cache before it's explicitly requested, only if the page is not yet in the cache or has the PG_readahead ...Missing: mechanism | Show results with:mechanism
  20. [20]
    invalidate_inode_pages2 - distorted.org.uk front page
    Description. Any pages which are found to be mapped into pagetables are unmapped prior to invalidation. Returns -EBUSY if any pages could not be invalidated ...
  21. [21]
    Linux Page Cache Basics - Thomas-Krenn-Wiki-en
    Linux kernels up to version 2.2 had both a Page Cache as well as a Buffer Cache. As of the 2.4 kernel, these two caches have been combined. Today, there is only ...
  22. [22]
    5.2. Tuning the Page Cache | Red Hat Enterprise Linux | 5
    Page cache is a disk cache which holds data of files and executable programs, for example pages with actual contents of files or block devices.
  23. [23]
    Linux Performance Tuning: Dealing with Memory and Disk IO
    Feb 8, 2022 · Linux uses excess memory for page cache, and demand paging. Free memory is used for cache, and buffered writes depend on available memory.Linux Free Memory · Linux Buffered Write... · Linux Buffered Read...
  24. [24]
    Overview of the Linux Virtual File System
    Called by the page cache to read a folio from the backing store. The 'file' argument supplies authentication information to network filesystems, and is ...
  25. [25]
    Write Through and Write Back in Cache - GeeksforGeeks
    Jul 12, 2025 · Write Through: In write-through, data is simultaneously updated to cache and memory. This process is simpler and more reliable.
  26. [26]
    Documentation for /proc/sys/vm - The Linux Kernel documentation
    The files in this directory can be used to tune the operation of the virtual memory (VM) subsystem of the Linux kernel and the writeout of dirty data to disk.<|control11|><|separator|>
  27. [27]
    The page cache and page writeback - CS Notes
    The page cache is a disk cache in RAM that minimizes disk I/O. Writeback updates the cache, and flusher threads periodically write dirty pages to disk.
  28. [28]
    PageOutKswapd - linux-mm.org Wiki
    kswapd is a kernel daemon thread that maintains a balance of free pages by evicting pages from memory when needed, invoked at boot-up.
  29. [29]
    Flushing out pdflush - LWN.net
    Apr 1, 2009 · Pdflush is a set of kernel threads which are responsible for writing the dirty pages to disk, either explicitly in response to a sync() call, or implicitly in ...Missing: kswapd | Show results with:kswapd
  30. [30]
    ext4 General Information - The Linux Kernel documentation
    In data=writeback mode, ext4 does not journal data at all. This mode ... data=journal mode provides full data and metadata journaling. All new data is ...
  31. [31]
  32. [32]
    5.5. Tuning Virtual Memory | Red Hat Enterprise Linux | 6
    Setting min_free_kbytes too low prevents the system from reclaiming memory. This can result in system hangs and OOM-killing multiple processes. However, setting ...
  33. [33]
  34. [34]
  35. [35]
  36. [36]
    Kernel Samepage Merging
    KSM only merges anonymous (private) pages, never pagecache (file) pages. KSM's merged pages were originally locked into kernel memory, but can now be swapped ...
  37. [37]
    Latency Numbers Every Programmer Should Know - GitHub Gist
    For example, 1MB read from SSD is different for each SSD, but it should be somewhere around the Millisecond range.
  38. [38]
    Proxy Caching the Estimates Page Load Delays
    Cache hit rates up to the 80 to 90% range are possible for modest size server caches with policies like LRU and LFU [ARLI96]. A number of issues arise in cache ...<|separator|>
  39. [39]
    Linux Page Cache Hit Ratio - Brendan Gregg
    Dec 31, 2014 · I've found a few ways people commonly study the page cache hit ratio on Linux: A) Study the page cache miss rate by using iostat(1) to monitor ...
  40. [40]
    [PDF] Acclaim: Adaptive Memory Reclaim to Improve User Experience in ...
    Jul 17, 2020 · Because the page cache resides in the main memory, the access latency of accessing the page cache takes about one hundred nanoseconds to ...
  41. [41]
    Optimizing JuiceFS Read Performance: Readahead, Prefetch, and ...
    Aug 6, 2024 · The page cache is a mechanism provided by the Linux kernel. One of its core functionalities is readahead. It preloads data into the cache to ...
  42. [42]
    The MySQL optimizer, the OS cache, and sequential versus random ...
    In general, it's a pretty good metric, but it has one major weakness: the server doesn't know whether a read will be satisfied from the operating system cache, ...
  43. [43]
    [PDF] The Impact of Solid State Drive on Search Engine Cache Management
    As such, in an SSD-based search en- gine infrastructure, the benefit of a cache hit should now attribute to both the saving of the random read and the saving of ...
  44. [44]
    1. fio - Flexible I/O tester rev. 3.38 - FIO's documentation!
    fio supports 2 kinds of performance measurement: I/O and file/directory operation. I/O engines define how the job issues I/O to the file. The following ...<|control11|><|separator|>
  45. [45]
    [1901.01161] Page Cache Attacks - arXiv
    Jan 4, 2019 · Abstract:We present a new hardware-agnostic side-channel attack that targets one of the most fundamental software caches in modern computer ...Missing: seminal | Show results with:seminal
  46. [46]
  47. [47]
    [PDF] Effective Mitigation Against Cache Side-channel Attacks on the ARM ...
    Cache side-channel attacks abuse microarchitectural designs meant to optimize memory access to infer information about victim pro- cesses, threatening data ...
  48. [48]
    [PDF] CATalyst: Defeating Last-Level Cache Side Channel Attacks in ...
    ABSTRACT. Cache side channel attacks are serious threats to multi-tenant public cloud platforms. Past work showed how secret in-.
  49. [49]
    [PDF] Page Placement Algorithms for Large Real-Indexed Caches
    When a computer system supports both paged virtual memory and large real-indexed caches, cache performance depends in part on the main memory page placement ...
  50. [50]
    [PDF] CEASER: Mitigating Conflict-Based Cache Attacks via Encrypted ...
    Conflict-based attacks can be mitigated by randomizing the location of the lines in the cache. Unfortunately, prior proposals for randomized mapping require ...
  51. [51]
    Mitigating cache-based side-channel attacks through randomization
    Jun 26, 2020 · In response, this paper proposes a lightweight system and architecture level randomization technique to effectively mitigate the impact of side- ...
  52. [52]
    Retpoline: A Branch Target Injection Mitigation - Intel
    Aug 22, 2022 · Retpoline is a hybrid approach since it requires updated microcode to make the speculation hardware behavior more predictable on some processor models.
  53. [53]
    Filesystem-level encryption (fscrypt) - The Linux Kernel Archives
    fscrypt is only resistant to side-channel attacks, such as timing or electromagnetic attacks, to the extent that the underlying Linux Cryptographic API ...
  54. [54]
    AMD Secure Encrypted Virtualization (SEV)
    AMD Secure Encrypted Virtualization (SEV) uses one key per virtual machine to isolate guests and the hypervisor, managed by the AMD Secure Processor.
  55. [55]
    STEALTHMEM: System-Level Protection Against Cache-Based Side ...
    STEALTHMEM protects against cache-based side channel attacks by managing locked cache lines, allowing each VM to hide memory access patterns.Missing: filesystem- | Show results with:filesystem-