You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/performance/vector-index-memory-configuration.adoc
+8-19Lines changed: 8 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,29 +7,10 @@ When you have a vector index, you must ensure that there is sufficient memory fo
7
7
If Lucene has insufficient memory, the OS will perform page swapping and read data from disk, which will dramatically degrade the Neo4j vector index search performance.
8
8
Tools like IOTOP can assist in understanding disk I/O usage.
9
9
10
-
== Warming up the vector index
11
-
12
-
The Neo4j vector index is only loaded into memory when it is accessed.
13
-
Ideally, the Lucene vector index is preloaded into OS-managed memory before quering the index.
14
-
However, you can also warm up the index by running a few random queries to help the OS load the index into memory.
15
-
The number of queries required to warm up the index depends on the size of the index and the amount of memory available.
16
-
For a smaller index (up to 1M entries), five queries should be sufficient to load the index into memory.
17
-
For a larger index, you may need to run a hundred queries.
18
-
It is also recommended to test the index.
19
-
20
-
[NOTE]
21
-
====
22
-
Since the Neo4j vector index is managed by the OS memory, restarting the server clears the buffer/cache, requiring the vector index to be reloaded into memory.
23
-
In the event of a rolling restart/patch/upgrade, an approach may be needed to address the warmup requirement.
24
-
====
25
-
26
10
== Optimal Neo4j memory configuration for vector indexes
27
11
28
-
29
-
30
12
The memory configuration recommendations are _Heap + Neo4j PageCache + .25(Vector Index Size) + Additional OS Managed Memory_.
31
13
32
-
33
14
=== Considerations and caveats
34
15
35
16
You can reduce the Neo4j page cache if you plan not to return vectors to the user or calling application, as the vectors are not needed and should not be loaded into memory.
@@ -172,3 +153,11 @@ The following examples show how to calculate the memory requirements when vector
172
153
| 410.5GB
173
154
| 70.5GB
174
155
|===
156
+
157
+
== Warming up the vector index
158
+
159
+
The Neo4j vector index is only loaded into memory when it is accessed.
160
+
Ideally, the Lucene vector index is preloaded into OS-managed memory before quering the index.
161
+
However, you can also warm up the index by running a few random queries to help the OS load the index into memory.
162
+
The number of queries required to warm up the index depends on the size of the index and the amount of memory available.
163
+
For a smaller index (up to 1M entries), five queries should be sufficient to load the index into memory.
0 commit comments