pub enum PrefetchMode {
Off,
Sequential,
WillNeed,
Auto,
}Expand description
Selects the read-ahead hint applied to the active disk-access backend.
See StorageConfig::prefetch. Sequential / WillNeed map to the
corresponding madvise(2) advice on the mmap backend; on the direct-I/O
backend any non-Off value enables the StorageConfig::direct_io_prefetch_bytes
read-ahead window.
Variants§
Off
No explicit prefetch hint; rely on default kernel behaviour.
Sequential
Hint sequential access (aggressive read-ahead, drop-behind).
WillNeed
Hint that the mapped/region bytes will be needed soon (eager fault-in).
Auto
Let the backend choose. For mmap this issues no madvise and relies on
the kernel’s default read-ahead: MADV_SEQUENTIAL’s drop-behind evicts
hot pages under concurrent write load and inflates the read-side p99 tail
(issue #1143), so Auto avoids it while keeping the isolated mmap win.
For direct I/O it enables the windowed read-ahead
(StorageConfig::direct_io_prefetch_bytes). Request
PrefetchMode::Sequential explicitly for MADV_SEQUENTIAL behaviour.
Trait Implementations§
Source§impl Clone for PrefetchMode
impl Clone for PrefetchMode
Source§fn clone(&self) -> PrefetchMode
fn clone(&self) -> PrefetchMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PrefetchMode
Source§impl Debug for PrefetchMode
impl Debug for PrefetchMode
Source§impl Default for PrefetchMode
impl Default for PrefetchMode
Source§fn default() -> PrefetchMode
fn default() -> PrefetchMode
Source§impl<'de> Deserialize<'de> for PrefetchMode
impl<'de> Deserialize<'de> for PrefetchMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for PrefetchMode
Source§impl PartialEq for PrefetchMode
impl PartialEq for PrefetchMode
Source§impl Serialize for PrefetchMode
impl Serialize for PrefetchMode
impl StructuralPartialEq for PrefetchMode
Auto Trait Implementations§
impl Freeze for PrefetchMode
impl RefUnwindSafe for PrefetchMode
impl Send for PrefetchMode
impl Sync for PrefetchMode
impl Unpin for PrefetchMode
impl UnsafeUnpin for PrefetchMode
impl UnwindSafe for PrefetchMode
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.