@@ -571,28 +571,28 @@ private static void RebalanceCpuBudget(long nowTick)
571571 // one machine; on hardware with a different core count or per-core speed this line is
572572 // what tells an operator whether the shipped default is wrong for them, and which of
573573 // BSRMaxDegreeOfParallelism / PeerUpdateParallelism to reach for.
574+ //
575+ // The delivery side rides the same line rather than a second one: undeliverable packets
576+ // used to be visible only on the health endpoint, so a server shedding a third of its
577+ // output looked identical in the log to one running clean. Drop pressure is per player
578+ // per control window; sustained values above the escalate figure are what drive the
579+ // shedding shown alongside. Worker counts are what is actually running, not just what
580+ // each pool is allowed — the gap between those two is what hid a server using a quarter
581+ // of a large host.
574582 if ( WriteLoadLog && nowTick - _lastPoolLoadLogTick >= PoolLoadLogIntervalTicks )
575583 {
576584 _lastPoolLoadLogTick = nowTick ;
577585 int peerWorkers = lnl ? . PeerUpdateWorkers ?? 0 ;
578- // Workers actually running, not just what each pool is allowed — the gap between
579- // those two is what hid a server using a quarter of a large host.
580- BNL . Log (
581- $ "[CPU] send { parallelOptions . MaxDegreeOfParallelism } /{ BasisCpuBudget . ReductionSendCap } workers, " +
582- $ "peer-update { peerWorkers } /{ BasisCpuBudget . PeerUpdateCap } workers " +
583- $ "(pass { lnl ? . PeerUpdatePassMs ?? 0 : F1} ms, target { LiteNetLib . NetManager . PeerPassTargetMs : F0} ms), machine { BasisCpuBudget . Utilization * 100 : F0} % of { BasisCpuBudget . TotalCores } cores.") ;
584-
585- // The delivery side of the same question. Undeliverable packets used to be visible
586- // only on the health endpoint, so a server shedding a third of its output looked
587- // identical in the log to one running clean — this is the line that would have made
588- // that obvious. Drop pressure is per player per control window; sustained values
589- // above 1 are what drive the shedding shown alongside.
590586 int pop = NetworkServer . Server ? . ConnectedPeersCount ?? 0 ;
591587 BNL . Log (
592- $ "[POP] { pop } peers: drop pressure { _dropsPerPlayerWindow : F2} /player " +
593- $ "(escalate above { DropEscalatePerPlayer : F2} ), slicing { _sliceCount } /{ MaxSliceCount ( ) } , " +
594- $ "shed tier { _loadShedTier } ({ LoadShedTierName ( _loadShedTier ) } ), " +
595- $ "unreliable queue { ( lnl != null ? lnl . EffectiveUnreliableQueuePerPeer : 0 ) } /peer.") ;
588+ $ "[CPU/POP] { pop } peers | send { parallelOptions . MaxDegreeOfParallelism } /{ BasisCpuBudget . ReductionSendCap } wkr, " +
589+ $ "peer-upd { peerWorkers } /{ BasisCpuBudget . PeerUpdateCap } wkr " +
590+ $ "(pass { lnl ? . PeerUpdatePassMs ?? 0 : F1} /{ LiteNetLib . NetManager . PeerPassTargetMs : F0} ms), " +
591+ $ "machine { BasisCpuBudget . Utilization * 100 : F0} % of { BasisCpuBudget . TotalCores } cores | " +
592+ $ "drops { _dropsPerPlayerWindow : F2} /player (esc { DropEscalatePerPlayer : F2} ), " +
593+ $ "slice { _sliceCount } /{ MaxSliceCount ( ) } , " +
594+ $ "tier { _loadShedTier } { LoadShedTierName ( _loadShedTier ) } , " +
595+ $ "unrel q { ( lnl != null ? lnl . EffectiveUnreliableQueuePerPeer : 0 ) } /peer") ;
596596 }
597597 }
598598
@@ -781,6 +781,7 @@ private static void MaybeGrowSendSockets(LiteNetLib.NetManager lnl, long nowTick
781781 // Smoothed tick duration driving the load controller, and a rate limit for its log line.
782782 private static double _tickMsEma ;
783783 private static long _lastSliceLogTick ;
784+ private static bool _loadLegendWritten ;
784785
785786 // Overrun-ratio control signal. Evaluated once per window rather than per tick so the
786787 // controller cannot chatter, and so a single slow tick cannot move it.
@@ -1398,12 +1399,19 @@ private static void RunTick(long startTick)
13981399 if ( nowLog - _lastSliceLogTick > Stopwatch . Frequency * 5 )
13991400 {
14001401 _lastSliceLogTick = nowLog ;
1401- BNL . Log ( $ "[BSR] Load: { _tickOverrunRatio : P0} of ticks over budget " +
1402+ // How to read the line is worth saying once per run, not on every change: it was
1403+ // 118 characters of unchanging prose repeated all through a busy session, more
1404+ // than the numbers it was explaining.
1405+ if ( ! _loadLegendWritten )
1406+ {
1407+ _loadLegendWritten = true ;
1408+ BNL . Log ( "[BSR] Load legend: period alone is harmless; tier > 0 means distant " +
1409+ "players stop updating; slicing > 1 means everyone's rate is reduced." ) ;
1410+ }
1411+ BNL . Log ( $ "[BSR] Load: { _tickOverrunRatio : P0} ticks over budget " +
14021412 $ "(mean { _tickMsEma : F2} ms), period { intervalMs } ms " +
1403- $ "({ 1000 / Math . Max ( 1 , intervalMs ) } Hz), shed tier { _loadShedTier } " +
1404- $ "({ LoadShedTierName ( _loadShedTier ) } ), slicing { _sliceCount } . " +
1405- $ "Period alone is harmless; tier > 0 means distant players stop updating; " +
1406- $ "slicing > 1 means everyone's rate is reduced.") ;
1413+ $ "({ 1000 / Math . Max ( 1 , intervalMs ) } Hz), " +
1414+ $ "tier { _loadShedTier } { LoadShedTierName ( _loadShedTier ) } , slicing { _sliceCount } ") ;
14071415 }
14081416 }
14091417 }
0 commit comments