File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
ydb/library/actors/interconnect Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,12 @@ namespace NActors {
260
260
}
261
261
}
262
262
263
- SetEnoughCpu (enoughCpu);
263
+ if (enoughCpu) {
264
+ SetEnoughCpu (true );
265
+ StarvingInRow = 0 ;
266
+ } else {
267
+ SetEnoughCpu (++StarvingInRow < StarvingInRowForNotEnoughCpu);
268
+ }
264
269
265
270
// calculate ping time
266
271
auto it = std::min_element (PingQ.begin (), PingQ.end ());
Original file line number Diff line number Diff line change @@ -402,9 +402,10 @@ namespace NActors {
402
402
403
403
if (!canProducePackets && !canWriteData) {
404
404
SetEnoughCpu (true ); // we do not starve
405
+ StarvingInRow = 0 ;
405
406
break ;
406
407
} else if (TimeLimit->CheckExceeded ()) {
407
- SetEnoughCpu (false );
408
+ SetEnoughCpu (++StarvingInRow < StarvingInRowForNotEnoughCpu );
408
409
IssueRam (false );
409
410
break ;
410
411
}
Original file line number Diff line number Diff line change 33
33
#include < unordered_map>
34
34
35
35
namespace NActors {
36
+
37
+ static constexpr ui64 StarvingInRowForNotEnoughCpu = 32 ;
38
+
36
39
class TSlowPathChecker {
37
40
using TTraceCallback = std::function<void (double )>;
38
41
TTraceCallback Callback;
@@ -299,6 +302,8 @@ namespace NActors {
299
302
std::array<ui32, 16 > InputTrafficArray;
300
303
THashMap<ui16, ui32> InputTrafficMap;
301
304
305
+ ui64 StarvingInRow = 0 ;
306
+
302
307
bool CloseInputSessionRequested = false ;
303
308
304
309
void CloseInputSession ();
@@ -634,6 +639,8 @@ namespace NActors {
634
639
bool StartHandshakeOnSessionClose = false ;
635
640
636
641
ui64 EqualizeCounter = 0 ;
642
+
643
+ ui64 StarvingInRow = 0 ;
637
644
};
638
645
639
646
class TInterconnectSessionKiller
You can’t perform that action at this time.
0 commit comments