Setting Up Airflow Pools for Concurrent Tasks

By default, Cloudera Workflow Orchestrator supports up to 256 parallel tasks. However, actual task concurrency depends on your cluster's available CPU and memory. To prevent resource exhaustion and service disruption, configure Airflow Pools in the UI to align maximum execution limits with your cluster's capacity.

Resource Requirements:

  • Kerberos sidecar resource allocations for Cloudera Base Cluster Connections:
    • Requests: 100m CPU and 256 MB of RAM
    • Limits: 100m CPU and 256 MB of RAM
  • Default worker resource allocations:
    • Requests: 100m CPU and 1 GB of RAM
    • Limits: Unrestricted CPU and a strict limit of 1 GB of RAM

    For configuring worker resources, see Configuring worker pod resources in a DAG file.

Calculating the recommended pool size:

Because each worker requires 1 GB of RAM, you can determine your optimal Cloudera Workflow Orchestrator Pool size.

Formula:

Recommended number of slots based on RAM usage = (Total worker nodes RAM - (number of workers * 3 GB node infra services)) ÷ worker RAM usage

Recommended number of slots based on CPU usage = Total worker nodes CPU - (number of workers * 1.2 CPU node infra services)) ÷ worker CPU usage

Recommended Pool Size = Minimum of the above two values

For more information about pools, see Airflow Pools.

Perform the following steps to configure the parallel worker limit using Cloudera Workflow Orchestrator Pools:

  1. Access Anywhere Cloud Console.
  2. Sign in using your enterprise identity provider.
  3. Click Apps in the left navigation pane on the Anywhere Cloud Console. The list of deployed engines and the associated blueprints is displayed.
  4. In the Deployed Engines tab, search for the required Cloudera Workflow Orchestrator instance.
  5. Verify that the status of the instance is Running.
  6. Click on that instance. A details pane is displayed.
  7. Click on the Cloudera Workflow Orchestrator URL available in the URL column. The Cloudera Workflow Orchestrator console home page is displayed.
  8. Perform one of the following steps:
    • Edit an existing pool and modify the slots:
      1. In the Cloudera Workflow Orchestrator Home page, click Manage Pools next to Pool Slots.
      2. Click the Edit Pool icon next to the pool name.
      3. In the Slots field, enter the recommended pool size calculated for your cluster.
      4. Click Save.
    • Add a new pool:
      1. In the left navigation menu, click Admin > Pools > Add Pool.
      2. Update the following configurations:
        1. Name: Enter a unique identifier for the pool. For example, cwo_worker_pool.
        2. Slots: Enter the recommended pool size calculated for your cluster.
        3. Description: Enter a description about the pool.
      3. (Optional) Select Include Deferred checkbox to include deferred tasks when calculating open pool slots.
      4. Click Save.
  9. Update your DAG definitions to ensure tasks are routed to this pool. Add the pool parameter to your task definitions.
    Example,
    pool='cwo_worker_pool'