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
{{ message }}
This repository was archived by the owner on Aug 16, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: docs/knn/index.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@ has_toc: false
8
8
9
9
# KNN
10
10
11
+
KNN is currently only available as part of the Docker image.
12
+
{: .warning }
13
+
11
14
Short for its associated *k-nearest neighbors* algorithm, the KNN plugin lets you search for points in a vector space and find the "nearest neighbors" for those points by Euclidean distance. Use cases include recommendations (for example, an "other songs you might like" feature in a music application), image recognition, and fraud detection. For background information on the algorithm, see [Wikipedia](https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm).
Copy file name to clipboardExpand all lines: docs/knn/settings.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,9 @@ Setting | Default | Description
28
28
`knn.algo_param.index_thread_qty` | 1 | The number of threads used for graph creation. Keeping this value low reduces the CPU impact of the KNN plugin, but also reduces indexing performance.
29
29
`knn.cache.item.expiry.enabled` | false | Whether to remove graphs that have not been accessed for a certain duration from memory.
30
30
`knn.cache.item.expiry.minutes` | 3h | If enabled, the idle time before removing a graph from memory.
31
-
`knn.circuit_breaker.unset.percentage` | 75.0 | The native memory usage threshold for the circuit breaker.
31
+
`knn.circuit_breaker.unset.percentage` | 75.0 | The native memory usage threshold for the circuit breaker. Memory usage must be below this percentage of `knn.memory.circuit_breaker.limit` for `knn.circuit_breaker.triggered` to remain false.
32
32
`knn.circuit_breaker.triggered` | false | True when memory usage exceeds the `knn.circuit_breaker.unset.percentage` value.
33
-
`knn.memory.circuit_breaker.limit` | 60% | The native memory limit for graphs. If this limit triggers, KNN removes the least recently used graphs.
33
+
`knn.memory.circuit_breaker.limit` | 60% | The native memory limit for graphs. At the default value, if a machine has 100 GB of memory and the JVM uses 32 GB, KNN uses 60% of the remaining 68 GB (40.8 GB). If memory usage exceeds this value, KNN removes the least recently used graphs.
34
34
`knn.memory.circuit_breaker.enabled` | true | Whether to enable the KNN memory circuit breaker.
35
35
`knn.plugin.enabled`| true | Enables or disables the KNN plugin.
36
36
@@ -43,13 +43,19 @@ KNN includes statistics that can give you a sense for how the plugin is performi
43
43
GET _opendistro/_knn/stats
44
44
```
45
45
46
+
You can also filter by node and/or statistic:
47
+
48
+
```
49
+
GET /_opendistro/_knn/nodeId1,nodeId2/stats/statName1,statName2
50
+
```
51
+
46
52
Statistic | Description
47
53
:--- | :---
48
-
totalLoadTime | asdf
49
-
evictionCount | asdf
50
-
hitCount | asdf
51
-
cacheCapacityReached | asdf
52
-
loadSuccessCount | asdf
53
-
graphMemoryUsage | asdf
54
-
missCount | asdf
55
-
loadExceptionCount | asdf
54
+
totalLoadTime | The time in nanoseconds that KNN has taken to load graphs into the cache.
55
+
evictionCount | The number of graphs that have been evicted from the cache due to memory constraints or idle time.
56
+
hitCount | The number of cache hits.
57
+
cacheCapacityReached | Whether `knn.memory.circuit_breaker.limit` has been reached.
58
+
loadSuccessCount | The number of times KNN successfully loaded a graph into the cache.
59
+
graphMemoryUsage | Current cache size (total size of all graphs in memory) in kilobytes.
60
+
missCount | The number of cache misses.
61
+
loadExceptionCount | The number of times an exception occurred when trying to load a graph into the cache.
0 commit comments