Project

General

Profile

Fixing cloud scheduling » History » Version 2

Peter Amstutz, 07/25/2018 05:06 PM

1 1 Peter Amstutz
h1. Fixing cloud scheduling
2
3
Our current approach to scheduling containers on the cloud using SLURM has a number of problems:
4
5
* Head-of-line problem: with a single queue, slurm will only schedule the job at the top of the queue, if it cannot be scheduled, every other job has to wait.  This results in wasteful idle nodes and reduces throughput.
6
* Queue ordering doesn't reflect our desired priority order without a lot of hacking around with "niceness"
7
* Slurm queue forgets dynamic configuration, requires constant maintenance processes to reset slurm dynamic configuration 
8
9 2 Peter Amstutz
Things that slurm currently provides:
10
11
* allocating containers to specific nodes
12
* reporting idle/busy/failed/down state, and out of contact 
13
14 1 Peter Amstutz
Some solutions:
15
16
h2. Use slurm better
17
18
Most of our slurm problems are self-inflicted.  We have a single partition and single queue with heterogeneous, dynamically configured nodes.  We would have fewer problems if we adopted a strategy whereby we define configure slurm ranges "compute-small-[0-255]", "compute-medium-[0-255]", "compute-large-[0-255]" with appropriate specs.  Define a partition for each size range, so that a job waiting for one node size does not hold up jobs that want a different node size.
19
20
Advantages:
21
22
* Least overall change compared to current architecture
23
24
Disadvantages:  
25
26
* Requires coordinated change to API server, node manager, crunch-dispatch-slurm, cluster configuration
27
* Ops seems to think that defining (sizes * max nodes) hostnames might be a problem?
28
* Can't adjust node configurations without restarting the whole cluster
29
30
h2. Cloud provider scheduling APIs
31
32
Use cloud provider scheduling APIs such as Azure Batch, AWS Batch, Google pipelines API to perform cluster scaling and scheduling.
33
34
Would be implemented as custom Arvados dispatcher services: crunch-dispatch-azure, crunch-dispatch-aws, crunch-dispatch-google.
35
36
Advantages:
37
38
* Get rid of Node Manager
39
40
Disadvantages:
41
42
* Has to be implemented per cloud provider.
43
* May be hard to customize behavior, such as job priority.
44
45
h2. Kubernetes
46
47
Submit containers to a Kubernetes cluster.  Kubernetes handles cluster scaling and scheduling.
48
49
Advantages:
50
51
* Get rid of node manager
52
* Desirable as part of overall plan to be able to run Arvados on Kubernetes
53
54
Disadvantages:
55
56
* Running crunch-run inside a container requires docker-in-docker (privileged container) or access to the Docker socket.
57
58
h2. Crunch-dispatch-local
59
60
Node manager spins up nodes based on container queue.  Compute nodes run crunch-dispatch-local or similar service, which asks the API server for work and then runs it.  Possibly node manager directly decides which jobs should go onto which nodes.
61
62
Advantages:
63
64
* Complete control over scheduling decisions / priority
65
66
Disadvantages:
67
68
* Requesting work puts additional load of API server (may not be any worse than live logging, though)
69
* Need a new scheme for nodes to report their status so that node manager knows if they are busy, idle.  Node manager has to be able to put nodes in equivalent of "draining" state to ensure they don't get shut down while doing work.  (We can use the "nodes" table for this).
70
* Need to be able to detect node failure.