Dynamic Resource Pools
A dynamic resource pool is a named configuration of resources and a policy for scheduling the resources among YARN applications or Impala queries running in the pool. Dynamic resource pools allow you to schedule and allocate resources to YARN applications and Impala queries based on the user's access to specific pools and the resources available to those pools. If a pool's allocation is not in use it can be given to other pools. Otherwise, a pool receives a share of resources in accordance with the pool’s weight. Dynamic resource pools have ACLs that restrict who can submit work to and administer them.
A configuration set defines the allocation of resources across pools that may be active at a given time. For example, you can define "production" and "development" configuration sets, which define different resource pool configurations for different groups.
A scheduling rule defines when a configuration set is active.
Resource pools can be nested, with sub-pools restricted by the settings of their parent pool.
The resources available for sharing are subject to the allocations made for each service if static service pools (cgroups) are being enforced. For example, if the static pool for YARN is 75% of the total cluster resources, then resource pools will use only that 75% of resources.
- Viewing Dynamic Resource Pool Configuration
- Creating a Dynamic Resource Pool
- Editing Dynamic Resource Pools
- Adding Sub-Pools
- YARN Pool Status and Configuration Options
- Placement Rules
- Configuration Sets
- Scheduling Rules
Viewing Dynamic Resource Pool Configuration
- YARN Independent RM - Weight, Virtual Cores, Min and Max Memory, Max Running Apps, and Scheduling Policy.
- YARN and Impala Integrated RM - YARN: Weight, Virtual Cores, Min and Max Memory, Max Running Apps, and Scheduling Policy; Impala: Max Running Queries and Max Queued Queries
- YARN and Impala Independent RM - YARN: Weight, Virtual Cores, Min and Max Memory, Max Running Apps, and Scheduling Policy; Impala: Max Memory, Max Running Queries, and Max Queued Queries
- Impala Independent RM - Max Memory, Max Running Queries, and Max Queued Queries
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
Creating a Dynamic Resource Pool
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click Add Resource Pool. The Add dialog box displays showing the General tab.
- Specify a name and resource limits for the pool:
- In the Resource Pool Name field, type a unique name containing only alphanumeric characters.
- Specify the policy for scheduling resource among applications running in the pool: Dominant Resource Fairness (DRF), Fair Scheduler (FAIR), or First-In, First-Out (FIFO). DRF is the default, and is an extension of fair scheduling for more than one resource—it determines resource shares (CPU, memory) for a job separately based on the availability of those resources and the needs of the job.
- If you have enabled Fair Scheduler preemption, optionally set a preemption timeout to specify how long a job in this pool must wait before it can preempt resources from jobs in other pools. To enable preemption, click the Fair Scheduler Preemption link or follow the procedure in Enabling Preemption.
- Do one or more of the following:
- Click the YARN tab.
- Click a configuration set.
- Specify a weight that indicates that pool's share of resources relative to other pools, minimum and maximums for virtual cores and memory, and a limit on the number of applications that can run simultaneously in this pool.
- Click the Impala tab.
- Click a configuration set.
- Specify the maximum number of concurrently running and queued queries in this pool.
- Click the YARN tab.
- If you have enabled ACLs and specified users or groups, optionally select one or more of the Access Control tabs to specify which users and groups can submit jobs and can administer the pool. The default is that anyone can both submit jobs and administer the pool. To restrict either of these permissions to individual users, select the Allow these users and groups" radio button and provide a comma-delimited list of users and groups in the Users and Groups fields respectively. Click OK.
Editing Dynamic Resource Pools
After you edit a resource pool configuration, the displays while the settings are propagated to the services.
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click Edit at the right of a resource pool row. Edit the properties and click OK.
- If you have enabled ACLs and specified users or groups, optionally select one or more of the Access Control tabs to specify which users and groups can submit jobs and can administer the pool. The default is that anyone can both submit jobs and administer the pool. To restrict either of these permissions to individual users, select the Allow these users and groups" radio button and provide a comma-delimited list of users and groups in the Users and Groups fields respectively. Click OK.
Adding Sub-Pools
Pools can be nested as sub-pools. They share among their siblings the resources of the parent pool. Each sub-pool can have its own resource restrictions; if those restrictions fall within the configuration of the parent pool, then the limits for the sub-pool take effect. If the limits for the sub-pool exceed those of the parent, then the parent limits take effect.
Once you create sub-pools, jobs cannot be submitted to the parent pool; they must be submitted to a sub-pool.
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click at the right of a resource pool row and select Add Sub Pool. Configure sub-pool properties.
- Click OK.
YARN Pool Status and Configuration Options
Viewing Dynamic Resource Pool Status
Select Monitoring Dynamic Resource Pools for more information.
. The Status tab displays the YARN resource pools currently in use for the cluster. SeeSetting User Limits
Pool properties determine the maximum number of applications that can run in a pool. To limit the number of applications specific users can run at the same time in a pool:
- Select .
- Click the Configuration tab.
- Click the User Limits tab. The table shows you a list of users and the maximum number of jobs each user can submit.
- Click Add User Limit.
- Specify the username and maximum number of running applications.
- Click OK.
Enabling and Configuring ACLs
To configure which users and groups can submit and kill YARN applications in a pool:
- Select .
- Click the Configuration tab.
- Click the User Limits tab. The table shows you a list of users and the maximum number of jobs each user can submit.
- Click Other Settings.
- Click Admin ACL . The YARN Service-Wide configuration page displays.
- Specify which users and groups can submit and administer applications.
- Click Save Changes to commit the changes.
- Click in the top right.
- Click the Restart button.
- Click Restart Now.
- Click Finish.
Enabling Preemption
- Select .
- Click the Configuration tab.
- Click the User Limits tab. The table shows you a list of users and the maximum number of jobs each user can submit.
- Click Other Settings.
- Click Fair Scheduler Preemption . The YARN ResourceManager configuration page displays.
- Check the checkbox.
- Click Save Changes to commit the changes.
- Click in the top right.
- Click the Restart button.
- Click Restart Now.
- Click Finish.
Placement Rules
Cloudera Manager provides many options for determining how YARN applications and Impala queries are placed in resource pools. You can specify basic rules that place applications and queries in pools based on runtime configurations or the name of the user running the application or query or select an advanced option that allows you to specify a set of ordered rules for placing applications and queries in pools.
To submit a YARN application to a specific resource pool, specify the mapreduce.job.queuename property. The YARN application's queue property is mapped to a resource pool. To submit an Impala query to a specific resource pool, specify the REQUEST_POOL option.
Enabling and Disabling Undeclared Pools
If you do not specify a pool with a job or query property, by default YARN and Impala create a pool "on-the-fly" with the name of the user that submitted the request and assigns it to that resource pool. For YARN, you can change this behavior so that the default pool is used instead:- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click the Placement Rules tab.
- Click Basic radio button.
- Unset the Allow Undeclared Pools property.
Enabling and Disabling the Default Pool
If an application specifies a pool that has not been explicitly configured or is assigned to a pool with the name of user according to the Fair Scheduler User As Default Queue property, by default YARN creates the pool at runtime with default settings. To change the behavior so that under these circumstances the default pool is used instead:- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click the Placement Rules tab.
- Click Basic radio button.
- Unset the Fair Scheduler User As Default Queue property.
Specifying Advanced Placement Rules and Rule Ordering
- Click to add a new rule row and to remove a rule row.
- Click to display a list of rules from which to select for given a rule row.
Configuration Sets
A configuration set defines the allocation of resources across pools that may be active at a given time. For example, you can define "production" and "development" configuration sets, which define different resource pool configurations for different groups.
Creating a Configuration Set
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click Add Configuration Set. The Add Configuration Set dialog displays.
- Type a name in the Name field and select the configuration set to clone from the Clone from Configuration Set drop-down.
- Click OK. The configuration set is added to and selected in the Configuration Sets drop-down.
- For each resource pool, click Edit.
- Select a resource pool configuration set name.
- Edit the pool properties and click OK.
- Define one or more scheduling rules to specify when the configuration set is active.
Example Configuration Sets
The weekday configuration set assigns the production pool four times the resources of the development pool:The weekend configuration set assigns the production and development pools an equal share of the resources:
The default configuration set assigns the production pool twice the resources of the development pool:
See example scheduling rules for these configuration sets.
Viewing the Properties of a Configuration Set
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- In the Configuration Sets drop-down, select a configuration set. The properties of each pool for that configuration set display.
Deleting a Configuration Set
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- In the Configuration Sets drop-down, select a configuration set. The properties of each pool for that configuration set display.
- Click Delete.
Scheduling Rules
A scheduling rule defines when a configuration set is active.
Example Scheduling Rules
Consider the example weekday and weekend configuration sets. To specify that the weekday configuration set is active every weekday, weekend configuration set is active on the weekend (weekly on Saturday and Sunday), and the default configuration set is active all other times, define the following rules:Adding a Scheduling Rule
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click Scheduling Rules.
- Click Add Scheduling Rule.
- In the Configuration Set drop-down, select a configuration set.
- Choose whether the rule should repeat, the repeat frequency, and if the frequency is weekly, the repeat day or days.
- If the schedule is not repeating, click the left side of the on field to display a drop-down calendar where you set the starting date and time. When you specify the date and time, a default time window of two hours is set in the right side of the on field. Click the right side to adjust the date and time.
- Click OK.
Editing a Scheduling Rule
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click Scheduling Rules.
- Click at the right of a rule and select Edit.
- Edit the rule as desired.
- Click OK.
Deleting a Scheduling Rule
- Select . If the cluster has a YARN service, the Dynamic Resource Pools Status tab displays. If the cluster has only an Impala service, the Configuration tab displays.
- If the Status page is displayed, click the Configuration tab. A list of the currently configured pools with their configured limits displays.
- Click Scheduling Rules.
- Click at the right of a rule and select Delete.
- Click OK.
<< Managing Resources | Static Service Pools >> | |