Objective
This article provides guidance on how to estimate the resource requirements (CPU, memory, and disk) for the YugabyteDB Anywhere (YBA) node, specifically for the Prometheus monitoring service it runs.
Applies To
- Product: YugabyteDB Anywhere
- Version: All versions
Procedure
Accurately sizing your YugabyteDB Anywhere node is critical for ensuring a stable and performant monitoring system. The primary driver of resource consumption is the total number of metrics collected from all the YugabyteDB universes you manage.
Option 1: Use the Interactive Sizing Calculator (Recommended)
For the fastest and most straightforward estimation, use the interactive online calculator.
Launch the Prometheus Sizing Calculator: https://yugabyte.github.io/yugabyte-prometheus-sizing-calculator/
GitHub Repo: https://github.com/yugabyte/yugabyte-prometheus-sizing-calculator
How to Use the Calculator
- For each YugabyteDB universe you plan to monitor, enter its Name, total Number of Tables, and total Number of Nodes (T-Servers).
- Click Add Universe.
- Repeat for all universes managed by this YBA instance. The Estimated Requirements will update automatically. See following demo (available on YouTube as well).
Option 2: Use the Script-Based Calculator
If you prefer to use a script, Yugabyte Support Team also provides a command-line calculator. You can just download the attached shell script or latest GitHub release and run on your local machine.
prometheus-sizing-calculator.zip
Example Command
Usage: prometheus-sizing-calculator.sh -u 'name1:tables1:nodes1' -u 'name2:tables2:nodes2' ... bash prometheus-sizing-calculator.sh -u 'Yugabyte-Dev-Cluster:1000:3' -u 'prod:500:6'
Sample Output
Processing Universes... - Universe: Yugabyte-Dev-Cluster - Tables: 1000, Nodes: 3 → Metrics: 207000 - Universe: prod - Tables: 500, Nodes: 6 → Metrics: 234000 Total Tables: 1500 | Total Nodes: 9 Total Metrics: 441000 * Estimated Requirements: Memory: 12.61 GB Disk: 106.40 GB CPU: .44 cores
Option 3: Manual Calculation
If you prefer to calculate the requirements manually, follow the steps below. These formulas assume a standard Prometheus configuration with a 10-second scrape interval and a 15-day data retention period.
Step 1: Calculate Total Metrics
First, calculate the metrics for each universe using the formula below, then add them all together to get your Total Metrics:
Universe Metrics = (60 * Number of Tables + 9000) * Number of Nodes
Step 2: Estimate Required Resources
Use your Total Metrics value from Step 1 to calculate the resource estimates.
-
Memory (GB):
- If Total Metrics > 1,000,000:
Memory (GB) = (Total Metrics * 10) / 1024 / 1024 - If Total Metrics ≤ 1,000,000:
Memory (GB) = (Total Metrics * 30) / 1024 / 1024
- If Total Metrics > 1,000,000:
Disk (GB):
Disk (GB) = (Total Metrics * 253) / 1024 / 1024CPU (Cores):
CPU Cores = Total Metrics / 1,000,000
Important Considerations and Final Recommendation
The calculated values are a baseline for the Prometheus service alone.
Actual resource usage on the YugabyteDB Anywhere node will be higher due to several dynamic factors.
Understanding Memory Consumption
Estimating Prometheus’s memory needs is complex. The following factors can significantly increase consumption:
- Query Load: High PromQL query volumes from multiple users accessing dashboards.
- System State: Temporary memory spikes during restarts or when new tables are loaded quickly.
- Metrics Volume: YugabyteDB’s distributed architecture exposes a vast number of metrics.
- Federation: Using Prometheus federation for High Availability can further amplify memory demands.
Final Recommendation
In addition to Prometheus, the YugabyteDB Anywhere host also runs:
- The core YBA Platform service
- A PostgreSQL database for metadata
These services consume their own resources.
Taking all these factors into account, we strongly recommend allocating at least 30% additional memory to Prometheus calculation for the YugabyteDB Anywhere host. This provides a safe buffer (30–40%) over the calculated Prometheus baseline to accommodate the full YBA software stack and ensure system stability.
Comments
0 comments
Please sign in to leave a comment.