all-things-risingwave

How can I influence how the data is distributed across actors in a distributed setup?

I'm looking to optimize the distribution of data across actors in a distributed setup to improve performance. I remember DISTRIBUTED BY but not sure how to utilize it effectively. Also, how can I check how many cores are assigned to each component in the setup?

Ka

Kai

Asked on Jan 18, 2024

Influencing Data Distribution Across Actors

To influence how data is distributed across actors in a distributed setup, you can use the DISTRIBUTED BY clause in your queries. This clause allows you to specify the distribution key that determines how data is distributed across nodes.

-- Example of using DISTRIBUTED BY clause
SELECT * FROM table_name DISTRIBUTED BY column_name;

Checking Assigned Cores to Each Component

If you deploy via Kubernetes (k8s), you can configure the CPU limits and requests for each component to control the resource allocation. This can help you determine how many cores are assigned to each component in the setup.

# Example of configuring CPU limits and requests in Kubernetes
resources:
  limits:
    cpu: 6
  requests:
    cpu: 4
Jan 18, 2024Edited by