Skip to content

Conversation

@jepett0
Copy link
Contributor

@jepett0 jepett0 commented May 21, 2024

#3275

In this PR two new counters are added:

  • resources.storage.used_bytes.ssd
  • resources.storage.used_bytes.hdd

Necessary subcounters like resources.storage.used_bytes.table.ssd (note the added table part) are also added. These counters are needed to monitor SSD and HDD storage usage separately.

In the follow-up PR .ssd and .hdd versions of resources.storage.limit_bytes are added too.

Probably the most interesting part of this PR is the "hacky" mapping of storage pool kinds to ssd and hdd counters. It is discussed in more detail in these comments:

The data for the used_bytes counters is sourced from the SchemeShard's counters:

  • SchemeShard/DiskSpaceTablesTotalBytesOnSsd
  • SchemeShard/DiskSpaceTablesTotalBytesOnHdd

which are updated each time the SchemeShard receives TEvPeriodicTableStats from DataShards.

Currently, only row-oriented tables report disk space usage separately by channels, so effectively:

  • resources.storage.used_bytes.ssd is equal to resources.storage.table.used_bytes.ssd (note the added table part)
  • resources.storage.used_bytes.hdd is equal to resources.storage.table.used_bytes.hdd (note the added table part)

In the future, we will start accounting for HDD and SSD usage separately for both column-oriented tables and topics. Consequently, resources.storage.used_bytes.ssd will more accurately represent the total SSD space used by all entities in the database.

P.S. For the best reviewing experience, I recommend reviewing the commits individually.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

mutable size_t LastKnownSize = 0;
};

enum class EUserFacingStorageType {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This enum highlights that we categorize numerous storage pool kinds into just two reported storage types: HDD and SSD.

@jepett0 jepett0 marked this pull request as ready for review May 22, 2024 05:09
@jepett0 jepett0 requested review from adameat and ijon May 22, 2024 09:22
@jepett0 jepett0 force-pushed the SchemeShard.per_channel_storage_limits.6 branch from 4fca557 to 29d5c2c Compare May 28, 2024 10:44
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@jepett0 jepett0 requested review from alexd65536 and ijon May 28, 2024 12:07
jepett0 added 5 commits May 29, 2024 16:12
Log level needs to be TRACE to see the raw table stats received by the SchemeShard
- fix style
- add descriptive comment about the nature of the storage pool kind mapping
@jepett0 jepett0 force-pushed the SchemeShard.per_channel_storage_limits.6 branch from 29d5c2c to 2003c15 Compare May 29, 2024 16:26
@jepett0 jepett0 requested a review from ijon May 29, 2024 16:28
@github-actions
Copy link

github-actions bot commented May 29, 2024

2024-05-29 16:29:27 UTC Pre-commit check for fd9c19e has started.
2024-05-29 16:32:04 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-05-29 17:08:39 UTC Build successful.

@github-actions
Copy link

github-actions bot commented May 29, 2024

2024-05-29 16:30:39 UTC Pre-commit check for fd9c19e has started.
2024-05-29 16:33:22 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-05-29 17:12:05 UTC Build successful.
2024-05-29 17:12:17 UTC Tests are running...
🔴 2024-05-29 18:45:05 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
38435 33645 0 1 4782 7

@github-actions
Copy link

github-actions bot commented May 29, 2024

2024-05-29 16:33:07 UTC Pre-commit check for fd9c19e has started.
2024-05-29 16:35:48 UTC Build linux-x86_64-release-asan is running...
🟢 2024-05-29 17:14:05 UTC Build successful.
2024-05-29 17:14:16 UTC Tests are running...
🔴 2024-05-29 19:06:57 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
10891 10836 0 17 27 11

@jepett0 jepett0 merged commit 08261c7 into ydb-platform:main May 30, 2024
@StekPerepolnen StekPerepolnen mentioned this pull request May 31, 2024
jepett0 added a commit to jepett0/ydb that referenced this pull request Jun 17, 2024
jepett0 added a commit to jepett0/ydb that referenced this pull request Jun 17, 2024
@niksaveliev niksaveliev mentioned this pull request Jun 17, 2024
@StekPerepolnen StekPerepolnen mentioned this pull request Jun 19, 2024
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.

2 participants