Skip to content

Commit

Permalink
Add force io pool threads (ydb-platform#1523)
Browse files Browse the repository at this point in the history
* add force io pool threads

* add force_io_pool_threads to cfg
  • Loading branch information
kruall authored and vporyadke committed Feb 8, 2024
1 parent 9726bdc commit 074c379
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ydb/core/driver_lib/run/auto_config_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ namespace NKikimr::NAutoConfigInitializer {
auto *executor = executors[poolIdx];
if (names[poolIdx] == TASPools::IOPoolName) {
executor->SetType(NKikimrConfig::TActorSystemConfig::TExecutor::IO);
executor->SetThreads(GetIOThreadCount(cpuCount));
ui32 ioThreadCount = GetIOThreadCount(cpuCount);
if (config->HasForceIOPoolThreads()) {
ioThreadCount = config->GetForceIOPoolThreads();
}
executor->SetThreads(ioThreadCount);
executor->SetName(names[poolIdx]);
continue;
}
Expand Down
1 change: 1 addition & 0 deletions ydb/core/protos/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ message TActorSystemConfig {
// Used only with UseAutoConfig;
optional uint32 CpuCount = 13;
optional ENodeType NodeType = 14 [default = COMPUTE];
optional uint32 ForceIOPoolThreads = 17;

optional bool MonitorStuckActors = 15;
optional EActorSystemProfile ActorSystemProfile = 16;
Expand Down
1 change: 1 addition & 0 deletions ydb/tools/cfg/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def __init__(self, template, walle_provider, validator=None, database=None):
self.use_auto_config = self.__cluster_description.get("use_auto_config", False)
self.static_cpu_count = self.__cluster_description.get("static_cpu_count", 20)
self.dynamic_cpu_count = self.__cluster_description.get("dynamic_cpu_count", 8)
self.force_io_pool_threads = self.__cluster_description.get("force_io_pool_threads", None)
self.blob_storage_config = self.__cluster_description.get("blob_storage_config")
self.pdisk_key_config = self.__cluster_description.get("pdisk_key_config", {})
if not self.need_txt_files and not self.use_new_style_kikimr_cfg:
Expand Down
1 change: 1 addition & 0 deletions ydb/tools/cfg/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ def make_configure_request(self, domain):
if self._cluster_details.use_auto_config:
app_config.ActorSystemConfig.CpuCount = self._cluster_details.dynamic_cpu_count
app_config.ActorSystemConfig.NodeType = app_config.ActorSystemConfig.ENodeType.Value('COMPUTE')
app_config.ActorSystemConfig.ForceIOPoolThreads = self._cluster_details.force_io_pool_threads
action.AddConfigItem.ConfigItem.Config.CopyFrom(app_config)
action.AddConfigItem.EnableAutoSplit = True

Expand Down
1 change: 1 addition & 0 deletions ydb/tools/cfg/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"type": "string",
"enum": NodeType.all_node_type_names(),
},
"force_io_pool_threads": {"type": "integer"},
},
"additionalProperties": False,
}
Expand Down

0 comments on commit 074c379

Please sign in to comment.