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: u64Number of live rows currently admitted to the index.
row_bitmap_bytes: usizeEstimated heap bytes owned by the row bitmap.
row_bitmap_serialized_bytes: usizeRoaring serialized size for the row bitmap.
hnsw_index_bytes: usizeEstimated heap bytes owned by the HNSW derived index, excluding vector components.
hnsw_referenced_vector_bytes: usizeComponent bytes reachable through HNSW vector handles.
hnsw_entries: usizeTotal HNSW entries, including stale deleted row versions.
hnsw_live_entries: usizeLive HNSW entries reachable from row membership.
hnsw_deleted_entries: usizeStale HNSW entries retained for traversability after update/delete.
hnsw_link_count: usizeStored directed HNSW links across all layers.
hnsw_level_zero_link_count: usizeStored directed HNSW links in the level-0 layer.
hnsw_upper_layer_link_count: usizeStored directed HNSW links above the level-0 layer.
hnsw_max_layer_count: usizeMaximum HNSW layer count attached to any indexed entry.
hnsw_max_links_per_layer: usizeMaximum directed HNSW links stored in a single entry layer.
hnsw_average_links_per_entry_basis_points: usizeAverage directed HNSW links per entry, scaled by 10,000.
ivf_index_bytes: usizeEstimated heap bytes owned by the IVF derived index, excluding vector components.
ivf_referenced_vector_bytes: usizeComponent bytes reachable through IVF vector handles.
ivf_entries: usizeTotal IVF entries, including stale deleted row versions.
ivf_live_entries: usizeLive IVF entries reachable from row membership.
ivf_deleted_entries: usizeStale IVF entries retained until the derived index is rebuilt.
ivf_centroids: usizeNumber of trained IVF centroids.
ivf_list_count: usizeNumber of IVF inverted lists.
ivf_non_empty_list_count: usizeNumber of IVF inverted lists with at least one assigned live entry.
ivf_max_list_len: usizeMaximum assigned live entries in one IVF inverted list.
ivf_average_list_len_basis_points: usizeAverage assigned live entries per IVF inverted list, scaled by 10,000.
ivf_assigned_entries: usizeNon-stale IVF entries assigned to inverted lists.
ivf_pending_retrain_entries: usizeLive IVF entries whose current vector was inserted or replaced after centroid training.
turbo_quant_index_bytes: usizeEstimated heap bytes owned by the TurboQuant derived index, excluding vector components.
turbo_quant_referenced_vector_bytes: usizeComponent bytes reachable through TurboQuant-owned full-vector handles.
turbo_quant_entries: usizeTotal TurboQuant compressed entries.
turbo_quant_live_entries: usizeLive TurboQuant row entries.
turbo_quant_deleted_entries: usizeStale TurboQuant entries retained by the derived index.
TurboQuant compacts deletes and replacements immediately, so this should normally remain zero.
turbo_quant_code_bytes: usizePacked TurboQuant coordinate-code bytes.
turbo_quant_codebook_bytes: usizeTurboQuant scalar codebook bytes.
turbo_quant_calibration_bytes: usizeTurboQuant per-dimension calibration bytes.
estimated_index_bytes: usizeEstimated bytes for index-owned structures, excluding referenced vector components.
estimated_reachable_bytes: usizeEstimated upper-bound bytes reachable from the index including ANN vector components.
Implementations§
Source§impl VectorIndexMemoryUsage
impl VectorIndexMemoryUsage
Sourcepub fn ivf_pending_retrain_basis_points(&self) -> usize
pub fn ivf_pending_retrain_basis_points(&self) -> usize
Return pending IVF retrain entries divided by live IVF entries, scaled by 10,000.
Sourcepub fn ivf_rebuild_recommended(&self) -> bool
pub fn ivf_rebuild_recommended(&self) -> bool
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
impl Clone for VectorIndexMemoryUsage
Source§fn clone(&self) -> VectorIndexMemoryUsage
fn clone(&self) -> VectorIndexMemoryUsage
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 VectorIndexMemoryUsage
Source§impl Debug for VectorIndexMemoryUsage
impl Debug for VectorIndexMemoryUsage
Source§impl Default for VectorIndexMemoryUsage
impl Default for VectorIndexMemoryUsage
Source§fn default() -> VectorIndexMemoryUsage
fn default() -> VectorIndexMemoryUsage
impl Eq for VectorIndexMemoryUsage
Source§impl PartialEq for VectorIndexMemoryUsage
impl PartialEq for VectorIndexMemoryUsage
Source§fn eq(&self, other: &VectorIndexMemoryUsage) -> bool
fn eq(&self, other: &VectorIndexMemoryUsage) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VectorIndexMemoryUsage
Auto Trait Implementations§
impl Freeze for VectorIndexMemoryUsage
impl RefUnwindSafe for VectorIndexMemoryUsage
impl Send for VectorIndexMemoryUsage
impl Sync for VectorIndexMemoryUsage
impl Unpin for VectorIndexMemoryUsage
impl UnsafeUnpin for VectorIndexMemoryUsage
impl UnwindSafe for VectorIndexMemoryUsage
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.