diff --git a/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp b/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp index 81395c427b79..1d2b3950c77a 100644 --- a/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp +++ b/ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp @@ -210,6 +210,19 @@ namespace NKikimr::NStorage { } } + vdiskConfig->BalancingEnableSend = Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetEnableSend(); + vdiskConfig->BalancingEnableDelete = Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetEnableDelete(); + vdiskConfig->BalancingBalanceOnlyHugeBlobs = Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetBalanceOnlyHugeBlobs(); + vdiskConfig->BalancingJobGranularity = TDuration::MicroSeconds(Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetJobGranularityUs()); + vdiskConfig->BalancingBatchSize = Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetBatchSize(); + vdiskConfig->BalancingMaxToSendPerEpoch = Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetMaxToSendPerEpoch(); + vdiskConfig->BalancingMaxToDeletePerEpoch = Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetMaxToDeletePerEpoch(); + vdiskConfig->BalancingReadBatchTimeout = TDuration::MilliSeconds(Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetReadBatchTimeoutMs()); + vdiskConfig->BalancingSendBatchTimeout = TDuration::MilliSeconds(Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetSendBatchTimeoutMs()); + vdiskConfig->BalancingRequestBlobsOnMainTimeout = TDuration::MilliSeconds(Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetRequestBlobsOnMainTimeoutMs()); + vdiskConfig->BalancingDeleteBatchTimeout = TDuration::MilliSeconds(Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetDeleteBatchTimeoutMs()); + vdiskConfig->BalancingEpochTimeout = TDuration::MilliSeconds(Cfg->BlobStorageConfig.GetVDiskBalancingConfig().GetEpochTimeoutMs()); + // issue initial report to whiteboard before creating actor to avoid races Send(WhiteboardId, new NNodeWhiteboard::TEvWhiteboard::TEvVDiskStateUpdate(vdiskId, groupInfo->GetStoragePoolName(), vslotId.PDiskId, vslotId.VDiskSlotId, pdiskGuid, kind, donorMode, whiteboardInstanceGuid, std::move(donors))); diff --git a/ydb/core/blobstorage/ut_blobstorage/balancing.cpp b/ydb/core/blobstorage/ut_blobstorage/balancing.cpp index cba5903c69e2..d7e1937ccebd 100644 --- a/ydb/core/blobstorage/ut_blobstorage/balancing.cpp +++ b/ydb/core/blobstorage/ut_blobstorage/balancing.cpp @@ -31,7 +31,12 @@ struct TTestEnv { .NodeCount = nodeCount, .VDiskReplPausedAtStart = false, .Erasure = erasure, - .FeatureFlags = MakeFeatureFlags(), + .ConfigPreprocessor = [](ui32, TNodeWardenConfig& conf) { + auto* balancingConf = conf.BlobStorageConfig.MutableVDiskBalancingConfig(); + balancingConf->SetEnableSend(true); + balancingConf->SetEnableDelete(true); + balancingConf->SetBalanceOnlyHugeBlobs(false); + }, }) { Env.CreateBoxAndPool(1, 1); @@ -46,12 +51,6 @@ struct TTestEnv { } } - static TFeatureFlags MakeFeatureFlags() { - TFeatureFlags res; - res.SetUseVDisksBalancing(true); - return res; - } - static TString PrepareData(const ui32 dataLen, const ui32 start) { TString data(Reserve(dataLen)); for (ui32 i = 0; i < dataLen; ++i) { diff --git a/ydb/core/blobstorage/vdisk/balance/balancing_actor.cpp b/ydb/core/blobstorage/vdisk/balance/balancing_actor.cpp index 6307366cc6b6..a9363d176d0a 100644 --- a/ydb/core/blobstorage/vdisk/balance/balancing_actor.cpp +++ b/ydb/core/blobstorage/vdisk/balance/balancing_actor.cpp @@ -87,6 +87,9 @@ namespace NBalancing { /////////////////////////////////////////////////////////////////////////////////////////// void ContinueBalancing() { + Ctx->MonGroup.PlannedToSendOnMain() = SendOnMainParts.Data.size(); + Ctx->MonGroup.CandidatesToDelete() = TryDeleteParts.Data.size(); + if (SendOnMainParts.Empty() && TryDeleteParts.Empty()) { // no more parts to send or delete STLOG(PRI_INFO, BS_VDISK_BALANCING, BSVB03, VDISKP(Ctx->VCtx, "Balancing completed")); @@ -101,8 +104,6 @@ namespace NBalancing { void ScheduleJobQuant() { Ctx->MonGroup.ReplTokenAquired()++; - Ctx->MonGroup.PlannedToSendOnMain() = SendOnMainParts.Data.size(); - Ctx->MonGroup.CandidatesToDelete() = TryDeleteParts.Data.size(); // once repl token received, start balancing - waking up sender and deleter STLOG(PRI_INFO, BS_VDISK_BALANCING, BSVB02, VDISKP(Ctx->VCtx, "Schedule job quant"), @@ -125,57 +126,65 @@ namespace NBalancing { return; } + const auto& top = GInfo->GetTopology(); + TPartsCollectorMerger merger(top.GType); THPTimer timer; for (ui32 cnt = 0; It.Valid(); It.Next(), ++cnt) { - if (cnt % 100 == 99 && TDuration::Seconds(timer.Passed()) > JOB_GRANULARITY) { + if (cnt % 128 == 127 && TDuration::Seconds(timer.Passed()) > Ctx->Cfg.JobGranularity) { // actor should not block the thread for a long time, so we should yield - // STLOG(PRI_DEBUG, BS_VDISK_BALANCING, BSVB04, VDISKP(Ctx->VCtx, "Collect keys"), (collected, cnt), (passed, timer.Passed())); + STLOG(PRI_DEBUG, BS_VDISK_BALANCING, BSVB04, VDISKP(Ctx->VCtx, "Collect keys"), (collected, cnt), (passed, timer.Passed())); Send(SelfId(), new NActors::TEvents::TEvWakeup()); return; } - const auto& top = GInfo->GetTopology(); const auto& key = It.GetCurKey().LogoBlobID(); - TPartsCollectorMerger merger(top.GType); + if (Ctx->Cfg.BalanceOnlyHugeBlobs && !Ctx->HugeBlobCtx->IsHugeBlob(GInfo->Type, key, Ctx->MinREALHugeBlobInBytes)) { + // skip non huge blobs + continue; + } + + merger.Clear(); It.PutToMerger(&merger); auto [moveMask, delMask] = merger.Ingress.HandoffParts(&top, Ctx->VCtx->ShortSelfVDisk, key); - if (auto partsToSend = merger.Ingress.LocalParts(top.GType) & moveMask; !partsToSend.Empty() && SendOnMainParts.Size() < MAX_TO_SEND_PER_EPOCH) { - // collect parts to send on main - for (const auto& [parts, data]: merger.Parts) { - if (!(partsToSend & parts).Empty()) { - SendOnMainParts.Data.emplace_back(TPartInfo{ - .Key=It.GetCurKey().LogoBlobID(), - .PartsMask=parts, - .PartData=data - }); + // collect parts to send on main + if (Ctx->Cfg.EnableSend && SendOnMainParts.Size() < Ctx->Cfg.MaxToSendPerEpoch) { + if (auto partsToSend = merger.Ingress.LocalParts(top.GType) & moveMask; !partsToSend.Empty()) { + for (const auto& [parts, data]: merger.Parts) { + if (!(partsToSend & parts).Empty()) { + SendOnMainParts.Data.emplace_back(TPartInfo{ + .Key=It.GetCurKey().LogoBlobID(), + .PartsMask=parts, + .PartData=data + }); + } } } } - if (auto partsToDelete = merger.Ingress.LocalParts(top.GType) & delMask; !partsToDelete.Empty() && TryDeleteParts.Size() < MAX_TO_DELETE_PER_EPOCH) { - // collect parts to delete - auto key = It.GetCurKey().LogoBlobID(); - for (ui8 partIdx = partsToDelete.FirstPosition(); partIdx < partsToDelete.GetSize(); partIdx = partsToDelete.NextPosition(partIdx)) { - TryDeleteParts.Data.emplace_back(TLogoBlobID(key, partIdx + 1)); - STLOG(PRI_DEBUG, BS_VDISK_BALANCING, BSVB10, VDISKP(Ctx->VCtx, "Delete"), (LogoBlobId, TryDeleteParts.Data.back().ToString())); - } + // collect parts to delete + if (Ctx->Cfg.EnableDelete && TryDeleteParts.Size() < Ctx->Cfg.MaxToDeletePerEpoch) { + if (auto partsToDelete = merger.Ingress.LocalParts(top.GType) & delMask; !partsToDelete.Empty()) { + auto key = It.GetCurKey().LogoBlobID(); + for (ui8 partIdx = partsToDelete.FirstPosition(); partIdx < partsToDelete.GetSize(); partIdx = partsToDelete.NextPosition(partIdx)) { + TryDeleteParts.Data.emplace_back(TLogoBlobID(key, partIdx + 1)); + STLOG(PRI_DEBUG, BS_VDISK_BALANCING, BSVB10, VDISKP(Ctx->VCtx, "Delete"), (LogoBlobId, TryDeleteParts.Data.back().ToString())); + } - for (const auto& [parts, data]: merger.Parts) { - if (!(partsToDelete & parts).Empty()) { - TryDeletePartsFullData[key].emplace_back(TPartInfo{ - .Key=key, .PartsMask=parts, .PartData=data - }); + for (const auto& [parts, data]: merger.Parts) { + if (!(partsToDelete & parts).Empty()) { + TryDeletePartsFullData[key].emplace_back(TPartInfo{ + .Key=key, .PartsMask=parts, .PartData=data + }); + } } } } - merger.Clear(); - - if (SendOnMainParts.Size() >= MAX_TO_SEND_PER_EPOCH && TryDeleteParts.Size() >= MAX_TO_DELETE_PER_EPOCH) { + if (SendOnMainParts.Size() >= Ctx->Cfg.MaxToSendPerEpoch && TryDeleteParts.Size() >= Ctx->Cfg.MaxToDeletePerEpoch) { // reached the limit of parts to send and delete break; } @@ -192,11 +201,12 @@ namespace NBalancing { STLOG(PRI_INFO, BS_VDISK_BALANCING, BSVB04, VDISKP(Ctx->VCtx, "TEvCompleted"), (Type, ev->Type)); BatchManager.Handle(ev); - if (StartTime + EPOCH_TIMEOUT < TlsActivationContext->Now()) { + if (StartTime + Ctx->Cfg.EpochTimeout < TlsActivationContext->Now()) { Ctx->MonGroup.EpochTimeouts()++; Send(MakeBlobStorageReplBrokerID(), new TEvReleaseReplToken); STLOG(PRI_INFO, BS_VDISK_BALANCING, BSVB04, VDISKP(Ctx->VCtx, "Epoch timeout")); PassAway(); + return; } if (BatchManager.IsBatchCompleted()) { @@ -242,8 +252,8 @@ namespace NBalancing { void Handle(NActors::TEvents::TEvUndelivered::TPtr ev) { if (ev.Get()->Type == TEvReplToken::EventType) { - STLOG(PRI_WARN, BS_VDISK_BALANCING, BSVB06, VDISKP(Ctx->VCtx, "Ask repl token msg not delivered"), (SelfId, SelfId()), (PDiskId, Ctx->VDiskCfg->BaseInfo.PDiskId)); - ScheduleJobQuant(); + STLOG(PRI_ERROR, BS_VDISK_BALANCING, BSVB06, VDISKP(Ctx->VCtx, "Ask repl token msg not delivered"), (SelfId, SelfId()), (PDiskId, Ctx->VDiskCfg->BaseInfo.PDiskId)); + ContinueBalancing(); } } @@ -302,8 +312,8 @@ namespace NBalancing { , Ctx(ctx) , GInfo(ctx->GInfo) , It(Ctx->Snap.HullCtx, &Ctx->Snap.LogoBlobsSnap) - , SendOnMainParts(BATCH_SIZE) - , TryDeleteParts(BATCH_SIZE) + , SendOnMainParts(Ctx->Cfg.BatchSize) + , TryDeleteParts(Ctx->Cfg.BatchSize) , StartTime(TlsActivationContext->Now()) { } diff --git a/ydb/core/blobstorage/vdisk/balance/defs.h b/ydb/core/blobstorage/vdisk/balance/defs.h index 42cf3f477899..ba88ebfd984a 100644 --- a/ydb/core/blobstorage/vdisk/balance/defs.h +++ b/ydb/core/blobstorage/vdisk/balance/defs.h @@ -8,7 +8,27 @@ namespace NKikimr { + + struct TBalancingCfg { + bool EnableSend; + bool EnableDelete; + + bool BalanceOnlyHugeBlobs; + TDuration JobGranularity; + + ui64 BatchSize; + ui64 MaxToSendPerEpoch; + ui64 MaxToDeletePerEpoch; + + TDuration ReadBatchTimeout; + TDuration SendBatchTimeout; + TDuration RequestBlobsOnMainTimeout; + TDuration DeleteBatchTimeout; + TDuration EpochTimeout; + }; + struct TBalancingCtx { + const TBalancingCfg Cfg; TIntrusivePtr VCtx; TPDiskCtxPtr PDiskCtx; THugeBlobCtxPtr HugeBlobCtx; @@ -23,6 +43,7 @@ namespace NKikimr { ui32 MinREALHugeBlobInBytes; TBalancingCtx( + const TBalancingCfg& cfg, TIntrusivePtr vCtx, TPDiskCtxPtr pDiskCtx, THugeBlobCtxPtr hugeBlobCtx, @@ -32,7 +53,8 @@ namespace NKikimr { TIntrusivePtr gInfo, ui32 minREALHugeBlobInBytes ) - : VCtx(std::move(vCtx)) + : Cfg(cfg) + , VCtx(std::move(vCtx)) , PDiskCtx(std::move(pDiskCtx)) , HugeBlobCtx(std::move(hugeBlobCtx)) , SkeletonId(skeletonId) @@ -55,28 +77,11 @@ namespace NBalancing { std::variant PartData; }; - static constexpr ui32 SENDER_ID = 0; - static constexpr ui32 DELETER_ID = 1; - - static constexpr TDuration JOB_GRANULARITY = TDuration::MilliSeconds(1); - - static constexpr TDuration READ_BATCH_TIMEOUT = TDuration::Seconds(10); - static constexpr TDuration SEND_BATCH_TIMEOUT = TDuration::Seconds(10); - static constexpr TDuration REQUEST_BLOBS_ON_MAIN_BATCH_TIMEOUT = TDuration::Seconds(10); - static constexpr TDuration DELETE_BATCH_TIMEOUT = TDuration::Seconds(10); - static constexpr ui64 READ_TIMEOUT_TAG = 0; static constexpr ui64 SEND_TIMEOUT_TAG = 1; static constexpr ui64 REQUEST_TIMEOUT_TAG = 2; static constexpr ui64 DELETE_TIMEOUT_TAG = 3; - static constexpr ui32 BATCH_SIZE = 32; - - static constexpr ui32 MAX_TO_SEND_PER_EPOCH = 1000; - static constexpr ui32 MAX_TO_DELETE_PER_EPOCH = 1000; - static constexpr TDuration EPOCH_TIMEOUT = TDuration::Minutes(1); - - struct TEvBalancingSendPartsOnMain : TEventLocal { TEvBalancingSendPartsOnMain(const TVector& ids) : Ids(ids) diff --git a/ydb/core/blobstorage/vdisk/balance/deleter.cpp b/ydb/core/blobstorage/vdisk/balance/deleter.cpp index 5aba8e28fd0a..b6d576436385 100644 --- a/ydb/core/blobstorage/vdisk/balance/deleter.cpp +++ b/ydb/core/blobstorage/vdisk/balance/deleter.cpp @@ -186,7 +186,7 @@ namespace { PartsRequester.SendRequestsToCheckPartsOnMain(SelfId()); - Schedule(TDuration::Seconds(15), new NActors::TEvents::TEvWakeup(REQUEST_TIMEOUT_TAG)); // read timeout + Schedule(Ctx->Cfg.RequestBlobsOnMainTimeout, new NActors::TEvents::TEvWakeup(REQUEST_TIMEOUT_TAG)); // read timeout } void Handle(TEvBlobStorage::TEvVGetResult::TPtr ev) { @@ -248,7 +248,7 @@ namespace { PartsDeleter.DeleteParts(SelfId(), PartsRequester.GetResult()); - Schedule(TDuration::Seconds(15), new NActors::TEvents::TEvWakeup(DELETE_TIMEOUT_TAG)); // delete timeout + Schedule(Ctx->Cfg.DeleteBatchTimeout, new NActors::TEvents::TEvWakeup(DELETE_TIMEOUT_TAG)); // delete timeout } void HandleDelLogoBlobResult(TEvDelLogoBlobDataSyncLogResult::TPtr ev) { @@ -269,7 +269,7 @@ namespace { } void PassAway() override { - Send(NotifyId, new NActors::TEvents::TEvCompleted(DELETER_ID)); + Send(NotifyId, new NActors::TEvents::TEvCompleted()); STLOG(PRI_INFO, BS_VDISK_BALANCING, BSVB32, VDISKP(Ctx->VCtx, "TDeleter::PassAway")); TActorBootstrapped::PassAway(); } diff --git a/ydb/core/blobstorage/vdisk/balance/sender.cpp b/ydb/core/blobstorage/vdisk/balance/sender.cpp index 5bdd965fe03b..1fe923336c99 100644 --- a/ydb/core/blobstorage/vdisk/balance/sender.cpp +++ b/ydb/core/blobstorage/vdisk/balance/sender.cpp @@ -249,7 +249,7 @@ namespace { return; } - Schedule(TDuration::Seconds(15), new NActors::TEvents::TEvWakeup(READ_TIMEOUT_TAG)); // read timeout + Schedule(Ctx->Cfg.ReadBatchTimeout, new NActors::TEvents::TEvWakeup(READ_TIMEOUT_TAG)); // read timeout } void Handle(NPDisk::TEvChunkReadResult::TPtr ev) { @@ -293,7 +293,7 @@ namespace { Sender.SendPartsOnMain(SelfId(), Reader.GetResult()); - Schedule(TDuration::Seconds(15), new NActors::TEvents::TEvWakeup(SEND_TIMEOUT_TAG)); // send timeout + Schedule(Ctx->Cfg.SendBatchTimeout, new NActors::TEvents::TEvWakeup(SEND_TIMEOUT_TAG)); // send timeout } template @@ -314,7 +314,7 @@ namespace { } void PassAway() override { - Send(NotifyId, new NActors::TEvents::TEvCompleted(SENDER_ID)); + Send(NotifyId, new NActors::TEvents::TEvCompleted()); STLOG(PRI_INFO, BS_VDISK_BALANCING, BSVB28, VDISKP(Ctx->VCtx, "TSender::PassAway")); TActorBootstrapped::PassAway(); } diff --git a/ydb/core/blobstorage/vdisk/balance/utils.cpp b/ydb/core/blobstorage/vdisk/balance/utils.cpp index 0a99ad83dd20..5985ff4ed63d 100644 --- a/ydb/core/blobstorage/vdisk/balance/utils.cpp +++ b/ydb/core/blobstorage/vdisk/balance/utils.cpp @@ -76,8 +76,8 @@ namespace NBalancing { } void TPartsCollectorMerger::Clear() { + Ingress = TIngress(); Parts.clear(); - Parts.resize(GType.TotalPartCount()); } } // NBalancing diff --git a/ydb/core/blobstorage/vdisk/common/vdisk_config.h b/ydb/core/blobstorage/vdisk/common/vdisk_config.h index 84f791ae2a48..db9b72d92bd5 100644 --- a/ydb/core/blobstorage/vdisk/common/vdisk_config.h +++ b/ydb/core/blobstorage/vdisk/common/vdisk_config.h @@ -221,6 +221,20 @@ namespace NKikimr { TControlWrapper DefaultHugeGarbagePerMille; bool UseActorSystemTimeInBSQueue = false; + ///////////// BALANCING SETTINGS //////////////////// + bool BalancingEnableSend; + bool BalancingEnableDelete; + TDuration BalancingJobGranularity; + bool BalancingBalanceOnlyHugeBlobs; + ui64 BalancingBatchSize; + ui64 BalancingMaxToSendPerEpoch; + ui64 BalancingMaxToDeletePerEpoch; + TDuration BalancingReadBatchTimeout; + TDuration BalancingSendBatchTimeout; + TDuration BalancingRequestBlobsOnMainTimeout; + TDuration BalancingDeleteBatchTimeout; + TDuration BalancingEpochTimeout; + ///////////// COST METRICS SETTINGS //////////////// bool UseCostTracker = true; TCostMetricsParametersByMedia CostMetricsParametersByMedia; diff --git a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp index 0eae700fe6e6..f1793bd7c997 100644 --- a/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp +++ b/ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp @@ -1930,7 +1930,7 @@ namespace NKikimr { // create Hull Hull = std::make_shared(Db->LsnMngr, PDiskCtx, Db->SkeletonID, - Config->FeatureFlags.GetUseVDisksBalancing(), std::move(*ev->Get()->Uncond), + Config->BalancingEnableDelete, std::move(*ev->Get()->Uncond), ctx.ExecutorThread.ActorSystem, Config->BarrierValidation); ActiveActors.Insert(Hull->RunHullServices(Config, HullLogCtx, Db->SyncLogFirstLsnToKeep, Db->LoggerID, Db->LogCutterID, ctx), ctx, NKikimrServices::BLOBSTORAGE); @@ -2556,15 +2556,30 @@ namespace NKikimr { // don't run balancing for the static group return; } - if (!Config->FeatureFlags.GetUseVDisksBalancing() || VCtx->Top->GType.GetErasure() == TErasureType::ErasureMirror3of4) { + bool balancingEnabled = Config->BalancingEnableSend || Config->BalancingEnableDelete; + if (!balancingEnabled || VCtx->Top->GType.GetErasure() == TErasureType::ErasureMirror3of4) { return; } if (BalancingId) { Send(BalancingId, new NActors::TEvents::TEvPoison()); ActiveActors.Erase(BalancingId); } + TBalancingCfg balancingCfg{ + .EnableSend=Config->BalancingEnableSend, + .EnableDelete=Config->BalancingEnableDelete, + .BalanceOnlyHugeBlobs=Config->BalancingBalanceOnlyHugeBlobs, + .JobGranularity=Config->BalancingJobGranularity, + .BatchSize=Config->BalancingBatchSize, + .MaxToSendPerEpoch=Config->BalancingMaxToSendPerEpoch, + .MaxToDeletePerEpoch=Config->BalancingMaxToDeletePerEpoch, + .ReadBatchTimeout=Config->BalancingReadBatchTimeout, + .SendBatchTimeout=Config->BalancingSendBatchTimeout, + .RequestBlobsOnMainTimeout=Config->BalancingRequestBlobsOnMainTimeout, + .DeleteBatchTimeout=Config->BalancingDeleteBatchTimeout, + .EpochTimeout=Config->BalancingEpochTimeout, + }; auto balancingCtx = std::make_shared( - VCtx, PDiskCtx, HugeBlobCtx, SelfId(), Hull->GetSnapshot(), Config, GInfo, MinREALHugeBlobInBytes); + balancingCfg, VCtx, PDiskCtx, HugeBlobCtx, SelfId(), Hull->GetSnapshot(), Config, GInfo, MinREALHugeBlobInBytes); BalancingId = ctx.Register(CreateBalancingActor(balancingCtx)); ActiveActors.Insert(BalancingId, __FILE__, __LINE__, ctx, NKikimrServices::BLOBSTORAGE); } diff --git a/ydb/core/protos/config.proto b/ydb/core/protos/config.proto index 7401e5fb5914..ae1f6ffa4e56 100644 --- a/ydb/core/protos/config.proto +++ b/ydb/core/protos/config.proto @@ -306,8 +306,27 @@ message TBlobStorageConfig { repeated TVDiskPerformanceConfig VDiskTypes = 1; }; + message TVDiskBalancingConfig { + optional bool EnableSend = 1 [default=false]; + optional bool EnableDelete = 2 [default=false]; + + optional bool BalanceOnlyHugeBlobs = 3 [default=true]; + optional uint64 JobGranularityUs = 4 [default=1000]; + + optional uint64 BatchSize = 5 [default=32]; + optional uint64 MaxToSendPerEpoch = 6 [default=1000]; + optional uint64 MaxToDeletePerEpoch = 7 [default=1000]; + + optional uint64 ReadBatchTimeoutMs = 8 [default=10000]; + optional uint64 SendBatchTimeoutMs = 9 [default=10000]; + optional uint64 RequestBlobsOnMainTimeoutMs = 10 [default=10000]; + optional uint64 DeleteBatchTimeoutMs = 11 [default=10000]; + optional uint64 EpochTimeoutMs = 12 [default=60000]; + } + reserved 7; // TCostMetricsSettings, moved to ICB optional TVDiskPerformanceSettings VDiskPerformanceSettings = 8; + optional TVDiskBalancingConfig VDiskBalancingConfig = 9; } message TBlobStorageFormatConfig { diff --git a/ydb/core/protos/feature_flags.proto b/ydb/core/protos/feature_flags.proto index d3159e74524c..db1d0cdcddf6 100644 --- a/ydb/core/protos/feature_flags.proto +++ b/ydb/core/protos/feature_flags.proto @@ -127,7 +127,7 @@ message TFeatureFlags { optional bool EnableTablePgTypes = 108 [default = false]; optional bool EnableLocalDBBtreeIndex = 109 [default = true]; optional bool EnablePDiskHighHDDInFlight = 110 [default = false]; - optional bool UseVDisksBalancing = 111 [default = false]; + reserved 111; // UseVDisksBalancing optional bool EnableViews = 112 [default = false]; optional bool EnableServerlessExclusiveDynamicNodes = 113 [default = false]; optional bool EnableAccessServiceBulkAuthorization = 114 [default = false];