Change resource allocation mode

There are three supported resource allocation modes: absolute, relative, and weight resource allocation mode. When creating a new cluster, the default allocation mode is the relative resource allocation mode. You can change the resource allocation mode from the root queue by editing the queue properties using the Yarn Queue Manager UI.

The way you specify how resources are allocated is done differently in each of the resource allocation modes:

  • Absolute resource allocation mode: In this mode, you specify the actual units of vcores and memory resources. It allows you to configure minimum resources independently for each queue.
  • Relative resource allocation mode: In this mode, you specify the percentage of the total resources used by each queue.
  • Weight resource allocation mode: In this mode, you specify a weight to each queue. For example, a queue with weight 2 should receive approximately twice as many resources as a queue with weight 1.
If you want to change the resource allocation mode, be aware that directly changing from one mode to another is supported for selected paths only. The following table shows what scenarios are supported:
Table 1. Resource allocation mode change
Source mode Target mode Supported?
Absolute Relative Supported
Absolute Weight Not supported. You first have to change to relative mode before changing to weight mode.
Relative Absolute Supported
Relative Weight Supported
Weight Absolute Not supported. You first have to change to relative mode before changing to absolute mode.
Weight Relative Supported
  • If you are changing to weight resource allocation mode, delete any managed parent queues.
  • If you are changing from weight resource allocation mode, delete any dynamic parent queues.
  1. In Cloudera Manager, select Clusters > YARN Queue Manager UI service.
    A graphical queue hierarchy is displayed in the Overview tab.
  2. Click on the three vertical dots on the root and select View > Edit Queue Properties.
    The Queue Properties dialog box is displayed.
  3. Select the resource allocation mode.
  4. Click Save.
  5. Enter yes in the Switch Allocation Mode dialog box and click OK.
    As a result, Queue Manager calculates and updates the resource allocations for all the existing queues. If required, you can further modify the resource allocation.
  6. Click Save.
  7. Restart YARN and YARN Queue Manager services.