Skip to content

Commit a03d73e

Browse files
authored
counterts for throttling params; consistent naming (#14264)
1 parent 0b3d29b commit a03d73e

File tree

7 files changed

+52
-18
lines changed

7 files changed

+52
-18
lines changed

ydb/core/blobstorage/nodewarden/node_warden_impl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ TNodeWarden::TNodeWarden(const TIntrusivePtr<TNodeWardenConfig> &cfg)
3333
, MaxChunksToDefragInflight(10, 1, 50)
3434
, ThrottlingDeviceSpeed(50 << 20, 1 << 20, 10ull << 30)
3535
, ThrottlingDryRun(1, 0, 1)
36-
, ThrottlingMinSstCount(100, 1, 1000)
37-
, ThrottlingMaxSstCount(250, 1, 1000)
36+
, ThrottlingMinLevel0SstCount(100, 1, 1000)
37+
, ThrottlingMaxLevel0SstCount(250, 1, 1000)
3838
, ThrottlingMinInplacedSizeHDD(20ull << 30, 1 << 20, 500ull << 30)
3939
, ThrottlingMaxInplacedSizeHDD(60ull << 30, 1 << 20, 500ull << 30)
4040
, ThrottlingMinInplacedSizeSSD(20ull << 30, 1 << 20, 500ull << 30)
@@ -357,8 +357,8 @@ void TNodeWarden::Bootstrap() {
357357

358358
icb->RegisterSharedControl(ThrottlingDeviceSpeed, "VDiskControls.ThrottlingDeviceSpeed");
359359
icb->RegisterSharedControl(ThrottlingDryRun, "VDiskControls.ThrottlingDryRun");
360-
icb->RegisterSharedControl(ThrottlingMinSstCount, "VDiskControls.ThrottlingMinSstCount");
361-
icb->RegisterSharedControl(ThrottlingMaxSstCount, "VDiskControls.ThrottlingMaxSstCount");
360+
icb->RegisterSharedControl(ThrottlingMinLevel0SstCount, "VDiskControls.ThrottlingMinLevel0SstCount");
361+
icb->RegisterSharedControl(ThrottlingMaxLevel0SstCount, "VDiskControls.ThrottlingMaxLevel0SstCount");
362362
icb->RegisterSharedControl(ThrottlingMinInplacedSizeHDD, "VDiskControls.ThrottlingMinInplacedSizeHDD");
363363
icb->RegisterSharedControl(ThrottlingMaxInplacedSizeHDD, "VDiskControls.ThrottlingMaxInplacedSizeHDD");
364364
icb->RegisterSharedControl(ThrottlingMinInplacedSizeSSD, "VDiskControls.ThrottlingMinInplacedSizeSSD");

ydb/core/blobstorage/nodewarden/node_warden_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ namespace NKikimr::NStorage {
182182

183183
TControlWrapper ThrottlingDeviceSpeed;
184184
TControlWrapper ThrottlingDryRun;
185-
TControlWrapper ThrottlingMinSstCount;
186-
TControlWrapper ThrottlingMaxSstCount;
185+
TControlWrapper ThrottlingMinLevel0SstCount;
186+
TControlWrapper ThrottlingMaxLevel0SstCount;
187187
TControlWrapper ThrottlingMinInplacedSizeHDD;
188188
TControlWrapper ThrottlingMaxInplacedSizeHDD;
189189
TControlWrapper ThrottlingMinInplacedSizeSSD;

ydb/core/blobstorage/nodewarden/node_warden_vdisk.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ namespace NKikimr::NStorage {
202202

203203
vdiskConfig->ThrottlingDeviceSpeed = ThrottlingDeviceSpeed;
204204
vdiskConfig->ThrottlingDryRun = ThrottlingDryRun;
205-
vdiskConfig->ThrottlingMinSstCount = ThrottlingMinSstCount;
206-
vdiskConfig->ThrottlingMaxSstCount = ThrottlingMaxSstCount;
205+
vdiskConfig->ThrottlingMinLevel0SstCount = ThrottlingMinLevel0SstCount;
206+
vdiskConfig->ThrottlingMaxLevel0SstCount = ThrottlingMaxLevel0SstCount;
207207
vdiskConfig->ThrottlingMinInplacedSizeHDD = ThrottlingMinInplacedSizeHDD;
208208
vdiskConfig->ThrottlingMaxInplacedSizeHDD = ThrottlingMaxInplacedSizeHDD;
209209
vdiskConfig->ThrottlingMinInplacedSizeSSD = ThrottlingMinInplacedSizeSSD;

ydb/core/blobstorage/vdisk/common/vdisk_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ namespace NKikimr {
248248
///////////// THROTTLING SETTINGS //////////////////
249249
TControlWrapper ThrottlingDeviceSpeed;
250250
TControlWrapper ThrottlingDryRun;
251-
TControlWrapper ThrottlingMinSstCount;
252-
TControlWrapper ThrottlingMaxSstCount;
251+
TControlWrapper ThrottlingMinLevel0SstCount;
252+
TControlWrapper ThrottlingMaxLevel0SstCount;
253253
TControlWrapper ThrottlingMinInplacedSizeHDD;
254254
TControlWrapper ThrottlingMaxInplacedSizeHDD;
255255
TControlWrapper ThrottlingMinInplacedSizeSSD;

ydb/core/blobstorage/vdisk/common/vdisk_mongroups.h

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,21 @@ public:
138138

139139
COUNTER_INIT_IF_EXTENDED(ThrottlingCurrentSpeedLimit, false);
140140
COUNTER_INIT_IF_EXTENDED(ThrottlingIsActive, false);
141+
COUNTER_INIT_IF_EXTENDED(ThrottlingDryRun, false);
141142
COUNTER_INIT_IF_EXTENDED(ThrottlingLevel0SstCount, false);
142-
COUNTER_INIT_IF_EXTENDED(ThrottlingAllLevelsInplacedSize, false);
143+
COUNTER_INIT_IF_EXTENDED(ThrottlingMinLevel0SstCount, false);
144+
COUNTER_INIT_IF_EXTENDED(ThrottlingMaxLevel0SstCount, false);
145+
COUNTER_INIT_IF_EXTENDED(ThrottlingInplacedSize, false);
146+
COUNTER_INIT_IF_EXTENDED(ThrottlingMinInplacedSizeHDD, false);
147+
COUNTER_INIT_IF_EXTENDED(ThrottlingMaxInplacedSizeHDD, false);
148+
COUNTER_INIT_IF_EXTENDED(ThrottlingMinInplacedSizeSSD, false);
149+
COUNTER_INIT_IF_EXTENDED(ThrottlingMaxInplacedSizeSSD, false);
143150
COUNTER_INIT_IF_EXTENDED(ThrottlingOccupancyPerMille, false);
151+
COUNTER_INIT_IF_EXTENDED(ThrottlingMinOccupancyPerMille, false);
152+
COUNTER_INIT_IF_EXTENDED(ThrottlingMaxOccupancyPerMille, false);
144153
COUNTER_INIT_IF_EXTENDED(ThrottlingLogChunkCount, false);
154+
COUNTER_INIT_IF_EXTENDED(ThrottlingMinLogChunkCount, false);
155+
COUNTER_INIT_IF_EXTENDED(ThrottlingMaxLogChunkCount, false);
145156
}
146157

147158
COUNTER_DEF(EmergencyMovedPatchQueueItems);
@@ -163,10 +174,21 @@ public:
163174

164175
COUNTER_DEF(ThrottlingCurrentSpeedLimit);
165176
COUNTER_DEF(ThrottlingIsActive);
177+
COUNTER_DEF(ThrottlingDryRun);
166178
COUNTER_DEF(ThrottlingLevel0SstCount);
167-
COUNTER_DEF(ThrottlingAllLevelsInplacedSize);
179+
COUNTER_DEF(ThrottlingMinLevel0SstCount);
180+
COUNTER_DEF(ThrottlingMaxLevel0SstCount);
181+
COUNTER_DEF(ThrottlingInplacedSize);
182+
COUNTER_DEF(ThrottlingMinInplacedSizeHDD);
183+
COUNTER_DEF(ThrottlingMaxInplacedSizeHDD);
184+
COUNTER_DEF(ThrottlingMinInplacedSizeSSD);
185+
COUNTER_DEF(ThrottlingMaxInplacedSizeSSD);
168186
COUNTER_DEF(ThrottlingOccupancyPerMille);
187+
COUNTER_DEF(ThrottlingMinOccupancyPerMille);
188+
COUNTER_DEF(ThrottlingMaxOccupancyPerMille);
169189
COUNTER_DEF(ThrottlingLogChunkCount);
190+
COUNTER_DEF(ThrottlingMinLogChunkCount);
191+
COUNTER_DEF(ThrottlingMaxLogChunkCount);
170192
};
171193

172194
///////////////////////////////////////////////////////////////////////////////////

ydb/core/blobstorage/vdisk/skeleton/skeleton_overload_handler.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ namespace NKikimr {
212212

213213
ui64 CalcSstCountSpeedLimit() const {
214214
ui64 deviceSpeed = (ui64)VCfg->ThrottlingDeviceSpeed;
215-
ui64 minSstCount = (ui64)VCfg->ThrottlingMinSstCount;
216-
ui64 maxSstCount = (ui64)VCfg->ThrottlingMaxSstCount;
215+
ui64 minSstCount = (ui64)VCfg->ThrottlingMinLevel0SstCount;
216+
ui64 maxSstCount = (ui64)VCfg->ThrottlingMaxLevel0SstCount;
217217

218218
return LinearInterpolation(CurrentSstCount, minSstCount, maxSstCount, deviceSpeed);
219219
}
@@ -285,7 +285,7 @@ namespace NKikimr {
285285
}
286286

287287
bool IsActive() const {
288-
ui64 minSstCount = (ui64)VCfg->ThrottlingMinSstCount;
288+
ui64 minSstCount = (ui64)VCfg->ThrottlingMinLevel0SstCount;
289289
ui64 minInplacedSize = (ui64)ThrottlingMinInplacedSize;
290290
ui64 minOccupancy = (ui64)VCfg->ThrottlingMinOccupancyPerMille * 1000;
291291
ui64 minLogChunkCount = (ui64)VCfg->ThrottlingMinLogChunkCount;
@@ -335,7 +335,7 @@ namespace NKikimr {
335335
Mon.ThrottlingLevel0SstCount() = sstCount;
336336

337337
CurrentInplacedSize = inplacedSize;
338-
Mon.ThrottlingAllLevelsInplacedSize() = inplacedSize;
338+
Mon.ThrottlingInplacedSize() = inplacedSize;
339339

340340
CurrentOccupancy = occupancy * 1'000'000;
341341
Mon.ThrottlingOccupancyPerMille() = occupancy * 1000;
@@ -344,6 +344,18 @@ namespace NKikimr {
344344
Mon.ThrottlingLogChunkCount() = logChunkCount;
345345

346346
Mon.ThrottlingIsActive() = (ui64)IsActive();
347+
Mon.ThrottlingDryRun() = VCfg->ThrottlingDryRun;
348+
349+
Mon.ThrottlingMinLevel0SstCount() = VCfg->ThrottlingMinLevel0SstCount;
350+
Mon.ThrottlingMaxLevel0SstCount() = VCfg->ThrottlingMaxLevel0SstCount;
351+
Mon.ThrottlingMinInplacedSizeHDD() = VCfg->ThrottlingMinInplacedSizeHDD;
352+
Mon.ThrottlingMaxInplacedSizeHDD() = VCfg->ThrottlingMaxInplacedSizeHDD;
353+
Mon.ThrottlingMinInplacedSizeSSD() = VCfg->ThrottlingMinInplacedSizeSSD;
354+
Mon.ThrottlingMaxInplacedSizeSSD() = VCfg->ThrottlingMaxInplacedSizeSSD;
355+
Mon.ThrottlingMinOccupancyPerMille() = VCfg->ThrottlingMinOccupancyPerMille;
356+
Mon.ThrottlingMaxOccupancyPerMille() = VCfg->ThrottlingMaxOccupancyPerMille;
357+
Mon.ThrottlingMinLogChunkCount() = VCfg->ThrottlingMinLogChunkCount;
358+
Mon.ThrottlingMaxLogChunkCount() = VCfg->ThrottlingMaxLogChunkCount;
347359

348360
if (!IsActive()) {
349361
CurrentTime = {};

ydb/core/protos/config.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,12 +1397,12 @@ message TImmediateControlsConfig {
13971397
MinValue: 0,
13981398
MaxValue: 1,
13991399
DefaultValue: 1 }];
1400-
optional uint64 ThrottlingMinSstCount = 15 [(ControlOptions) = {
1400+
optional uint64 ThrottlingMinLevel0SstCount = 15 [(ControlOptions) = {
14011401
Description: "Minimum level 0 SST count - throttling is turned on",
14021402
MinValue: 1,
14031403
MaxValue: 1000,
14041404
DefaultValue: 100 }];
1405-
optional uint64 ThrottlingMaxSstCount = 16 [(ControlOptions) = {
1405+
optional uint64 ThrottlingMaxLevel0SstCount = 16 [(ControlOptions) = {
14061406
Description: "Maximum level 0 SST count - throttling speed is zero",
14071407
MinValue: 1,
14081408
MaxValue: 1000,

0 commit comments

Comments
 (0)