Use OS prefetching during bulk import

This commit is contained in:
Roman Zeyde 2018-08-07 15:10:28 +03:00
parent 4ee5aba5fe
commit 85edb2cc2c
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -50,6 +50,7 @@ impl DBStore {
db_opts.set_target_file_size_base(128 << 20); db_opts.set_target_file_size_base(128 << 20);
db_opts.set_write_buffer_size(256 << 20); db_opts.set_write_buffer_size(256 << 20);
db_opts.set_disable_auto_compactions(opts.bulk_import); // for initial bulk load db_opts.set_disable_auto_compactions(opts.bulk_import); // for initial bulk load
db_opts.set_advise_random_on_open(!opts.bulk_import); // bulk load uses sequential I/O
let mut block_opts = rocksdb::BlockBasedOptions::default(); let mut block_opts = rocksdb::BlockBasedOptions::default();
block_opts.set_block_size(1 << 20); block_opts.set_block_size(1 << 20);