Skip to content

Commit e74bb8c

Browse files
authored
chore: update task queue fiber priority to high (#5722)
TaskQueue is used to process callbacks from the requests. The hypothesis is that increasing its priority, we will reduce P99 latency of tasks that are being starved by other fibers. Signed-off-by: Roman Gershman <[email protected]>
1 parent 559f165 commit e74bb8c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/core/task_queue.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include "base/logging.h"
1010

1111
using namespace std;
12+
using namespace util::fb2;
13+
1214
namespace dfly {
1315

1416
__thread unsigned TaskQueue::blocked_submitters_ = 0;
@@ -25,7 +27,8 @@ void TaskQueue::Start(std::string_view base_name) {
2527
CHECK(!fb.IsJoinable());
2628

2729
string name = absl::StrCat(base_name, "/", i);
28-
fb = util::fb2::Fiber(name, [this] { queue_.Run(); });
30+
fb =
31+
Fiber(Fiber::Opts{.priority = FiberPriority::HIGH, .name = name}, [this] { queue_.Run(); });
2932
}
3033
}
3134

0 commit comments

Comments
 (0)