<@U0A71G31CDV> - Does any of the opensource versio...
# questions-and-troubleshooting
c
@Rocky - Does any of the opensource version of Starrocks support multiple warehouses?
r
Yes, the open-source version of StarRocks (Apache 2.0) supports multiple warehouses (also referred to as Compute Groups) starting from version 3.3. This feature is specifically designed for the shared-data architecture (introduced in v3.0), where storage and compute are decoupled. Key Details of Multi-Warehouse Support: * Physical Isolation: You can group Compute Nodes (CNs) into named clusters (warehouses). Each warehouse is physically isolated from others, meaning a high-load query in one warehouse will not impact the performance of another. * Shared Data: All warehouses share access to the same underlying data stored in remote object storage (like S3, HDFS, or GCS). * Version Requirement: While the shared-data architecture began in v3.0, the formal concept and management of "Warehouses" were significantly enhanced in v3.3 and later. * Switching Warehouses: You can switch the warehouse for your current session using the following SQL syntax:
Copy code
sql
    SET WAREHOUSE = 'your_warehouse_name';
You can also verify your current warehouse with the function
current_warehouse()
. Difference from Resource Groups: * Resource Groups: These provide soft isolation (resource quotas for CPU and memory) within a single cluster or warehouse. They are available in both shared-nothing and shared-data architectures. * Warehouses: These provide physical isolation by using entirely separate sets of Compute Nodes. This is only available in the shared-data architecture. Important Note on Management: While the engine support for multiple warehouses is open-source, the automation and orchestration (such as a one-click UI for creating/scaling warehouses or auto-scaling based on load) is often a feature provided by managed cloud services (like CelerData or Alibaba Cloud EMR Serverless) or the Enterprise Edition. In the self-hosted open-source version, you must manually deploy and register the Compute Nodes to the Frontend (FE) to form these groups. References • release_notes/release-3.3.md
c
@Rocky But when I try to create new warehouse, it gives not supported xception
r
The "not supported" exception you are encountering when running
CREATE WAREHOUSE
is likely due to one of the following two reasons: 1. Architectural Requirement (Shared-Data Only) The multi-warehouse feature (also called Compute Groups) is exclusively available in StarRocks' shared-data architecture (introduced in version 3.0, with full warehouse support in v3.3+). * If your cluster is running in the traditional shared-nothing mode (using Backend nodes/BEs with local storage), the concept of "Warehouses" does not exist. * In shared-nothing mode, you should use Resource Groups for workload isolation instead. 2. Open-Source vs. Managed Edition Syntax While the StarRocks engine (v3.3+) supports multiple warehouses and the
SET WAREHOUSE = 'name'
syntax, the specific
CREATE WAREHOUSE
SQL statement is often a feature of the Enterprise Edition or managed cloud services (like CelerData or Alibaba Cloud EMR). In the open-source community version, "Warehouses" are essentially groups of Compute Nodes (CNs). Instead of a high-level DDL like
CREATE WAREHOUSE
, management in the open-source version typically involves: * Manual Deployment: You deploy separate groups of CN nodes. * Node Tagging: Assigning these nodes to specific groups via configuration (e.g., setting a specific group name in the CN configuration). * Resource Groups: Using
CREATE RESOURCE GROUP
to manage isolation within the compute resources. Summary Table Feature | Shared-Nothing (Local Storage) | Shared-Data (Object Storage) Isolation Method | Resource Groups (Soft Isolation) | Warehouses/Compute Groups (Physical Isolation) SQL Syntax |
CREATE RESOURCE GROUP
|
SET WAREHOUSE
/ `CREATE WAREHOUSE`* Version | v2.2+ | v3.3+ _\_Note: The
CREATE WAREHOUSE
DDL is primarily found in managed/enterprise control planes. If you are on the open-source version, check if you have enabled the
enable_multi_warehouse
FE configuration (if available in your specific sub-version) or if you are expected to manage CN groups via node configuration.* Recommendation: 1. Check your version: Ensure you are on at least v3.3.0. 2. Verify architecture: Run
SHOW FRONTENDS
and
SHOW COMPUTE NODES
to ensure you are in a shared-data (cloud-native) environment. 3. Try Resource Groups: If you just need to isolate CPU/Memory for different users or queries, use Resource Groups which are fully supported in the open-source version across all architectures. References • sql-reference/sql-statements/cluster-management/resource_group/CREATE_RESOURCE_GROUP.md • administration/management/resource_management/resource_group.md • sql-reference/sql-statements/materialized_view/CREATE_MATERIALIZED_VIEW.md
c
@Rocky - Ok give me the steps to employ multiple warehouse using CN node tagging for opensource 4.1.1 version
r
In StarRocks v3.3+ (and including your v4.1.1 version), the "Warehouse" concept is synonymous with Compute Groups in the shared-data architecture. While managed cloud versions (like CelerData or Alibaba EMR) provide a UI or automated DDLs, you can manually implement multiple warehouses in the open-source version by grouping Compute Nodes (CNs). The "not supported" exception you encountered for
CREATE WAREHOUSE
usually occurs because the high-level DDL is either disabled by default or restricted to certain editions, but the underlying Compute Group functionality is available. Here are the steps to employ multiple warehouses using CN node tagging and configuration in the open-source version: 1. Enable Multi-Warehouse in FE Ensure your Frontend (FE) is configured to allow multiple warehouses. Add this to your
fe.conf
and restart the FE:
Copy code
properties
enable_multi_warehouse = true
2. Configure CN Nodes with a Warehouse Tag Instead of tagging nodes via SQL after they are joined, you assign them to a warehouse (compute group) at the configuration level before starting the CN process. In the
cn.conf
of the nodes you want to group: 1. Locate or add the
warehouse
parameter. 2. Set it to your desired warehouse name.
Copy code
properties
    # cn.conf
    warehouse = search_warehouse
