-
Notifications
You must be signed in to change notification settings - Fork 9
DOC-754 | Added and removed consolidation options for inverted indexes and arangosearch Views
#850
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
Open
Simran-B
wants to merge
1
commit into
main
Choose a base branch
from
DOC-754
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -567,6 +567,8 @@ paths: | |
| default: tier | ||
| segmentsBytesFloor: | ||
| description: | | ||
| This option is only available up to v3.12.6: | ||
|
|
||
| Defines the value (in bytes) to treat all smaller segments as equal for | ||
| consolidation selection. | ||
| type: integer | ||
|
|
@@ -578,21 +580,74 @@ paths: | |
| default: 8589934592 | ||
| segmentsMax: | ||
| description: | | ||
| This option is only available up to v3.12.6: | ||
|
|
||
| The maximum number of segments that are evaluated as candidates for | ||
| consolidation. | ||
| type: integer | ||
| default: 200 | ||
| segmentsMin: | ||
| description: | | ||
| This option is only available up to v3.12.6: | ||
|
|
||
| The minimum number of segments that are evaluated as candidates for | ||
| consolidation. | ||
| type: integer | ||
| default: 50 | ||
| minScore: | ||
| description: | | ||
| This option is only available up to v3.12.6: | ||
|
|
||
| Filter out consolidation candidates with a score less than this. | ||
| type: integer | ||
| default: 0 | ||
| maxSkewThreshold: | ||
| description: | | ||
| This option is available from v3.12.7 onward: | ||
|
|
||
| Merge a subset of segments where the ratio of the largest segment size | ||
| to the combined segment size is within this threshold. Increasing the | ||
| threshold leads to fewer segment files and thus a potentially higher | ||
| read performance and less file descriptors but at the expense of more | ||
| frequent consolidations and thus higher write load. | ||
|
|
||
| The skew describes how much segment files vary in size. It is a number | ||
| between `0.0` and `1.0` and calculated by dividing the largest file size | ||
| of a set of segment files by the total size. | ||
|
|
||
| Multiple combinations of candidate segments are checked and the one with | ||
| the lowest skew value is selected for consolidation. This rather selects | ||
| many than few segments, but the new merged segment will be below the | ||
| configured `segmentsBytesMax`. The skew threshold prevents unnecessary | ||
| consolidation of e.g. a big segment file with a very small one, where the | ||
| cost of writing a merged segment is higher than the gain in read performance. | ||
| type: number | ||
| minimum: 0.0 | ||
| maximum: 1.0 | ||
| default: 0.4 | ||
| minDeletionRatio: | ||
| description: | | ||
| This option is available from v3.12.7 onward: | ||
|
|
||
| Clean up segments where the ratio of deleted documents is at least | ||
| this high. Decreasing the minimum ratio leads to earlier consolidation | ||
| of segments with many deleted documents and thus reclamation of | ||
| disk space but causes a higher write load. | ||
|
|
||
| The deletion ratio is the percentage of deleted documents across one | ||
| or more segment files. It is a number between `0.0` and `1.0` and | ||
| calculated by dividing the number of deleted documents by the total | ||
| number of documents. | ||
|
|
||
| The segment files with the highest individual deletion ratio are | ||
|
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. Segment files are first sorted in the decreasing order of their individual deletion ratios. Then we look for the largest subset of segments whose collective deletion ratio is over or equal to |
||
| the candidates. As many as possible candidates are selected for | ||
| consolidation (in order of decreasing ratio), but the overall ratio | ||
| has to be at least `minDeletionRatio` and the new segment with the | ||
| active documents needs to be below the configured `segmentsBytesMax`. | ||
| type: integer | ||
| minimum: 0.0 | ||
| maximum: 1.0 | ||
| default: 0.5 | ||
| writebufferIdle: | ||
| description: | | ||
| Maximum number of writers (segments) cached in the pool | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The skew describes how much do segment files vary in file size. It is a number between
0.0and1.0and is calculated by dividing the largest file size of a set of segment files by the total size.A large threshold value allows merging large segment files with smaller ones, consolidation will occur more frequently and there will be fewer segment files on disk at all times. While this may potentially improve the read performance and will result into the need for fewer file descriptors, frequent consolidations result into a higher write load resulting into a higher write amplification.
On the other hand, a small threshold value will trigger consolidation only when there are a large number of segment files that don't vary in size a lot. Consolidation will occur less frequently reducing write amplification but it can result into a greater number of segment files on disk.
Multiple combinations of candidate segments are checked and the one with the lowest skew value is selected for consolidation. The selection process picks the most number of segments that together have the lowest skew while ensuring that the size of the new consolidated segment remains under the configured
segmentsBytesMax.