Skip to content

fix: improve discoverability of partition_autobalancing_mode and redpanda_memory_allocated_memory#1656

Open
franrob-projects wants to merge 1 commit intoredpanda-data:mainfrom
franrob-projects:fix/partition-autobalancing-mode-discoverability
Open

fix: improve discoverability of partition_autobalancing_mode and redpanda_memory_allocated_memory#1656
franrob-projects wants to merge 1 commit intoredpanda-data:mainfrom
franrob-projects:fix/partition-autobalancing-mode-discoverability

Conversation

@franrob-projects
Copy link
Copy Markdown

Summary

Addresses two issues where users reported finding no search results for configuration and metrics properties that are documented but not easily discoverable.

Closes #1508
Closes #1503


partition_autobalancing_mode (cluster-balancing.adoc)

The property was referenced only as an xref to the reference partial, with no anchor on the manage-side page itself. Users searching for partition_autobalancing_mode landed nowhere actionable.

Changes:

  • Added [[partition_autobalancing_mode]] anchor directly to the Partition balancing settings section, making it reachable by URL fragment and indexed by site search
  • Added rpk cluster config get and rpk cluster config set commands so users know immediately how to inspect and change the value
  • Clarified the default-value story: node_add without an enterprise license, continuous with one

redpanda_memory_allocated_memory (public-metrics-reference.adoc)

The original entry was two sentences. Users trying to understand what this metric measures — particularly why it can read high without the system being under memory pressure — had no explanation.

Changes:

  • Explained that the metric includes reclaimable batch cache memory, which is why values can appear high
  • Clarified when to use this metric vs redpanda_memory_available_memory
  • Added two PromQL example queries: per-shard view and aggregated per-broker view

Checks

  • Small fix (no new features, no new pages)
  • Content gap / support follow-up

…anda_memory_allocated_memory

Closes redpanda-data#1508
Closes redpanda-data#1503

partition_autobalancing_mode (cluster-balancing.adoc):
- Added explicit [[partition_autobalancing_mode]] anchor to the
  Partition balancing settings section so the property is reachable
  by URL fragment and indexed by site search
- Added rpk commands showing how to get and set the property
- Clarified that node_add is the default without an enterprise license
  and continuous is the default with one

redpanda_memory_allocated_memory (public-metrics-reference.adoc):
- Expanded the entry to explain why the metric can appear high even
  without memory pressure (batch cache inclusion)
- Clarified when to use this metric vs redpanda_memory_available_memory
- Added example PromQL queries for per-shard and per-broker views
@franrob-projects franrob-projects requested a review from a team as a code owner April 6, 2026 11:31
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 6, 2026

Deploy Preview for redpanda-docs-preview ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 1ac1ad6
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/69d39993aec2720008c6eba8
😎 Deploy Preview https://deploy-preview-1656--redpanda-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

This pull request updates documentation across two AsciiDoc files to address gaps in searchability and clarity. The first change expands the partition_autobalancing_mode cluster property documentation by adding operational CLI commands (rpk cluster config get/set) and clarifying the behavior and licensing requirements of different balancing modes. The second change updates the definition of the redpanda_memory_allocated_memory metric and includes concrete Prometheus query examples for monitoring CPU shard memory allocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • micheleRP
  • joe-redpanda
  • Feediver1
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main changes: improving discoverability of two specific configuration/metric properties mentioned throughout the changeset.
Description check ✅ Passed The description fully addresses the template requirements with clear sections for each change, linked issues references, and appropriate checkbox selections for the fix type.
Linked Issues check ✅ Passed The PR directly addresses both linked issues by adding searchable anchors and expanded explanations for partition_autobalancing_mode [#1508] and redpanda_memory_allocated_memory [#1503].
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving discoverability issues in documentation for the two properties mentioned in the linked issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@modules/reference/pages/public-metrics-reference.adoc`:
- Around line 892-900: The docs are inconsistent: update the monitoring page
text in monitor-health.adoc to match the new definition that
redpanda_memory_allocated_memory includes reclaimable batch cache memory; change
the wording where it currently states allocated memory excludes reclaimable
cache to instead state it includes reclaimable batch cache memory and update any
alerting guidance/examples to recommend using redpanda_memory_available_memory
for measuring actual free memory (and adjust any formulas that presumed
allocated excluded reclaimable memory).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dd0fc0f5-38cb-489d-b45f-80331fe70480

📥 Commits

Reviewing files that changed from the base of the PR and between c4f9842 and 1ac1ad6.

📒 Files selected for processing (2)
  • modules/manage/pages/cluster-maintenance/cluster-balancing.adoc
  • modules/reference/pages/public-metrics-reference.adoc

Comment on lines +892 to +900
Total memory allocated (in bytes) per CPU shard. This includes all memory currently held by Redpanda on that shard, including memory in the batch cache that has been allocated but could be reclaimed.

*Type*: gauge

*Labels*:

* `shard`

*Usage*: This metric includes reclaimable memory from the batch cache. For monitoring memory pressure, consider using `redpanda_memory_available_memory` instead, which provides a more accurate picture of memory that can be immediately reallocated.
*Usage*: This metric counts all allocated memory, including reclaimable batch cache memory, so it may appear high even when the system is not under memory pressure. To monitor for memory exhaustion, use xref:reference:public-metrics-reference.adoc#redpanda_memory_available_memory[`redpanda_memory_available_memory`] instead, which deducts reclaimable memory and gives a more accurate view of how much memory is actually free.
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.

⚠️ Potential issue | 🟡 Minor

Inconsistent memory semantics across docs after this update

Line 892 now says redpanda_memory_allocated_memory includes reclaimable batch cache memory, but modules/manage/partials/monitor-health.adoc (lines 63-86) still states allocated memory does not include reclaimable cache memory. Please align that monitoring page to this new definition to avoid conflicting guidance for alerting formulas.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/reference/pages/public-metrics-reference.adoc` around lines 892 -
900, The docs are inconsistent: update the monitoring page text in
monitor-health.adoc to match the new definition that
redpanda_memory_allocated_memory includes reclaimable batch cache memory; change
the wording where it currently states allocated memory excludes reclaimable
cache to instead state it includes reclaimable batch cache memory and update any
alerting guidance/examples to recommend using redpanda_memory_available_memory
for measuring actual free memory (and adjust any formulas that presumed
allocated excluded reclaimable memory).

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.

No search results for partition_autobalancing_mode No search results for redpanda_memory_allocated_memory

1 participant