Read ahead options

Ceph Block Devices support read-ahead and prefetching to optimize small, sequential reads. This is generally handled by the guest OS in the case of a virtual machine (VM), but boot loaders potentially do not issue efficient reads. Read-ahead is automatically disabled if caching is disabled.

Table 1 lists the read ahead configuration options for Ceph Block Devices.
Table 1. Read-ahead configuration options
Option Description Type Required Default
rbd_readahead_trigger_requests Number of sequential read requests necessary to trigger read-ahead. Integer No 10
rbd_readahead_max_bytes Maximum size of a read-ahead request. If zero, read-ahead is disabled. 64-bit integer No 512 KiB
rbd_readahead_disable_after_bytes After this many bytes are read from an RBD image, read-ahead is disabled for that image until it is closed. This allows the guest OS to take over read-ahead after it is started. If zero, read-ahead stays enabled. 64-bit integer No 50 MiB