liveBook · Manning

Fair-share scheduling

As explained in Distributed Machine Learning Patterns

Fair-share scheduling is an operating-system scheduling algorithm that distributes CPU usage among users or groups rather than equally among individual processes.

Fair-share scheduling distributes CPU usage equally among users or groups rather than equally among individual processes. When a new user arrives, the scheduler reapportions available CPU cycles across all users. section 6.2.2

For distributed model-training clusters shared by multiple teams, it gives each user or group a resource pool so concurrent jobs do not interfere with one another. The policy can be applied at process, user, and group levels. section 6.2.2 section 6.2.3

Divide capacity by groups, then users

With three groups, each receives 33.3% of CPU cycles. If the groups contain three, two, and four users, their per-user shares are 11.1%, 16.7%, and 8.3%, respectively. section 6.2.2

Figure 6.4 A summary of the resource allocation for each user in three groups
06-04

Compare per-user CPU allocations after equal capacity is assigned to each group and then divided among its members. section 6.2.2

Fair-share scheduling fits alongside other cluster scheduling policies:

  • Priority scheduling executes jobs by priority and can preempt lower-priority work; administrators may need rules and limits to prevent abuse. section 6.2.3
  • Gang scheduling waits until communicating workers are ready together, which suits collective-communication training but not elastic scheduling. section 6.2.3

How Distributed Machine Learning Patterns covers it

How deep it goes
Defines user- and group-based CPU sharing with worked percentage calculations, without implementation details.
Examples
Calculates CPU shares for users and for three groups with different membership counts.
What it assumes
Introduces the policy through CPU-cycle allocation and simple equal-share arithmetic.
What you can do after
Apply it to divide cluster CPU resources across users, groups, or processes running concurrent jobs.
How it connects
Contrasts fair-share scheduling with priority scheduling, gang scheduling, and elastic scheduling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Distributed Machine Learning Patterns. The section links point to the parts of the book it draws on.