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 !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