Why is the memory usage so high?
This is by design. RisingWave uses memory for in-memory caching of streaming query state — data structures like hash tables, aggregation buffers, and join state — to optimize streaming computation performance. By default, RisingWave utilizes all available memory unless specifically configured throughRW_TOTAL_MEMORY_BYTES or --total-memory-bytes. This is why setting memory limits is required in Kubernetes and Docker deployments.
During operation, RisingWave keeps memory usage below the configured limit. If you encounter unexpected out-of-memory (OOM) issues, see Troubleshoot out-of-memory.
Why is the memory for a Serving or Streaming Node not fully utilized?
RisingWave allocates a portion of total memory as reserved memory for system usage, including the process stack, code segments, allocation overhead, and network buffers.Reserved memory calculation (v1.10+)
Starting from version 1.10, RisingWave calculates reserved memory using a gradient formula:- 30% of the first 16 GB
- 20% of the remaining memory
- 30% of the first 16 GB = 4.8 GB
- 20% of the remaining 16 GB = 3.2 GB
- Total reserved memory = 8 GB
Custom reserved memory configuration
You can override the default calculation using:- Environment variable:
RW_RESERVED_MEMORY_BYTES=8589934592(8 GB) - Startup option:
--reserved-memory-bytes=8589934592
The reserved memory must be at least 512 MB.
RW_RESERVED_MEMORY_BYTES=8589934592 to allocate only 8 GB.
Version history of reserved memory
| Version | Behavior |
|---|---|
| Before v1.9 | Fixed 30% of total memory as reserved |
| v1.9 | Introduced customizable reserved memory (--reserved-memory-bytes) |
| v1.10+ | Changed to gradient calculation (30% of first 16 GB + 20% of rest) |
Why does CREATE MATERIALIZED VIEW take a long time?
The execution time forCREATE MATERIALIZED VIEW depends on two main factors:
1. Backfilling historical data
When a new materialized view is created, RisingWave backfills all historical data from the referenced tables and materialized views to ensure a consistent snapshot. TheCREATE statement blocks until backfilling completes.
How to check progress:
When
BACKGROUND_DDL=true, the new materialized view remains invisible in the catalog until backfilling completes. See SET BACKGROUND_DDL for details.2. High cluster latency
If theProgress column in SHOW JOBS stays at 0.0%, the cluster may be experiencing high latency that slows down streaming graph changes. See Troubleshoot high latency for diagnostic steps.
What does the memory and disk usage consist of?
RisingWave memory usage on a Serving or Streaming Node is divided into three components:| Component | Description |
|---|---|
| Storage memory | Caching data blocks, metadata, and shared buffers to improve read/write performance |
| Compute memory | Memory allocated for streaming computation and ad-hoc query execution |
| Reserved memory | System overhead: process stack, code segments, allocation, and network buffers |