Overview
Doris Multi-Tenancy
Doris multi-tenancy is built on top of the Workload Group Resource soft limit of the kernel. Workloads are managed by group to ensure flexible allocation and control of memory and CPU resources. Each tenant role of a user can have many workload groups. You can manage CPU, memory, concurrency, and queues with this model shown in Figure 1.
- (This feature is available for MRS 3.3.1 or later only.)
- Multiple tenants can be created and managed only on FusionInsight Manager when Kerberos authentication is enabled for the cluster (the cluster is in security mode).
- In MRS 3.5.0 and later versions: The default memory usage of the normal tenant is 90%, and the number of concurrent requests is 10,000.
After a user is associated with a tenant, all query tasks submitted by the user are added to the workload group. You can limit the percentage of CPU and memory resources on BE nodes for a single query and configure a soft memory limit for the workload group.
When cluster resources are insufficient, the system automatically stops several query tasks that occupy memory the most in the group. If the resources used by a workload group exceed the preset limit, multiple workloads share idle resources in the cluster and use resources more than the limit. This ensures stable execution of query tasks. In addition, the query queuing function is introduced to relieve system pressure in heavy-load scenarios. When creating a workload group, you can set the maximum number of concurrent queries to queue the exceeding queries.
Associations Between Doris Tenant Roles and Users
On the FusionInsight Manager service configuration and tenant management pages, you can create tenants, associate tenants with services, configure tenant resources, and associate tenants with users. The following figure shows the association between roles and users on the Manager and Doris sides.
A user, a tenant role, and a workload group are in one-on-one relationship. A user can have multiple permission roles.
Table 1 lists the Doris tenant resource configurations supported by the current version.
Configuration |
Value Range |
Description |
Remarks |
---|---|---|---|
CPU Quota Usage |
1 to 100 |
Weight of CPU resources that can be used by a tenant |
The value specifies a relative ratio that is valid during resource competition. For example, if this value for tenant A is 10 and that for tenant B is 20, the CPU resources can be used by the query tasks of tenant A is one-third of total resources, that is, 10/(10 + 20). If tenant C starts query tasks and its CPU quota usage is 30, a CPU quota of tenant A is one-sixth of total resources, that is, 10/(10 + 20 + 30). |
Memory Quota |
|
Maximum proportion of memory that can be used by a tenant |
The available memory of a tenant is calculated as follows: Physical memory x mem_limit x Memory quota. The upper limit of the memory quota is 70% (90% for MRS 3.5.0 and later versions). The default Doris tenant normal occupies 70% (90% for MRS 3.5.0 and later versions) of memory. |
Concurrency |
|
Maximum number of concurrent query tasks that a tenant can run |
This parameter specifies the maximum number of tasks on each FE node. For example, if the number of concurrent SQL statements is set to 1 and the Doris has three FE nodes, the maximum number of SQL statements that can be executed in a cluster is 3. |
Queue Length |
|
Maximum number of waiting query tasks |
Excessive SQL statements are queued. When the queue is full, newly submitted queries are rejected. |
Waiting Duration |
|
Maximum waiting duration of a tenant query task |
If the query waiting duration exceeds the value of this parameter, the query is rejected. The unit is millisecond. |
Soft Memory Limit |
|
Whether a tenant can use more memory resources than the limit |
|
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot