Skip to content

feat: add metrics for pebbledb read/writes#1900

Merged
jhkimqd merged 3 commits intodevelopfrom
feat/pebbledb_metrics
Nov 24, 2025
Merged

feat: add metrics for pebbledb read/writes#1900
jhkimqd merged 3 commits intodevelopfrom
feat/pebbledb_metrics

Conversation

@jhkimqd
Copy link
Copy Markdown
Contributor

@jhkimqd jhkimqd commented Nov 20, 2025

Description

Exposes new pebbledb related metrics to prometheus for better observability during read/writes to the db + amplification factors:

  • file/sst/created
  • file/sst/deleted
  • file/wal/created
  • file/wal/deleted
  • readamp
  • writeamp/total
  • writeamp/level%v (per level)

The logic for calculating these come directly from cockroachdb/pebble package:

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Manual tests

Write Amplification Visualization

Screenshot from 2025-11-20 11-44-37

Read Amplification Visualization

Screenshot from 2025-11-20 11-44-53

Signed-off-by: Ji Hwan <jkim@polygon.technology>
Copy link
Copy Markdown
Contributor

@cffls cffls left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding these metrics.

Signed-off-by: Ji Hwan <jkim@polygon.technology>
Signed-off-by: Ji Hwan <jkim@polygon.technology>
@sonarqubecloud
Copy link
Copy Markdown

@jhkimqd jhkimqd requested review from a team and minhd-vu and removed request for a team November 21, 2025 00:42
@jhkimqd jhkimqd merged commit 7e1c2ff into develop Nov 24, 2025
12 of 13 checks passed
@jhkimqd jhkimqd deleted the feat/pebbledb_metrics branch November 24, 2025 14:30
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