Skip to content

kvserver: add metrics for Entries bytes read#99806

Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom
tbg:raft-storage-read-bytes
Apr 14, 2023
Merged

kvserver: add metrics for Entries bytes read#99806
craig[bot] merged 2 commits intocockroachdb:masterfrom
tbg:raft-storage-read-bytes

Conversation

@tbg
Copy link
Copy Markdown
Member

@tbg tbg commented Mar 28, 2023

I used versions of these for #98576, and they are generally useful.

  • kvserver: add raft.storage.read_bytes
  • raftentry: add raft.entrycache.read_bytes

Part of #97917.

Release note: None
Epic: None

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@tbg tbg marked this pull request as ready for review March 29, 2023 13:41
@tbg tbg requested review from a team March 29, 2023 13:41
@tbg tbg requested a review from a team as a code owner March 29, 2023 13:41
@tbg tbg requested a review from pav-kv March 29, 2023 13:41
@pav-kv
Copy link
Copy Markdown
Collaborator

pav-kv commented Mar 29, 2023

Tag #97917?

@tbg tbg force-pushed the raft-storage-read-bytes branch from c946b5f to d7f8631 Compare March 29, 2023 19:32
tbg added 2 commits April 12, 2023 15:33
This tracks the cases where we fall back to reading log entries from storage
(i.e. pebble) in `(raft.Storage.Entries)`

Ideally this is zero, as everything ought to be served from the raft entry cache. We know that this cache is not configured well[^1] and so we can't really expect this to work, but you can't improve what you don't measure.

Additionally, this metric has been useful in investigations related to raft overload[^2].

[^1]: cockroachdb#98666
[^2]: cockroachdb#98576

Epic: none
Release note: None
This is counter tracking the bytes returned from the entry cache (via the `Get` and `Scan` methods).

Epic: none
Release note: None
@tbg tbg force-pushed the raft-storage-read-bytes branch from d7f8631 to 7af4f98 Compare April 12, 2023 13:33
@tbg
Copy link
Copy Markdown
Member Author

tbg commented Apr 14, 2023

bors r=pavelkalinnikov

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Apr 14, 2023

Build succeeded:

@craig craig bot merged commit 99baf6f into cockroachdb:master Apr 14, 2023
@tbg
Copy link
Copy Markdown
Member Author

tbg commented Apr 26, 2023

blathers backport 23.1

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.

3 participants