Readahead Explained
Readahead is a system call of the Linux kernel that loads a file's contents into the page cache. This prefetches the file so that when it is subsequently accessed, its contents are read from the main memory (RAM) rather than from a hard disk drive (HDD), resulting in much lower file access latencies.[1] [2]
Many Linux distributions use readahead on a list of commonly used files to speed up booting. In such a setup, if the kernel is booted with the boot parameter, it will record all file accesses during bootup and write a new list of files to be read during later boot sequences. This will make additional installed services start faster, because they are not included in the default readahead list.[3]
In Linux distributions that use systemd, readahead binary (as part of the boot sequence) was replaced by systemd-readahead.[4] [5] However, support for readahead was removed from systemd in its version 217, being described as unmaintained and unable to provide expected performance benefits.[6]
Certain experimental page-level prefetching systems have been developed to further improve performance.[7]
In filesystem
- Bcache supports readahead of files and metadata.[8]
- ZFS supports readahead of files and metadata, when using ARC.[9]
See also
Notes and References
- Web site: Adaptive file readahead . 2005-10-12 . 2014-08-20 . Jonathan Corbet . LWN.net.
- Web site: readahead(2) - Linux manual page . 2014-04-09 . man7.org.
- Web site: Readahead: time-travel techniques for desktop and embedded systems . 2007-06-15 . 2014-05-01 . Michael Opdenacker . free-electrons.com . 5 - 6.
- Web site: Readahead . 2014-04-09 . fedorahosted.org.
- Web site: systemd-readahead-replay.service . 2014-03-26 . 2014-04-09 . freedesktop.org . dead . https://web.archive.org/web/20140409235938/http://www.freedesktop.org/software/systemd/man/systemd-readahead.html . 2014-04-09.
- Web site: systemd/systemd – System and Session Manager: Changes with 217. cgit.freedesktop.org. 2018-02-09.
- Web site: Linux solution for prefetching necessary data during application and system startup . 2008 . 2014-07-28 . Krzysztof Lichota . code.google.com . dead . https://web.archive.org/web/20091211124530/http://prefetch.googlecode.com/files/gsoc-prefetching-presentation.pdf . 2009-12-11.
- Web site: bcache.txt\Documentation - linux-bcache.git - Unnamed repository; edit this file 'description' to name the repository. . evilpiepirate.org . 1 May 2020.
- Web site: Part 10 - Monitoring and Tuning ZFS Performance Oracle Community . community.oracle.com . 1 May 2020.