pub enum CacheType {
Unsafe,
WriteBack,
}
Expand description
Block device caching strategies, default to “Unsafe”. Firecracker offers the possiblity of choosing the block device caching strategy. Caching strategy affects the path data written from inside the microVM takes to the host persistent storage.
The caching strategy should be used in order to make a trade-off:
- Unsafe
-
- enhances performance as fewer syscalls and IO operations are performed when running workloads
-
- sacrifices data integrity in situations where the host simply loses the contents of the page cache without committing them to the backing storage (such as a power outage)
-
- recommended for use cases with ephemeral storage, such as serverless environments
- Writeback
-
- ensures that once a flush request was acknowledged by the host, the data is committed to the backing storage
-
- sacrifices performance, from boot time increases to greater emulation-related latencies when running workloads
-
- recommended for use cases with low power environments, such as embedded environments
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CacheType
impl<'de> Deserialize<'de> for CacheType
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for CacheType
impl Ord for CacheType
Source§impl PartialOrd for CacheType
impl PartialOrd for CacheType
impl Copy for CacheType
impl Eq for CacheType
impl StructuralPartialEq for CacheType
Auto Trait Implementations§
impl Freeze for CacheType
impl RefUnwindSafe for CacheType
impl Send for CacheType
impl Sync for CacheType
impl Unpin for CacheType
impl UnwindSafe for CacheType
Blanket Implementations§
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
Mutably borrows from an owned value. Read more