Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit 74cfba0

Browse files
committed
Some KNN clarification.
1 parent 4d329f3 commit 74cfba0

File tree

4 files changed

+25
-13
lines changed

4 files changed

+25
-13
lines changed

docs/install/plugins.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ opendistro_index_management 1.4.0.0
3838
opendistro_performance_analyzer 1.4.0.0
3939
opendistro_security 1.4.0.0
4040
opendistro_sql 1.4.0.0
41+
opendistro-knn 1.4.0.0
4142
</pre>
4243
</td>
4344
</tr>
@@ -186,9 +187,8 @@ sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/down
186187

187188
### KNN
188189

189-
```bash
190-
sudo bin/elasticsearch-plugin install
191-
```
190+
KNN is currently only available as part of the Docker image.
191+
{: .warning }
192192

193193

194194
### Anomaly Detection

docs/knn/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ has_toc: false
88

99
# KNN
1010

11+
KNN is currently only available as part of the Docker image.
12+
{: .warning }
13+
1114
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).
1215

1316

docs/knn/settings.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Setting | Default | Description
2828
`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.
2929
`knn.cache.item.expiry.enabled` | false | Whether to remove graphs that have not been accessed for a certain duration from memory.
3030
`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.
3232
`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.
3434
`knn.memory.circuit_breaker.enabled` | true | Whether to enable the KNN memory circuit breaker.
3535
`knn.plugin.enabled`| true | Enables or disables the KNN plugin.
3636

@@ -43,13 +43,19 @@ KNN includes statistics that can give you a sense for how the plugin is performi
4343
GET _opendistro/_knn/stats
4444
```
4545

46+
You can also filter by node and/or statistic:
47+
48+
```
49+
GET /_opendistro/_knn/nodeId1,nodeId2/stats/statName1,statName2
50+
```
51+
4652
Statistic | Description
4753
:--- | :---
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.

version-history.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ Open Distro for Elasticsearch version | Release highlights | Release date | Elas
2525

2626
For detailed release notes, see these GitHub repositories:
2727

28+
- [Open Distro for Elasticsearch](https://github.com/opendistro-for-elasticsearch/opendistro-build/tree/master/release-notes)
2829
- [Security](https://github.com/opendistro-for-elasticsearch/security/releases)
2930
- [Alerting](https://github.com/opendistro-for-elasticsearch/alerting/releases)
3031
- [SQL](https://github.com/opendistro-for-elasticsearch/sql/releases)
3132
- [Index State Management](https://github.com/opendistro-for-elasticsearch/index-management/releases)
3233
- [Performance Analyzer](https://github.com/opendistro-for-elasticsearch/performance-analyzer/releases)
34+
- [KNN](https://github.com/opendistro-for-elasticsearch/k-NN/releases)
35+
- [Anomaly Detection](https://github.com/opendistro-for-elasticsearch/anomaly-detection/releases)

0 commit comments

Comments
 (0)