Skip to content

Commit

Permalink
reactor: change shares for default IO class from 1 to 200
Browse files Browse the repository at this point in the history
The number of shares is supposed to be set in the 1-1000 range,
and user-defined IO classes have shares on the order of hundreds
in practice.

Therefore, 1 share is not a sane default, because the default class
can very easily be starved by accident.
We have seen in practice for example in scylladb/scylladb#13753.

(cherry picked from commit e45cef9)
  • Loading branch information
michoecho authored and avikivity committed Jun 21, 2023
1 parent 32ab15c commit 29a0e64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/reactor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ reactor::reap_kernel_completions() {

const io_priority_class& default_priority_class() {
static thread_local auto shard_default_class = [] {
return io_priority_class::register_one("default", 1);
return io_priority_class::register_one("default", 200);
}();
return shard_default_class;
}
Expand Down

0 comments on commit 29a0e64

Please sign in to comment.