Struct datafusion_execution::memory_pool::FairSpillPool
source · pub struct FairSpillPool { /* private fields */ }Expand description
A MemoryPool that prevents spillable reservations from using more than
an even fraction of the available memory sans any unspillable reservations
(i.e. (pool_size - unspillable_memory) / num_spillable_reservations)
This pool works best when you know beforehand the query has multiple spillable operators that will likely all need to spill. Sometimes it will cause spills even when there was sufficient memory (reserved for other operators) to avoid doing so.
┌───────────────────────z──────────────────────z───────────────┐
│ z z │
│ z z │
│ Spillable z Unspillable z Free │
│ Memory z Memory z Memory │
│ z z │
│ z z │
└───────────────────────z──────────────────────z───────────────┘
Unspillable memory is allocated in a first-come, first-serve fashion
Implementations§
Trait Implementations§
source§impl Debug for FairSpillPool
impl Debug for FairSpillPool
source§impl MemoryPool for FairSpillPool
impl MemoryPool for FairSpillPool
source§fn register(&self, consumer: &MemoryConsumer)
fn register(&self, consumer: &MemoryConsumer)
Registers a new
MemoryConsumer Read moresource§fn unregister(&self, consumer: &MemoryConsumer)
fn unregister(&self, consumer: &MemoryConsumer)
source§fn grow(&self, reservation: &MemoryReservation, additional: usize)
fn grow(&self, reservation: &MemoryReservation, additional: usize)
source§fn shrink(&self, reservation: &MemoryReservation, shrink: usize)
fn shrink(&self, reservation: &MemoryReservation, shrink: usize)
Infallibly shrink the provided
reservation by shrink bytesAuto Trait Implementations§
impl !Freeze for FairSpillPool
impl !RefUnwindSafe for FairSpillPool
impl Send for FairSpillPool
impl Sync for FairSpillPool
impl Unpin for FairSpillPool
impl UnwindSafe for FairSpillPool
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more