{{Short description|System call of the Linux kernel}} {{Lowercase title}} '''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.<ref>{{cite web | url = https://lwn.net/Articles/155510/ | title = Adaptive file readahead | date = 2005-10-12 | access-date = 2014-08-20 | author = Jonathan Corbet | publisher = LWN.net }}</ref><ref>{{cite web | url = http://man7.org/linux/man-pages/man2/readahead.2.html | title = readahead(2) - Linux manual page | access-date = 2014-04-09 | website = man7.org }}</ref>

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 {{mono|profile}} 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.<ref>{{cite web | url = http://free-electrons.com/pub/readahead/doc/ols2007-readahead-paper.pdf | title = Readahead: time-travel techniques for desktop and embedded systems | date = 2007-06-15 | access-date = 2014-05-01 | author = Michael Opdenacker | website = free-electrons.com | pages = 5&ndash;6 }}</ref>

In Linux distributions that use systemd, readahead binary (as part of the boot sequence) was replaced by systemd-readahead.<ref>{{cite web | url = https://fedorahosted.org/readahead/ | title = Readahead | access-date = 2014-04-09 | website = fedorahosted.org }}</ref><ref>{{cite web |url = http://www.freedesktop.org/software/systemd/man/systemd-readahead.html |title = systemd-readahead-replay.service |date = 2014-03-26 |access-date = 2014-04-09 |website = freedesktop.org |url-status = dead |archive-url = https://web.archive.org/web/20140409235938/http://www.freedesktop.org/software/systemd/man/systemd-readahead.html |archive-date = 2014-04-09 }}</ref> However, support for readahead was removed from systemd in its version 217, being described as unmaintained and unable to provide expected performance benefits.<ref>{{cite web|url=https://cgit.freedesktop.org/systemd/systemd/tree/NEWS#n950|title=systemd/systemd – System and Session Manager: Changes with 217|website=cgit.freedesktop.org|access-date=2018-02-09}}</ref>

Certain experimental page-level prefetching systems have been developed to further improve performance.<ref>{{cite web |url = http://prefetch.googlecode.com/files/gsoc-prefetching-presentation.pdf |title = Linux solution for prefetching necessary data during application and system startup |year = 2008 |access-date = 2014-07-28 |author = Krzysztof Lichota |website = code.google.com |url-status = dead |archive-url = https://web.archive.org/web/20091211124530/http://prefetch.googlecode.com/files/gsoc-prefetching-presentation.pdf |archive-date = 2009-12-11 }}</ref>

== In filesystem == *Bcache supports readahead of files and metadata.<ref>{{cite web |title=bcache.txt\Documentation - linux-bcache.git - Unnamed repository; edit this file 'description' to name the repository. |url=https://evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt |website=evilpiepirate.org |access-date=1 May 2020}}</ref> *ZFS supports readahead of files and metadata, when using ARC.<ref>{{cite web |title=Part 10 - Monitoring and Tuning ZFS Performance{{!}} Oracle Community |url=https://community.oracle.com/docs/DOC-914874 |website=community.oracle.com |access-date=1 May 2020}}</ref>

== See also == *Prefetcher *preload (software)

== References == {{Reflist|30em}}

{{Linux kernel}} {{Linux}}

Category:Preloading and prebinding Category:Linux file system-related software

{{Linux-stub}}