Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-26021 [6/6]: Limit #checkpoint items flushed in a single batch
Expand the previous limiting of flusher batch size to also limit the number of items from the Checkpoint Manager. In the case of Checkpoint items, we cannot arbitrarily "cut" the batch in the middle of a checkpoint - as that would result in an inconsistent state (non-checkpoint boundary) being written in the couchstore snapshow. In the event of a crash / restart that wouldn't be a valid state. This is implemented by adding a new CheckpointManager::getItemsForCursor() method; which differs from the existing get*All*ItemsForCursor() in that it takes an approximate limit argument. Note this is approximate as we only split the batch at a checkpoint boundary - the "limit" specifies that we will finish visiting the current checkpoint, but not visit the next. Results in the following changes to VBucketBench/FlushVBucket - note reduction in PeakFlushBytes (from 740M to 7.5M); and average bytes per item (from 775 to 7) at larger DWQ sizes: Before: Run on (8 X 2300 MHz CPU s) 2018-02-16 17:23:25 ----------------------------------------------------------------------------------------- Benchmark Time CPU Iterations UserCounters...----------------------------------------------------------------------------------------- VBucketBench/FlushVBucket/1 438175 ns 319992 ns 2239 PeakBytesPerItem=175.266k PeakFlushBytes=175.266k 3.05183k items/s VBucketBench/FlushVBucket/10 537116 ns 365452 ns 2042 PeakBytesPerItem=18.1953k PeakFlushBytes=181.961k 26.722k items/s VBucketBench/FlushVBucket/100 928924 ns 724770 ns 1013 PeakBytesPerItem=2.82715k PeakFlushBytes=282.727k 134.741k items/s VBucketBench/FlushVBucket/1000 4414461 ns 4079710 ns 176 PeakBytesPerItem=1000 PeakFlushBytes=977.438k 239.371k items/s VBucketBench/FlushVBucket/10000 44486851 ns 43265875 ns 16 PeakBytesPerItem=781 PeakFlushBytes=7.45735M 225.712k items/s VBucketBench/FlushVBucket/100000 429518562 ns 423825500 ns 2 PeakBytesPerItem=759 PeakFlushBytes=72.427M 230.416k items/s VBucketBench/FlushVBucket/1000000 4025349877 ns 3942721000 ns 1 PeakBytesPerItem=775 PeakFlushBytes=740.04M 247.687k items/s After: Run on (8 X 2300 MHz CPU s) 2018-02-16 17:19:51 ----------------------------------------------------------------------------------------- Benchmark Time CPU Iterations UserCounters...----------------------------------------------------------------------------------------- VBucketBench/FlushVBucket/1 479525 ns 340742 ns 2023 PeakBytesPerItem=175.281k PeakFlushBytes=175.281k 2.86599k items/s VBucketBench/FlushVBucket/10 526072 ns 375763 ns 1868 PeakBytesPerItem=18.1943k PeakFlushBytes=181.945k 25.9888k items/s VBucketBench/FlushVBucket/100 981275 ns 721473 ns 1003 PeakBytesPerItem=2.82617k PeakFlushBytes=282.711k 135.357k items/s VBucketBench/FlushVBucket/1000 4459568 ns 4118994 ns 173 PeakBytesPerItem=1000 PeakFlushBytes=977.438k 237.088k items/s VBucketBench/FlushVBucket/10000 45353759 ns 44451063 ns 16 PeakBytesPerItem=781 PeakFlushBytes=7.45737M 219.694k items/s VBucketBench/FlushVBucket/100000 414823038 ns 406181000 ns 2 PeakBytesPerItem=137 PeakFlushBytes=13.0832M 240.425k items/s VBucketBench/FlushVBucket/1000000 3116659340 ns 3000999000 ns 1 PeakBytesPerItem=7 PeakFlushBytes=7.57903M 325.412k items/s Change-Id: I2d3c618557f3f5928879f09f7cba58968abd04db Reviewed-on: http://review.couchbase.org/86391 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
- Loading branch information
Showing
7 changed files
with
250 additions
and
66 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
Oops, something went wrong.