Commit 618f660
Configurable multiscan IO coalescing threshold (facebook#13886)
Summary:
Add a new filed `io_coalesce_threshold` to MultiScanArgs to make IO coalescing threshold configurable.
Pull Request resolved: facebook#13886
Test Plan:
db_bench showing less IO requests with higher io_coalesce_threshold
```
Single L0 file, iterator uses BlockBasedTableIterator directly, skipping LevelIterator
DB Set up: ./db_bench --benchmarks="fillseq,compact" --disable_wal=1 --threads=1 --num_levels=1 --compaction_style=2 --fifo_compaction_max_table_files_size_mb=1000 --write_buffer_size=268435456
./db_bench --db="/tmp/rocksdbtest-543376/dbbench" --use_existing_db=1 --benchmarks=multiscan --disable_auto_compactions=1 --seek_nexts=100 --threads=32 --duration=10 --statistics=1 --use_direct_reads=1 ..
--multiscan_coalesce_threshold=0
rocksdb.non.last.level.read.bytes COUNT : 54591304136
rocksdb.non.last.level.read.count COUNT : 7680204
multiscan : 397.197 micros/op 79401 ops/sec 10.377 seconds 823968 operations; (multscans:24999)
--multiscan_coalesce_threshold=16384
rocksdb.non.last.level.read.bytes COUNT : 95960989272
rocksdb.non.last.level.read.count COUNT : 912008
multiscan : 389.099 micros/op 81064 ops/sec 10.312 seconds 835968 operations; (multscans:25999)
--multiscan_coalesce_threshold=163840
rocksdb.non.last.level.read.bytes COUNT : 98805008718
rocksdb.non.last.level.read.count COUNT : 827893
multiscan : 392.831 micros/op 80357 ops/sec 10.353 seconds 831968 operations; (multscans:25999)
DB with multiple files in a level, iterator will use LevelIterator
./db_bench --benchmarks="fillseq,compact" --disable_wal=1 --threads=1 --num_levels=6 --num=10000000
./db_bench --db="/tmp/rocksdbtest-543376/dbbench" --use_existing_db=1 --benchmarks=multiscan --disable_auto_compactions=1 --seek_nexts=100 --threads=32 --duration=10 --statistics=1 --use_direct_reads=1 --num=10000000
--multiscan_coalesce_threshold=0
multiscan : 1161.734 micros/op 26995 ops/sec 10.667 seconds 287968 operations; (multscans:8999)
rocksdb.non.last.level.read.bytes COUNT : 23917753523
rocksdb.non.last.level.read.count COUNT : 2868907
--multiscan_coalesce_threshold=16384
rocksdb.non.last.level.read.bytes COUNT : 35022281853
rocksdb.non.last.level.read.count COUNT : 287375
multiscan : 1195.336 micros/op 26265 ops/sec 10.850 seconds 284968 operations; (multscans:8999)
```
Reviewed By: anand1976
Differential Revision: D80381441
Pulled By: cbi42
fbshipit-source-id: 57cc67df4a808e27c3a48ddf3ef6907bec131ee91 parent 84f8144 commit 618f660
5 files changed
Lines changed: 21 additions & 6 deletions
File tree
- db
- include/rocksdb
- table/block_based
- tools
- unreleased_history/new_features
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1147 | 1151 | | |
1148 | 1152 | | |
1149 | 1153 | | |
| |||
6491 | 6495 | | |
6492 | 6496 | | |
6493 | 6497 | | |
6494 | | - | |
| 6498 | + | |
6495 | 6499 | | |
6496 | 6500 | | |
6497 | 6501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1789 | 1789 | | |
1790 | 1790 | | |
1791 | 1791 | | |
| 1792 | + | |
1792 | 1793 | | |
1793 | 1794 | | |
1794 | | - | |
| 1795 | + | |
| 1796 | + | |
1795 | 1797 | | |
1796 | 1798 | | |
1797 | 1799 | | |
1798 | 1800 | | |
1799 | 1801 | | |
| 1802 | + | |
1800 | 1803 | | |
1801 | 1804 | | |
1802 | 1805 | | |
1803 | 1806 | | |
1804 | 1807 | | |
1805 | 1808 | | |
1806 | 1809 | | |
| 1810 | + | |
1807 | 1811 | | |
1808 | 1812 | | |
1809 | 1813 | | |
| |||
1843 | 1847 | | |
1844 | 1848 | | |
1845 | 1849 | | |
| 1850 | + | |
| 1851 | + | |
1846 | 1852 | | |
1847 | 1853 | | |
1848 | 1854 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | 1070 | | |
1074 | 1071 | | |
1075 | 1072 | | |
| |||
1080 | 1077 | | |
1081 | 1078 | | |
1082 | 1079 | | |
1083 | | - | |
| 1080 | + | |
| 1081 | + | |
1084 | 1082 | | |
1085 | 1083 | | |
1086 | 1084 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1847 | 1847 | | |
1848 | 1848 | | |
1849 | 1849 | | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
1850 | 1854 | | |
1851 | 1855 | | |
1852 | 1856 | | |
| |||
6413 | 6417 | | |
6414 | 6418 | | |
6415 | 6419 | | |
| 6420 | + | |
6416 | 6421 | | |
6417 | 6422 | | |
6418 | 6423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments