Skip to content

Commit

Permalink
call SetBackgroundThreads to set size of threadpool for compactions a…
Browse files Browse the repository at this point in the history
…nd flushes

fbshipit-source-id: 9c0b7b1f220
  • Loading branch information
mdcallag authored and inikep committed Sep 1, 2021
1 parent b9d63ad commit d2b4a4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,10 @@ static int rocksdb_init_func(void *p)
}

rocksdb::Options main_opts(db_opts, default_cf_opts);
main_opts.env->SetBackgroundThreads(main_opts.max_background_flushes,
rocksdb::Env::Priority::HIGH);
main_opts.env->SetBackgroundThreads(main_opts.max_background_compactions,
rocksdb::Env::Priority::LOW);
status= rocksdb::DB::Open(main_opts, rocksdb_db_name, cf_descr,
&cf_handles, &rdb);

Expand Down

0 comments on commit d2b4a4d

Please sign in to comment.