Skip to content

Commit

Permalink
raftstore: enable async-io by default. (tikv#16615)
Browse files Browse the repository at this point in the history
close tikv#16614, ref pingcap/tidb#51585

Enable `async-io` by default with changing the setting `raftstore.store-io-pool-size` from 0 to 1.

Signed-off-by: lucasliang <[email protected]>
Signed-off-by: dbsid <[email protected]>
  • Loading branch information
LykxSassinator authored and dbsid committed Mar 24, 2024
1 parent 84dc9d9 commit 21ba3bb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/raftstore/src/store/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ impl Default for Config {
local_read_batch_size: 1024,
apply_batch_system: BatchSystemConfig::default(),
store_batch_system: BatchSystemConfig::default(),
store_io_pool_size: 0,
store_io_pool_size: 1,
store_io_notify_capacity: 40960,
future_poll_size: 1,
hibernate_regions: true,
Expand Down
2 changes: 1 addition & 1 deletion etc/config-template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@

## Use how many threads to handle raft io tasks
## If it is 0, it means io tasks are handled in store threads.
# store-io-pool-size = 0
# store-io-pool-size = 1

## When the size of raft db writebatch exceeds this value, write will be triggered.
# raft-write-size-limit = "1MB"
Expand Down
1 change: 1 addition & 0 deletions tests/integrations/config/dynamic/raftstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ fn test_update_raftstore_io_config() {
// Start from SYNC mode.
{
let (mut resize_config, _dir) = TikvConfig::with_tmp().unwrap();
resize_config.raft_store.store_io_pool_size = 0; // SYNC mode
resize_config.validate().unwrap();
let (cfg_controller, _, _, mut system) = start_raftstore(resize_config, &_dir);

Expand Down

0 comments on commit 21ba3bb

Please sign in to comment.