_Note: Nodes without this parameter or set to the default will belong to
default_warehouse
._ 3. Register CN Nodes to the Cluster Once the configuration is set, start the CN process and register the nodes with the FE using the standard SQL:
Copy code
sql
ALTER SYSTEM ADD COMPUTE NODE "cn_host:heartbeat_port";
The FE will read the
warehouse
property during the heartbeat and group the nodes accordingly. 4. Verify the Warehouses You can verify that your nodes are correctly tagged and grouped by running:
Copy code
sql
SHOW COMPUTE NODES;
Check the
WarehouseName
column in the output. You should see your custom warehouse names (e.g.,
search_warehouse
) instead of just
default_warehouse
. 5. Using the Warehouses To route queries to a specific warehouse in your session, use the
SET
command:
Copy code
sql
-- Switch to your specific compute group
SET WAREHOUSE = 'search_warehouse';

-- Run your query
SELECT * FROM your_table LIMIT 10;

-- Check current active warehouse
SELECT current_warehouse();
Key Considerations for Open Source * Physical Isolation: By placing different CNs into different named warehouses, you achieve physical compute isolation. * Shared Data: All warehouses will still see the same databases and tables because they share the same metadata and back-end object storage. * Loading: For Stream Load or Broker Load, you can specify the target warehouse using the
warehouse
property or header to ensure loading tasks don't impact query performance. References • releasenotes/release-3.3.md • sql-reference/sql-statements/cluster-management/nodes_processes/ALTER_SYSTEM.md • sql-reference/System_variable.md • administration/management/BE_configuration.md References • sql-reference/sql-statements/cluster-management/nodes_processes/ALTER_SYSTEM.md • sql-reference/System_variable.md • deployment/deploy_manually.md
c
@Rocky - I don't see any document specifying this property in cn.conf
r
Based on the documentation and the latest community information for StarRocks v4.1.1, here is the clarification regarding multi-warehouse support: 1. Multi-Warehouse is a Managed/Enterprise Feature The high-level Warehouse management (specifically the
CREATE WAREHOUSE
and
DROP WAREHOUSE
SQL statements) and the ability to define multiple named warehouses within a single instance are features of the Enterprise Edition or Managed Cloud Services (such as CelerData or Alibaba Cloud EMR Serverless). In the Open Source (Apache 2.0) version: * The
WarehouseName
column in
SHOW COMPUTE NODES
typically remains fixed to
default_warehouse
. * The
CREATE WAREHOUSE
statement is not recognized by the open-source SQL parser, which is why you are seeing the "not supported" exception. 2. How to achieve Isolation in the Open Source Version Since you cannot create separate "Warehouses" via DDL in the open-source version, you achieve similar physical and resource isolation using the following two methods: Method A: Resource Groups (Recommended) Starting from v3.3.5, StarRocks supports Exclusive Resource Groups with hard CPU limits. This allows you to simulate a "warehouse" by reserving specific CPU cores on your Compute Nodes for specific workloads or users. 1. Define the group with hard limits:
Copy code
sql
    CREATE RESOURCE GROUP my_isolated_workload
    TO (user='power_user')
    WITH (
        'exclusive_cpu_cores' = '10', -- Physical reservation of 10 cores
        'mem_limit' = '30%'           -- Memory isolation
    );
