derp: add envknob to disable RTT stats collection (#19029)

Updates tailscale/corp#38509

Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
main
Mike O'Driscoll 1 month ago committed by GitHub
parent ce7789071f
commit 26ba71d23f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      derp/derpserver/derpserver.go

@ -1005,7 +1005,12 @@ func (c *sclient) run(ctx context.Context) error {
}
}()
c.startStatsLoop(sendCtx)
// Allow disabling RTT stats collection to reduce
// CPU and syscalls on servers with high connection
// counts
if !envknob.Bool("TS_DERP_DISABLE_RTT_STATS") {
c.startStatsLoop(sendCtx)
}
for {
ft, fl, err := derp.ReadFrameHeader(c.br)

Loading…
Cancel
Save