Skip to content

Commit

Permalink
TotalCpuLimitPercentPerNode has been added to FQ WM (#13768) (#13782)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorooleg authored Jan 23, 2025
1 parent 9065dc3 commit 7cae7ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,15 @@ class TSynchronizeScopeActor : public NActors::TActorBootstrapped<TSynchronizeSc
CREATE RESOURCE POOL `{resource_pool_name}` WITH (
CONCURRENT_QUERY_LIMIT="{concurrent_query_limit}",
QUEUE_SIZE="{queue_size}",
DATABASE_LOAD_CPU_THRESHOLD="{database_load_cpu_threshold}"
DATABASE_LOAD_CPU_THRESHOLD="{database_load_cpu_threshold}",
TOTAL_CPU_LIMIT_PERCENT_PER_NODE="{total_cpu_limit_percent_per_node}"
);
)",
"resource_pool_name"_a = resourcePool.GetName(),
"concurrent_query_limit"_a = resourcePool.GetConcurrentQueryLimit(),
"queue_size"_a = resourcePool.GetQueueSize(),
"database_load_cpu_threshold"_a = resourcePool.GetDatabaseLoadCpuThreshold()));
"database_load_cpu_threshold"_a = resourcePool.GetDatabaseLoadCpuThreshold(),
"total_cpu_limit_percent_per_node"_a = resourcePool.GetTotalCpuLimitPercentPerNode()));
})
.Subscribe([actorSystem = TActivationContext::ActorSystem(), self = SelfId(), i](const NYdb::TAsyncStatus& future) {
actorSystem->Send(self, new TEvYdbCompute::TEvCreateResourcePoolResponse(ExtractStatus(future)), 0, i);
Expand Down Expand Up @@ -663,13 +665,16 @@ class TSynchronizeScopeActor : public NActors::TActorBootstrapped<TSynchronizeSc
ALTER RESOURCE POOL `{resource_pool_name}` SET (
CONCURRENT_QUERY_LIMIT="{concurrent_query_limit}",
QUEUE_SIZE="{queue_size}",
DATABASE_LOAD_CPU_THRESHOLD="{database_load_cpu_threshold}"
DATABASE_LOAD_CPU_THRESHOLD="{database_load_cpu_threshold}",
TOTAL_CPU_LIMIT_PERCENT_PER_NODE="{total_cpu_limit_percent_per_node}"
);
)",
"resource_pool_name"_a = resourcePool.GetName(),
"concurrent_query_limit"_a = resourcePool.GetConcurrentQueryLimit(),
"queue_size"_a = resourcePool.GetQueueSize(),
"database_load_cpu_threshold"_a = resourcePool.GetDatabaseLoadCpuThreshold()));
"database_load_cpu_threshold"_a = resourcePool.GetDatabaseLoadCpuThreshold(),
"total_cpu_limit_percent_per_node"_a = resourcePool.GetTotalCpuLimitPercentPerNode()
));
})
.Subscribe([actorSystem = TActivationContext::ActorSystem(), self = SelfId(), index](const NYdb::TAsyncStatus& future) {
actorSystem->Send(self, new TEvYdbCompute::TEvCreateResourcePoolResponse(ExtractStatus(future)), 0, index);
Expand Down
1 change: 1 addition & 0 deletions ydb/core/fq/libs/config/protos/compute.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message TWorkloadManagerConfig {
int32 ConcurrentQueryLimit = 2;
int32 QueueSize = 3;
double DatabaseLoadCpuThreshold = 4;
double TotalCpuLimitPercentPerNode = 5;
}

bool Enable = 1;
Expand Down

0 comments on commit 7cae7ed

Please sign in to comment.