Recommended cluster settings
For clusters that are expected to create more than 300 materialized views, these configurations can help optimize the performance and resource utilization of the cluster.Set the default parallelism
Add or update the parameter setting inrisingwave/src/config/<your-config>.yaml.
default_parallelism setting determines the parallelism for newly created streaming jobs. Change the streaming_parallelism before creating streaming jobs can achieve the same effect. For guidance on how to set this value, refer to How to adjust the resources allocated to each streaming query?.
Configure adaptive parallelism strategy
RisingWave introduces the system parameteradaptive_parallelism_strategy in v2.3.0 to control how jobs behave when they are of the adaptive type. This provides more granular control over adaptive scheduling behavior.
The supported values are:
-
Full— the job uses all available parallelism. -
Bounded(n)— limits the maximum parallelism ton. -
Ratio(r)— sets the effective parallelism to a fractionrof the available CPUs (rounded down). -
Auto— currently behaves the same asFull.
Configure per-job-type adaptive parallelism strategies
In addition to the system-leveladaptive_parallelism_strategy, you can configure adaptive strategies for specific job types at the session level. This provides fine-grained control over how different types of streaming jobs utilize resources.
Set session-level strategies for specific job types:
Example
Limit the concurrency of creating streaming jobs
If you want to create multiple streaming jobs at once using scripts or tools such as DBT, the system parametermax_concurrent_creating_streaming_jobs is helpful. It controls the maximum number of streaming jobs created concurrently. However, please do not set it too high, as it may introduce excessive pressure on the cluster.
Tuning an existing cluster
You can check the total number of actors using the following SQL command. It indicates how many actors are running in your cluster.Limit parallelism for less intensive streaming jobs
If you want to limit the parallelism for tables, indexes, materialized views, sinks, or sources, you can set the corresponding session parameters to define specific limits for each type.default. The parallelism will then fall back to the global streaming_parallelism setting.
Decrease the parallelism
When the total number of actors in the cluster is large, excessive parallelism can be counterproductive. After v1.7.0, you can check the parallelism number of the running streaming jobs in the system tablerw_fragment_parallelism, and you can alter the streaming jobs’s parallelism with the ALTER statement. For more information, refer to Cluster scaling.
Here is an example of how to adjust the parallelism.
Adjust actors distribution
After adding a new Streaming Node to a cluster with many existing streaming jobs, the distribution of actors among the Compute Nodes might become unbalanced, resulting in low workload on some nodes. This SQL query can display the distribution of actors on each Streaming Node.Other precautions for too many actors
- Resources of meta store and Meta Node: During recovering or scaling processes,there might be spikes in resource usage on the nodes. If you encounter OOM errors or observe some error logs in the meta, please try to scale up the nodes.
- Resources of the prometheus or other monitoring systems: The number of metrics’ time series grows linearly with the number of actors, so please pay attention to the resource requirements of your monitoring system and ensure that it can handle the growing number of metrics efficiently.