Skip to content

add MemoryResidentWithoutPageCache - #81233

Merged
azat merged 1 commit into
ClickHouse:masterfrom
jaymebrd:feat/add-metric-resident-memory-without-page-cache
Jun 4, 2025
Merged

azat merged 1 commit into
ClickHouse:masterfrom
jaymebrd:feat/add-metric-resident-memory-without-page-cache

Conversation

@jaymebrd

@jaymebrd jaymebrd commented Jun 3, 2025

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

MemoryResidentWithoutPageCache provides the amount of physical memory used by the server process, excluding userspace page cache, in bytes. This provides a more accurate view of actual memory usage when userspace page cache is utilized. When userspace page cache is disabled, this value equals MemoryResident

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@azat azat self-assigned this Jun 3, 2025
@azat

azat commented Jun 3, 2025

Copy link
Copy Markdown
Member

@jaymebrd please resolve the conflicts (with #81023) and we can proceed with it

@al13n321 al13n321 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like a good idea to me.

Shouldn't it be in AsynchronousMetrics.cpp though?

@jaymebrd
jaymebrd force-pushed the feat/add-metric-resident-memory-without-page-cache branch from 4d633e3 to 2648300 Compare June 4, 2025 06:29
@clickhouse-gh

clickhouse-gh Bot commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [2648300]

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Jun 4, 2025
@jaymebrd
jaymebrd requested a review from azat June 4, 2025 06:31
@jaymebrd jaymebrd added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Jun 4, 2025
@azat
azat enabled auto-merge June 4, 2025 17:04
@azat
azat added this pull request to the merge queue Jun 4, 2025
Merged via the queue into ClickHouse:master with commit b32121b Jun 4, 2025
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 4, 2025
nikitamikhaylov added a commit that referenced this pull request Jun 4, 2025
Backport #81233 to 25.4: add MemoryResidentWithoutPageCache
nikitamikhaylov added a commit that referenced this pull request Jun 4, 2025
Backport #81233 to 25.5: add MemoryResidentWithoutPageCache
@robot-clickhouse robot-clickhouse added the pr-backports-created-cloud deprecated label, NOOP label Jun 4, 2025
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jun 4, 2025
alexey-milovidov added a commit that referenced this pull request Jun 5, 2025
Backport #81233 to 25.3: add MemoryResidentWithoutPageCache
@robot-clickhouse robot-clickhouse added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Jul 2, 2025
alexey-milovidov pushed a commit that referenced this pull request Apr 10, 2026
…emoryUsed description

Add a new `CGroupMemoryUsedWithoutPageCache` async metric that subtracts the
ClickHouse userspace page cache from `CGroupMemoryUsed`, mirroring what
`MemoryResidentWithoutPageCache` does for RSS (added in #81233).

Also clarify the `CGroupMemoryUsed` description: it previously said
"excluding page cache" without specifying which page cache. It now explicitly
states that the kernel page cache (OS-level file cache) is excluded because
`memory.stat` does not account for the `file` field, while the ClickHouse
userspace page cache is NOT excluded - that is what the new metric is for.

Closes https://github.com/ClickHouse/support-escalation/issues/7289

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-improvement Pull request with some product improvements pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants