Skip to content

Commit 27fbf93

Browse files
committed
initial changes to support dense vectors off-heap stats
1 parent e7c1ee1 commit 27fbf93

File tree

33 files changed

+1789
-34
lines changed

33 files changed

+1789
-34
lines changed

distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/SystemJvmOptions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, St
6262
"-Dio.netty.noUnsafe=true",
6363
"-Dio.netty.noKeySetOptimization=true",
6464
"-Dio.netty.recycler.maxCapacityPerThread=0",
65+
// temporary until we get offheap vector stats in Lucene 10.3
66+
"--add-opens=org.apache.lucene.core/org.apache.lucene.codecs.lucene99=org.elasticsearch.server",
6567
// log4j 2
6668
"-Dlog4j.shutdownHookEnabled=false",
6769
"-Dlog4j2.disable.jmx=true",

docs/reference/cluster/nodes-stats.asciidoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,27 @@ This is not shown for the `shards` level, since mappings may be shared across th
834834
`value_count`::
835835
(integer) Total number of dense vector indexed across all shards assigned to the node.
836836

837+
`off_heap`::
838+
(object) Statistics about the desired size of off-heap memory for all vectors indexed across all shards assigned to the node.
839+
+
840+
.Properties of `off_heap`
841+
[%collapsible%open]
842+
========
843+
`total_size_in_bytes`::
844+
(long) The total desired size in bytes of off-heap memory.
845+
846+
`total_veb_size_in_bytes`::
847+
(long) The total desired size in bytes of off-heap memory for `bbq` quantized vectors` (<<dense-vector-file-extensions,veb>>).
848+
849+
`total_vec_size_in_bytes`::
850+
(long) The total desired size in bytes of off-heap memory for all non-quantized vectors (<<dense-vector-file-extensions,vec>>).
851+
852+
`total_veq_size_in_bytes`::
853+
(long) The total desired size in bytes of off-heap memory for vectors indexed with quantization: int4 or int8 (<<dense-vector-file-extensions,veq>>).
854+
855+
`total_vex_size_in_bytes`::
856+
(long) The total desired size in bytes of off-heap memory for the HNSW graph (<<dense-vector-file-extensions,vex>>).
857+
837858
=======
838859

839860
`sparse_vector`::

docs/reference/how-to/knn-search.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ of datasets and configurations that we use for our nightly benchmarks.
9898
[[dense-vector-preloading]]
9999
include::search-speed.asciidoc[tag=warm-fs-cache]
100100

101+
[[dense-vector-file-extensions]]
101102
The following file extensions are used for the approximate kNN search:
102103
Each extension is broken down by the quantization types.
103104

docs/reference/rest-api/common-parms.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ Return all statistics.
508508
<<completion-suggester,Completion suggester>> statistics.
509509

510510
`dense_vector`::
511-
Total number of dense vectors indexed.
511+
Statistics about dense vectors. Includes the total number of dense vectors indexed, and the desired size of off-heap memory.
512512
<<indices-refresh,Index refreshes>> can affect this statistic.
513513

514514
`docs`::

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.stats/10_basic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@
351351
- match: { indices.docs.count: 5 }
352352
- match: { indices.docs.deleted: 0 }
353353
- match: { indices.dense_vector.value_count: 8 }
354+
- is_false: indices.dense_vector.off_heap
354355

355356
---
356357
"Sparse vector stats":

0 commit comments

Comments
 (0)