rocksdb/include/rocksdb
Ari Ekmekji 3c37b3cccd Determine boundaries of subcompactions
Summary:
Up to this point, the subcompactions that make up a compaction
job have been divided based on the key range of the L1 files, and each
subcompaction has handled the key range of only one file. However
DBOption.max_subcompactions allows the user to designate how many
subcompactions at most to perform. This patch updates the
CompactionJob::GetSubcompactionBoundaries() to determine these
divisions accordingly based on that option and other input/system factors.

The current approach orders the starting and/or ending keys of certain
compaction input files and then generates a histogram to approximate the
size covered by the key range between each consecutive pair of keys. Then
it groups these ranges into groups so that the sizes are approximately equal
to one another. The approach has also been adapted to work for universal
compaction as well instead of just for level-based compaction as it was before.

These subcompactions are then executed in parallel by locally spawning
threads, one for each. The results are then aggregated and the compaction
completed.

Test Plan: make all && make check

Reviewers: yhchiang, anthony, igor, noetzli, sdong

Reviewed By: sdong

Subscribers: MarkCallaghan, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D43269
2015-09-10 13:50:00 -07:00
..
utilities Transaction stats 2015-09-09 13:35:53 -07:00
c.h Deprecate CompactionFilterV2 2015-07-17 18:59:11 +02:00
cache.h Add Cache.GetPinnedUsageUsage() 2015-06-18 13:56:31 -07:00
compaction_filter.h Add missing include to use std::unique_ptr 2014-08-23 13:02:21 -04:00
compaction_job_stats.h [Parallel L0-L1 Compaction Prep]: Giving Subcompactions Their Own State 2015-08-18 11:06:23 -07:00
comparator.h Added Equal method to Comparator interface 2015-09-08 15:30:49 -07:00
convenience.h ColumnFamilyOptions serialization / deserialization. 2015-08-26 16:13:56 -07:00
db.h Correct the comment for GetProperty() API. 2015-08-25 16:45:23 -07:00
delete_scheduler.h Rate limit deletes issued by DestroyDB 2015-08-19 15:02:17 -07:00
env.h Make WinEnv::NowMicros return system time 2015-09-02 11:12:07 -07:00
experimental.h Implement DB::PromoteL0 method 2015-04-23 12:10:36 -07:00
filter_policy.h Implement full filter for block based table. 2014-09-08 10:37:05 -07:00
flush_block_policy.h move block based table related options BlockBasedTableOptions 2014-08-25 14:22:05 -07:00
immutable_options.h ReadaheadRandomAccessFile -- userspace readahead 2015-08-26 15:25:59 -07:00
iostats_context.h Add options.compaction_measure_io_stats to print write I/O stats in compactions 2015-08-13 16:52:26 -07:00
iterator.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
ldb_tool.h [RocksDB] allow LDB tool to have customized key formatter 2014-06-23 15:35:40 -07:00
listener.h Add largest sequence to FlushJobInfo 2015-06-11 15:22:22 -07:00
memtablerep.h Allow GetApproximateSize() to include mem table size if it is skip list memtable 2015-06-16 18:13:23 -07:00
merge_operator.h Better CompactionJob testing 2015-08-07 21:59:51 -07:00
metadata.h Windows Port from Microsoft 2015-07-01 16:13:56 -07:00
options.h Determine boundaries of subcompactions 2015-09-10 13:50:00 -07:00
perf_context.h Ensure Windows build w/o port/port.h in public headers 2015-07-16 12:10:16 -07:00
perf_level.h more times in perf_context and iostats_context 2015-06-02 02:07:58 -07:00
rate_limiter.h Replace BackupRateLimiter with GenericRateLimiter 2015-09-03 17:00:09 -07:00
slice_transform.h Unaddressed comment in previous diff. Change only in code comments. 2015-01-30 16:07:35 -08:00
slice.h Commit both PR and internal code review changes 2015-07-07 16:58:20 -07:00
snapshot.h simple ManagedSnapshot wrapper 2015-08-06 17:59:05 -07:00
sst_dump_tool.h Dump routine to BlockBasedTableReader 2014-12-23 13:24:07 -08:00
statistics.h Determine boundaries of subcompactions 2015-09-10 13:50:00 -07:00
status.h Support static Status messages 2015-08-31 16:13:29 -07:00
table_properties.h Expose per-level aggregated table properties via GetProperty() 2015-08-25 12:03:54 -07:00
table.h Move rate_limiter, write buffering, most perf context instrumentation and most random kill out of Env 2015-07-17 16:58:18 -07:00
thread_status.h Deprecate CompactionFilterV2 2015-07-17 18:59:11 +02:00
transaction_log.h "make format" against last 10 commits 2015-07-13 13:50:18 -07:00
types.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
universal_compaction.h Enabling trivial move in universal compaction 2015-07-07 14:18:55 -07:00
version.h Release RocksDB 4.0.0 2015-09-09 16:01:03 -07:00
write_batch_base.h WriteBatch Save Points 2015-07-29 16:54:23 -07:00
write_batch.h WriteBatch Save Points 2015-07-29 16:54:23 -07:00