Capacity that grows with the cluster,
resources shared through queues.
How to expand storage and processing, organize queues, and separate workloads in TDP Datacenter, taking into account the machines and the shared resources.
Topics on this page
- CPU, memory, disk and network
- Storage and processing expansion
- Queues and capacity in YARN
- Application resources in YARN
- Separation of workloads and nodes
CPU, memory, disk and network
In Datacenter, the services run on the cluster machines.
Sizing takes into account process memory, available CPU, disk capacity and the network, with resources reserved for the operating system and for the other services on the host.
In YARN, the NodeManagers advertise the capacity made available to applications.
Parameters such as yarn.nodemanager.resource.memory-mb and yarn.nodemanager.resource.cpu-vcores define this offer to the scheduler. They do not create additional physical resources.
YARN → Configs and the memory and execution parameters of each service in Ambari. Details in Minimum requirements and YARN.
Storage and processing expansion
New DataNodes can expand HDFS capacity. New NodeManagers can make additional resources available to YARN applications.
The roles can share machines or be separated according to the deployment design.
Storage
DataNodes
Usable capacity takes into account replication, free space and block distribution. Rebalancing requires its own monitoring.
Processing
NodeManagers
New nodes start advertising resources to YARN, and their use by applications can be tracked in the ResourceManager.
Other engines
Workers and processes
Trino, NiFi and other services have their own distribution models. Their instances and resources are sized separately.
Adding machines requires preparing them and registering them in Ambari, assigning components and following the expansion procedure of the services involved.
Preparation and component assignment in Service installation. Concepts in HDFS and Datacenter Architecture.
Queues and capacity in YARN
The Capacity Scheduler makes it possible to organize applications into queues, with capacities, limits and permissions.
With it, workloads from different areas or purposes can be kept separate, with their own rules for sharing capacity.
What the figure shows:
- The ResourceManager, with the Capacity Scheduler, organizes the applications into queues. In TDP Datacenter, the Capacity Scheduler is the scheduler configured in YARN, and the queues start from the root queue,
root. - Each queue receives a capacity, as a percentage of the parent queue, and a maximum capacity, which limits how much it can take up when there are free resources. With YARN ACLs enabled, each queue also has its own lists of who can submit applications and who can administer it. A reporting queue and a batch processing queue, for example, can receive different limits to prevent one workload from using all the capacity offered to YARN.
- The capacity of the NodeManagers, advertised by them and made available to the applications, is what the queues share.
The policy for resource lending, preemption and concurrency follows the company's priorities.
YARN → Configs, Capacity Scheduler properties. The queue tree and usage appear in the ResourceManager interface. Reference: Capacity Scheduler.
Application resources in YARN
In the Spark on YARN model, drivers and executors are sized according to the application.
The YARN scheduler assigns containers within the limits of the queues and of the available capacity.
More parallelism can help a distributed workload, but it also increases contention for memory, disk and network.
Executors, memory and partitions can be tuned based on measurements, and the settings of Hive and of the execution sessions in use are evaluated separately.
In the Spark Thrift Server, dynamic allocation, which adjusts the number of executors according to the load, is enabled in Ambari (spark.dynamicAllocation.enabled) together with the external shuffle service (spark.shuffle.service.enabled).
In the other Spark applications, dynamic allocation is a configurable option.
Separation of workloads and nodes
Queues organize the consumption of the applications that go through YARN.
Services that run outside this scheduler have their own controls and depend on the planning of the shared infrastructure.
YARN node labels are configurable: when enabled, applications and queues can be associated with groups of nodes.
It is also possible to reserve hosts for certain services by assigning their components in Ambari.
For a company that receives events through Kafka while processing large batches, one possible design is to reserve hosts for the brokers and to organize the YARN jobs into queues.
In this design, disk and network are part of the planning together with CPU and memory.
Queue and label rules in YARN, component assignment in Ambari and host controls. Reference: YARN Node Labels.
Scenario: one queue per area at month-end closing
Situation: a company's Finance and Marketing areas use the same cluster.
At month-end closing, the Finance reports compete for capacity with the Marketing batch workloads.
What TDP does: in the Capacity Scheduler, each area receives its own queue, such as root.financas and root.marketing, with capacity and maximum capacity adjusted to the measurements taken in the YARN ResourceManager and in the Grafana dashboards integrated with Ambari Metrics.
With YARN ACLs enabled, each queue allows application submission only to the group of the corresponding area, and the profiles of the Spark applications are tested in each queue.
Effect: each area submits its applications only to its own queue, and the maximum capacity prevents one area's workloads from taking up all the capacity offered to YARN.
If the measured demand exceeds the capacity the cluster actually offers, new NodeManagers can be added through Ambari.