Skip to main content

VectorIndexMemoryUsage

Struct VectorIndexMemoryUsage 

Source
pub struct VectorIndexMemoryUsage {
Show 36 fields pub indexed_rows: u64, pub row_bitmap_bytes: usize, pub row_bitmap_serialized_bytes: usize, pub hnsw_index_bytes: usize, pub hnsw_referenced_vector_bytes: usize, pub hnsw_entries: usize, pub hnsw_live_entries: usize, pub hnsw_deleted_entries: usize, pub hnsw_link_count: usize, pub hnsw_level_zero_link_count: usize, pub hnsw_upper_layer_link_count: usize, pub hnsw_max_layer_count: usize, pub hnsw_max_links_per_layer: usize, pub hnsw_average_links_per_entry_basis_points: usize, pub ivf_index_bytes: usize, pub ivf_referenced_vector_bytes: usize, pub ivf_entries: usize, pub ivf_live_entries: usize, pub ivf_deleted_entries: usize, pub ivf_centroids: usize, pub ivf_list_count: usize, pub ivf_non_empty_list_count: usize, pub ivf_max_list_len: usize, pub ivf_average_list_len_basis_points: usize, pub ivf_assigned_entries: usize, pub ivf_pending_retrain_entries: usize, pub turbo_quant_index_bytes: usize, pub turbo_quant_referenced_vector_bytes: usize, pub turbo_quant_entries: usize, pub turbo_quant_live_entries: usize, pub turbo_quant_deleted_entries: usize, pub turbo_quant_code_bytes: usize, pub turbo_quant_codebook_bytes: usize, pub turbo_quant_calibration_bytes: usize, pub estimated_index_bytes: usize, pub estimated_reachable_bytes: usize,
}
Expand description

Estimated resident memory and cardinality details for one vector index.

This is intentionally an estimate rather than allocator-exact accounting. estimated_index_bytes counts index-owned structures and excludes primary graph vector component allocations that ANN indexes may share through Arc handles. estimated_reachable_bytes adds the component bytes referenced by derived entries and centroids as an upper-bound view; deleted ANN entries can retain old component storage until the derived index is rebuilt.

Fields§

§indexed_rows: u64

Number of live rows currently admitted to the index.

§row_bitmap_bytes: usize

Estimated heap bytes owned by the row bitmap.

§row_bitmap_serialized_bytes: usize

Roaring serialized size for the row bitmap.

§hnsw_index_bytes: usize

Estimated heap bytes owned by the HNSW derived index, excluding vector components.

§hnsw_referenced_vector_bytes: usize

Component bytes reachable through HNSW vector handles.

§hnsw_entries: usize

Total HNSW entries, including stale deleted row versions.

§hnsw_live_entries: usize

Live HNSW entries reachable from row membership.

§hnsw_deleted_entries: usize

Stale HNSW entries retained for traversability after update/delete.

§hnsw_link_count: usize

Stored directed HNSW links across all layers.

§hnsw_level_zero_link_count: usize

Stored directed HNSW links in the level-0 layer.

§hnsw_upper_layer_link_count: usize

Stored directed HNSW links above the level-0 layer.

§hnsw_max_layer_count: usize

Maximum HNSW layer count attached to any indexed entry.

§hnsw_max_links_per_layer: usize

Maximum directed HNSW links stored in a single entry layer.

§hnsw_average_links_per_entry_basis_points: usize

Average directed HNSW links per entry, scaled by 10,000.

§ivf_index_bytes: usize

Estimated heap bytes owned by the IVF derived index, excluding vector components.

§ivf_referenced_vector_bytes: usize

Component bytes reachable through IVF vector handles.

§ivf_entries: usize

Total IVF entries, including stale deleted row versions.

§ivf_live_entries: usize

Live IVF entries reachable from row membership.

§ivf_deleted_entries: usize

Stale IVF entries retained until the derived index is rebuilt.

§ivf_centroids: usize

Number of trained IVF centroids.

§ivf_list_count: usize

Number of IVF inverted lists.

§ivf_non_empty_list_count: usize

Number of IVF inverted lists with at least one assigned live entry.

§ivf_max_list_len: usize

Maximum assigned live entries in one IVF inverted list.

§ivf_average_list_len_basis_points: usize

Average assigned live entries per IVF inverted list, scaled by 10,000.

§ivf_assigned_entries: usize

Non-stale IVF entries assigned to inverted lists.

§ivf_pending_retrain_entries: usize

Live IVF entries whose current vector was inserted or replaced after centroid training.

§turbo_quant_index_bytes: usize

Estimated heap bytes owned by the TurboQuant derived index, excluding vector components.

§turbo_quant_referenced_vector_bytes: usize

Component bytes reachable through TurboQuant-owned full-vector handles.

§turbo_quant_entries: usize

Total TurboQuant compressed entries.

§turbo_quant_live_entries: usize

Live TurboQuant row entries.

§turbo_quant_deleted_entries: usize

Stale TurboQuant entries retained by the derived index.

TurboQuant compacts deletes and replacements immediately, so this should normally remain zero.

§turbo_quant_code_bytes: usize

Packed TurboQuant coordinate-code bytes.

§turbo_quant_codebook_bytes: usize

TurboQuant scalar codebook bytes.

§turbo_quant_calibration_bytes: usize

TurboQuant per-dimension calibration bytes.

§estimated_index_bytes: usize

Estimated bytes for index-owned structures, excluding referenced vector components.

§estimated_reachable_bytes: usize

Estimated upper-bound bytes reachable from the index including ANN vector components.

Implementations§

Source§

impl VectorIndexMemoryUsage

Source

pub fn ivf_pending_retrain_basis_points(&self) -> usize

Return pending IVF retrain entries divided by live IVF entries, scaled by 10,000.

Return true when the IVF index should be rebuilt by maintenance soon.

The recommendation is deliberately diagnostic only: reads never rebuild indexes, and callers still decide when to run selene.rebuild_vector_indexes. Deleted IVF entries are not part of this first trigger because delete maintenance already unlinks them from inverted lists; existing reclaimed counters expose that memory-only pressure separately.

Trait Implementations§

Source§

impl Clone for VectorIndexMemoryUsage

Source§

fn clone(&self) -> VectorIndexMemoryUsage

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for VectorIndexMemoryUsage

Source§

impl Debug for VectorIndexMemoryUsage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VectorIndexMemoryUsage

Source§

fn default() -> VectorIndexMemoryUsage

Returns the “default value” for a type. Read more
Source§

impl Eq for VectorIndexMemoryUsage

Source§

impl PartialEq for VectorIndexMemoryUsage

Source§

fn eq(&self, other: &VectorIndexMemoryUsage) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for VectorIndexMemoryUsage

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more