Skip to content

rpc: better logging for network latency changes#74312

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
rauchenstein:knz_net_log_2
Dec 29, 2021
Merged

rpc: better logging for network latency changes#74312
craig[bot] merged 2 commits intocockroachdb:masterfrom
rauchenstein:knz_net_log_2

Conversation

@rauchenstein
Copy link
Copy Markdown
Contributor

@rauchenstein rauchenstein commented Dec 29, 2021

Epic: CRDB-11517
See individual commits for details.

it creates additional logging for latency hiccups. A warning
is now emitted on the HEALTH channel whenever the RPC roundtrip
heartbeat latency exceeds its latest moving average by 50%.

Example output:
```
[n7,rnode=2,raddr=127.0.0.1:32341,class=default,heartbeat] 6721  latency jump (prev avg 28.86ms, current 48.56ms)
```

Release note: None
…hold

Previously, clock latencies would log if they exceed 150% of the running
average.  This would log many times if latency remains in excess of that
threshold (until the average rises), or if latency alternates from
slightly above to slightly below the threshold from noise.  This change
logs once when latency exceeds 150% of the moving average and will not
log again until it drops below 140% of the moving average.

Release note: None
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@erikgrinaker are you interested to have a quick look too?

Reviewed 1 of 1 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rauchenstein)

@rauchenstein rauchenstein requested a review from knz December 29, 2021 17:53
@rauchenstein
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 29, 2021

Build succeeded:

@craig craig bot merged commit 5ac733b into cockroachdb:master Dec 29, 2021
@erikgrinaker
Copy link
Copy Markdown
Contributor

Looks good, thanks! Would there be any value in making this configurable via a cluster setting? Although I suppose we can see how it behaves in the wild first.

@knz knz mentioned this pull request Jan 4, 2022
@knz knz changed the title rpc: better logging for network activity rpc: better logging for network latency changes Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants