-
Notifications
You must be signed in to change notification settings - Fork 26.1k
Use direct I/O for merge-time reads of raw vectors #155919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| pr: 155919 | ||
| summary: Use direct I/O for merge-time reads of raw vectors | ||
| area: Vector Search | ||
| type: enhancement | ||
| issues: | ||
| - 155021 |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -602,7 +602,7 @@ $$$dense-vector-index-options$$$ | |||||||||
| :::: | ||||||||||
|
|
||||||||||
| `on_disk_rescore` {applies_to}`stack: preview 9.3` {applies_to}`serverless: unavailable` | ||||||||||
| : (Optional, boolean) Only applicable to quantized HNSW and `bbq_disk` index types. When `true`, vector rescoring will read the raw vector data directly from disk, and will not copy it in memory. This can improve performance when vector data is larger than the amount of available RAM. This setting only applies to newly-indexed vectors; after changing this setting, the vectors must be reindexed or force-merged to apply the new setting to the whole index. Defaults to `false`. | ||||||||||
| : (Optional, boolean) Only applicable to quantized HNSW and `bbq_disk` index types. When `true`, vector rescoring will read the raw vector data directly from disk, and will not copy it in memory. This can improve performance when vector data is larger than the amount of available RAM. For `bbq_hnsw` indices, segment merges also read the raw vector data directly from disk where the platform supports it, so that merging is less likely to evict more frequently accessed data from the filesystem cache. {applies_to}`stack: ga 9.6` This setting only applies to newly-indexed vectors; after changing this setting, the vectors must be reindexed or force-merged to apply the new setting to the whole index. Defaults to `false`. | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The inline For the new content, defer to #155919 (comment)
Suggested change
@thecoop: should the parent to ? Or is
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we can say directIO is ga yet, there's still various aspects we need to check - in particular whether we use direct IO for merges generally. We're due to come back to this soon, so we can re-evaluate it then |
||||||||||
|
|
||||||||||
| `auto_calibrate` {applies_to}`stack: ga 9.5` | ||||||||||
| : (Optional, boolean) Only applicable to `bbq_disk`. When `true`, {{es}} automatically selects the optimal quantization encoding, oversampling factor, and preconditioning for each merged segment based on the actual recall characteristics of the merged corpus. Segments containing fewer than 10,000 vectors after merging are not calibrated and, when not otherwise specified in the mappings, use the default oversampling factor of 3.0x. Defaults to `false`. Cannot be changed after the field is created. Refer to [Auto-calibration for `bbq_disk`](/reference/elasticsearch/mapping-reference/bbq.md#bbq-auto-calibration) for details. | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the "Elastic License | ||
| * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
| * Public License v 1"; you may not use this file except in compliance with, at | ||
| * your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| package org.elasticsearch.index.codec.vectors; | ||
|
|
||
| import org.apache.lucene.store.IOContext; | ||
|
|
||
| /** | ||
| * Hint that a file opened with direct I/O will be read as a long sequential stream by a merge, | ||
| * so reads should use a merge-sized buffer rather than the small buffer used for random access. | ||
| */ | ||
| public enum DirectIOMergeHint implements IOContext.FileOpenHint { | ||
|
thecoop marked this conversation as resolved.
Outdated
|
||
| INSTANCE | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.