yugabyte/yugabyte-db

Use a uniform disk size unit with either base 1000 or base 1024

Open

#28,753 建立於 2025年9月30日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)C (8,229 star) (1,003 fork)batch import
area/docdbgood first issuejira-originatedkind/enhancementpriority/medium

描述

Various places in the codebase and UI report disk sizes using inconsistent units. We want to see uniform units — either base 1024 (with proper GiB/MiB/KiB labels) or base 1000 (with GB/MB/KB labels) — applied consistently across all surfaces so that the Platform UI can also align to the same standard.

Observed inconsistencies

YBA UI — Table page vs Node page

The same SST file size metric (rocksdb_current_version_sst_files_size) is displayed differently depending on which YBA page you're on:

  • Table page labels the value as GiB (base 1024)
  • Node page labels the value as GB (base 1000)

Example: 6,347,254,071 bytes → displayed as 6.3 GB on the Node page and 5.9 GiB on the Table page. Both are correct conversions, but the inconsistent labeling makes them appear to disagree.

Master UI

The Master UI displays WAL and SST sizes using MiB (base 1024) without making this explicit in the label. Example:

TOTAL: 43,479,218 bytes = 43.48 MB (base 1000) = 41.46 MiB (base 1024)
Master UI displays: 41.46M

The Master UI is using base 1024 but labeling it as M rather than MiB.

T-Server UI

T-Server UI has similar labeling gaps — the unit base is not clearly indicated.

Request

Standardize all size displays across Master UI, T-Server UI, YBA Table page, and YBA Node page to use either:

  • Base 1000 with explicit GB / MB / KB labels, or
  • Base 1024 with explicit GiB / MiB / KiB labels

The Platform (YBA) team has a diff in progress switching YBA to base 1000 (GB). The ask is for the DB-side UIs (Master UI, T-Server UI) to align to the same standard.

Jira Link: DB-18463

貢獻者指南