forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
admission, kvserver: snapshot integration for disk bandwidth
This patch integrates raft snapshot ingestion with the disk write mechanism in admission control. The following internal machinery changes were made to make that possible: - `SnapshotQueue` was added as an implementation of the `requester` interface. Internally, it is a simple FIFO queue unlike the other work queue, since we can make the assumption that all snapshots are of the same priority and are processed as system tenant requests. - A new `kvStoreTokenChildGranter` was created to grant tokens to snapshot requests. - We now have a `StoreWorkType` that differentiates `regular`, `elastic`, and `snapshot` work for the store granters. This was necessary because snapshots do not incur the same write-amp as the other work types – they land into L6 of the LSM due to excises. We also only want these requests to be subject to pacing based on disk bandwidth. - We now prioritize store writes in the following order: `regular`, `snapshot`, `elastic`. - The `demuxHandle` of the `GrantCoordinator` now uses `StoreWorkType`. The integration point for the `SnapshotQueue` is in `Receive()` where we use a pacing mechanism to process incoming snapshots. Snapshots are subject to `snapshotBurstSize` amounts of disk writes before asking for further admission of the same size. The `multiSSTWriter` uses Pebble's SST size estimates to maintain a running count of disk writes incurred by the snapshot ingest. Once the SST is finalized we deduct/return further tokens. Closes cockroachdb#120708. Release note (ops change): Admission Control now has an integration for pacing snapshot ingest traffic based on disk bandwidth. `kvadmission.store.snapshot_ingest_bandwidth_control.enabled` is used to turn on this integration. Note that it requires provisioned bandwidth to be set for the store (or cluster through the cluster setting) for it to take effect.
- Loading branch information
1 parent
0ea0320
commit c40959d
Showing
22 changed files
with
1,043 additions
and
167 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.