2. How it works: This ensures that
power_user
has 10 dedicated CPU cores that other queries cannot touch, even if the system is idle. This provides the "physical isolation" typically sought in a multi-warehouse setup. Method B: Separate CN Deployment (Compute Groups) While the open-source FE doesn't support the
CREATE WAREHOUSE
DDL to manage these groups, you can technically deploy separate sets of Compute Nodes. However, in the open-source version, all registered CNs are joined to the
default_warehouse
. If you truly need entirely separate clusters, the common open-source practice is to deploy multiple independent StarRocks clusters (each with its own FE) pointing to separate data paths, or use a single cluster and manage the isolation strictly via Resource Groups as shown above. Summary of why your command failed: * Property in `cn.conf`: There is no
warehouse
or
compute_group
property in the standard
cn.conf
. Compute Nodes automatically report themselves to the
default_warehouse
upon joining. * DDL Support: The
CREATE WAREHOUSE
syntax is restricted to commercial/cloud versions that include the automated orchestration layer for compute clusters. Recommendation: For your v4.1.1 open-source cluster, use *Resource Groups with `exclusive_cpu_cores`*. It is the native, open-source way to ensure one workload does not impact another at the hardware level. References • administration/management/resource_management/resource_group.md • sql-reference/sql-statements/cluster-management/resource_group/CREATE_RESOURCE_GROUP.md • releasenotes/release-3.3.md References • deployment/upgrade.md • deployment/deploy_manually.md • quick_start/shared-data.md • sql-reference/sql-statements/cluster-management/nodes_processes/SHOW_COMPUTE_NODES.md
c
@Rocky So basically there is no way to physically created isolated CN groups right?
r
In the open-source version (Apache 2.0) of StarRocks, including v4.1.1, the "Multi-Warehouse" (Compute Group) feature is restricted in terms of management via SQL. While the underlying engine in the shared-data architecture supports the concept of warehouses, the
CREATE WAREHOUSE
DDL and automated grouping of CNs into named warehouses are currently exclusive to the Enterprise Edition and Managed Cloud services
(such as CelerData or Alibaba EMR). In your open-source cluster, all Compute Nodes (CNs) automatically register under the
default_warehouse
. How to achieve physical isolation in Open Source Since you cannot create named warehouses via SQL, the supported way to achieve physical, isolated "groups" of resources in the open-source version is through Exclusive Resource Groups. Starting from v3.3.5, StarRocks supports Hard Isolation using the
exclusive_cpu_cores
property. This allows you to reserve specific CPU cores on your CN nodes that cannot be used by any other workload, effectively simulating an isolated warehouse. Steps to implement: 1. Define an Isolated Group: Create a resource group and bind it to specific users or queries. The
exclusive_cpu_cores
property ensures that these cores are physically reserved for this group only.
Copy code
sql
    CREATE RESOURCE GROUP search_workload
    TO (user='search_user')
    WITH (
        "exclusive_cpu_cores" = "16",  -- Reserves 16 cores across the cluster
        "mem_limit" = "40%"            -- Hard memory limit
    );
2. Verify Isolation: You can check how the threads are bound to these exclusive cores by querying the system views:
Copy code
sql
    SELECT * FROM information_schema.be_threads WHERE name LIKE '%search_workload%';
Why you don't see
warehouse
in
cn.conf
You are correct—there is no
warehouse
parameter in the open-source
cn.conf
. In the open-source build, CNs are "stateless" and simply join the metadata's default compute pool. The ability to tag nodes into separate warehouses at startup is part of the orchestration layer provided in the commercial/cloud versions. Summary * Can you use
CREATE WAREHOUSE
?
No, it is not supported in the open-source SQL parser. * Can you isolate workloads? Yes, use Resource Groups with the
exclusive_cpu_cores
property. This is the official path for open-source users to prevent "noisy neighbor" issues and ensure guaranteed performance for specific tasks. References • quick_start/shared-data.md • deployment/shared_data/s3.md • deployment/shared_data/gcs.md