Fairesias: A CS243 Cluster Scheduler based on Tiresias and inspired by THEMIS
===
-
What Did We Modify:
run_sim.py: The main function script of this simulatoranalyze.py: Added an analysis file*_job.csv: Job trace file that was modified to add the lying field. Jobs have the following necessary fields:job_id,num_gpu,submit_time,iterations,model_name,duration,interval,liarlog.py: Log function for the simulator, we modified to provide more robust loggingcluster_spec.csv: Cluster spec file, including the fields:num_switch,num_node_p_switch,num_gpu_p_node,num_cpu_p_node,mem_p_node
-
Before the execution, what's needed?
- Infrastructure details
Define the hierarchy and resource capacity of the infrastructure in
cluster_spec.csv. For example, we have a cluster with 4 racks (switches). Under each rack (switch), there are 32 nodes. And each node has 128 CPU cores, 256 GB memory, and 8 GPUs. Thencluster_spec.csvwill look like this:num_switch,num_node_p_switch,num_gpu_p_node,num_cpu_p_node,mem_p_node 4,32,8,128,256
- Job trace
The job trace to simulate. For each job, the simulator needs the following information:
job_id: for trackingnum_gpu: gpu requirementsubmit_time: when the job is submitted. The simulator is event-based and discrete-time. Therefore, the time value starts from0, and in second-scale.iterations: the number of iterations to training. For the scheduling schemes in Tiresias, they are not relying on this information.model_name: what's the model in that job. This is used to estimate the CPU and GPU memory usage, and tensor size (in MB, only consider the large tensors).duration: how long this job will run. This information is used to generate job completion event by the simulator.interval: job submission interval from this job to the next job
- Infrastructure details
Define the hierarchy and resource capacity of the infrastructure in
-
How to run the simulator?
In terminal, run
./sim_runs.sh
This executes the following command with the required options:
python3 run_sim.py --cluster_spec=n32g4.csv --print --scheme=yarn --trace_file=480_job.csv --schedule=dlas --log_path=test_1 fss=True
The following options are necessary and set within the shell file:
--cluster_spec: infrastructure spec file--trace_file: job trace--scheme: placement scheme--schedule: scheduler--fss: Run with FSS scheduling
-
What are the placement and scheduling algorithms provided?
Our project modifies the DLAS (discretized LAS GPU Time Based) algorithm proposed by Tiresias.
Scheduling
fifo: We use FIFO as baselinedlas-gpu: discretized LAS (gpu-time-based)fss: scheduling with fair share score from a weighted average of the delta of your expected utilization and actual utilization and your utilization compared to everyone else
-
What's the output?
cluster.csv: cluster-level resource utilization info at each event pointjobs.csv: the job execution informationusers.csv: the FSS scoring for the user
The output logs are defined in
log.pyWe pass the output to
analyze.pythat does Pandas analytics on top of the CSV file for added insights.