From 25dbf0875f9d33f09617c961c06dee9b00bd7ed2 Mon Sep 17 00:00:00 2001 From: Chunsong Feng Date: Tue, 28 Jun 2022 01:54:41 +0000 Subject: [PATCH] msg/async: Supports the load balancing feature Periodically collects load statistics. When the load imbalance exceeds the threashold, selects a connection of the worker thread with the highest load and migrates the connection to the worker thread with lowest load. Signed-off-by: Chunsong Feng --- src/common/options.cc | 12 +++++ src/msg/async/AsyncConnection.cc | 75 ++++++++++++++++++++++++-- src/msg/async/AsyncConnection.h | 13 ++++- src/msg/async/ProtocolV1.cc | 14 +++-- src/msg/async/ProtocolV2.cc | 13 +++-- src/msg/async/Stack.cc | 92 ++++++++++++++++++++++++++++++++ src/msg/async/Stack.h | 44 +++++++++++++++ 7 files changed, 251 insertions(+), 12 deletions(-) diff --git a/src/common/options.cc b/src/common/options.cc index 2f28123ba5..f615beeec4 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1153,6 +1153,18 @@ std::vector