HomeFreeBSD

Only trigger read-ahead if two adjacent blocks have been requested.

Description

Only trigger read-ahead if two adjacent blocks have been requested.

The change makes block caching algorithm to work better for remote
media on low-BW/high-delay links.

This cuts boot time over IP KVMs noticeably, since the initialization
stage reads bunch of small 4th (and now lua) files that are not in
the same cache stripe (usually), thus wasting lot of bandwidth and
increasing latency even further.

The original regression came in 2017 with revision 87ed2b7f5. We've
seen increase of time it takes for the loader to get to the kernel
loading from under a minute to 10-15 minutes in many cases.

Reviewed by: tsoome
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D31623

(cherry picked from commit 0d13f5343fafbf3067ffc33a507ffca0375c4417)

Details

Provenance
sobomaxAuthored on Aug 20 2021, 7:33 PM
cpercivaCommitted on Dec 29 2021, 10:53 PM
Reviewer
tsoome
Differential Revision
D31623: Make boot block read-ahead caching algorithm smarter
Parents
rGcdbcf636d3e0: EFI loader: Don't free bcache for DEVT_DISK devs
Branches
Unknown
Tags
Unknown