A Moldable Online Scheduling Algorithm and Its Application to … · 2011. 7. 8. · JSSPP 2010...
Transcript of A Moldable Online Scheduling Algorithm and Its Application to … · 2011. 7. 8. · JSSPP 2010...
A Moldable Online Scheduling Algorithm and ItsApplication to Parallel Short Sequence Mapping
Erik Saule, Doruk Bozdag, Umit V. Catalyurek
Department of Biomedical Informatics, The Ohio State University{esaule,bozdagd,umit}@bmi.osu.edu
JSSPP 2010
Supported by the U.S. DOE SciDAC Institute, the U.S. National Science Foundation and the Ohio Supercomputing Center
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
:: 1 / 26
Motivation
Sequencing
Next generationsequencing instruments(SOLiD, Solexa, 454) cansequence up to 1 billionbases a day
Hundreds of millions of35-50 base reads
Mapping
Map reads to a reference genomeefficiently (Human genome: 3Gb)
Need large parallel computer
Pooling resource will decrease cost
We study the job schedulingproblem
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingIntroduction:: 2 / 26
Parallel Short Sequence Mapping[Bozdag et al., IPDPS 09]
Three partitioning dimensions:
P(mg ,mr ,ms) = cgsG
mg+ cg
G
mgms+ crs
R
mr+ (cr + cc
G
mgms)
R
mrms
Partitioning on m processors is finding minimum P(mg ,mr ,ms) such thatmgmrms ≤ m
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingIntroduction:: 3 / 26
Outline of the Talk
1 Introduction
2 A Moldable Scheduling Problem
3 Deadline Based Online Scheduler (DBOS)
4 Experiments
5 Conclusion
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingIntroduction:: 4 / 26
Parallel Short Sequence Mapping
The important facts:
can adapt to different numberof processor
good runtime predictionfunction
no super linear speed up
non convex speedup function(steps)
no preemption
0
2
4
6
8
10
12
14
16
18
20
22
0 5 10 15 20 25 30
speedup
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 5 / 26
Moldable Scheduling
Instancem processors
n tasks
Task i arrives at ri
The execution of i on j processors takes pi ,j time units
12 6 10 4 3 57
Solution
Task i is executed on πi processors
Task i starts at σi
Task i finishes at Ci = σi + pi ,πi
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 6 / 26
Objective Function
Flow time
The flow time is the time spent in the system per a task Fi = Ci − ri .
Does not take task size into account.
Optimizing the maximum flow time is unfair to small tasks.
Optimizing the average flow time should starve large tasks.
Stretch [Bender et al. SoDA 98]
The stretch is the flow time normalized by the processing time of the task.In the moldable tasks context, we define it as si = Ci−ri
pi,1.
It provides a better fairness between tasks.
Optimizing maximum stretch avoids starvation.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 7 / 26
Objective Function
Flow time
The flow time is the time spent in the system per a task Fi = Ci − ri .
Does not take task size into account.
Optimizing the maximum flow time is unfair to small tasks.
Optimizing the average flow time should starve large tasks.
Stretch [Bender et al. SoDA 98]
The stretch is the flow time normalized by the processing time of the task.In the moldable tasks context, we define it as si = Ci−ri
pi,1.
It provides a better fairness between tasks.
Optimizing maximum stretch avoids starvation.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 7 / 26
Online maximum stretch can not be approximated
Adversary technique on one processor
A large task enters in the system
On several processors
There are similar techniques on several processors but there are morecomplicated and thus less prone to appear in practice.The key point: if all processors are busy, a small task entering the systemwill have a large stretch.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 8 / 26
Online maximum stretch can not be approximated
Adversary technique on one processor
If it is scheduled immediately, a small task is sent
On several processors
There are similar techniques on several processors but there are morecomplicated and thus less prone to appear in practice.The key point: if all processors are busy, a small task entering the systemwill have a large stretch.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 8 / 26
Online maximum stretch can not be approximated
Adversary technique on one processor
It suffers a large delay (and an unbounded stretch)
On several processors
There are similar techniques on several processors but there are morecomplicated and thus less prone to appear in practice.The key point: if all processors are busy, a small task entering the systemwill have a large stretch.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 8 / 26
Online maximum stretch can not be approximated
Adversary technique on one processor
If the large task is scheduled later, a small task is sent accordingly
On several processors
There are similar techniques on several processors but there are morecomplicated and thus less prone to appear in practice.The key point: if all processors are busy, a small task entering the systemwill have a large stretch.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 8 / 26
Online maximum stretch can not be approximated
Adversary technique on one processor
It suffers a large delay (and an unbounded stretch)
On several processors
There are similar techniques on several processors but there are morecomplicated and thus less prone to appear in practice.The key point: if all processors are busy, a small task entering the systemwill have a large stretch.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 8 / 26
Online maximum stretch can not be approximated
Adversary technique on one processor
It suffers a large delay (and an unbounded stretch)
On several processors
There are similar techniques on several processors but there are morecomplicated and thus less prone to appear in practice.The key point: if all processors are busy, a small task entering the systemwill have a large stretch.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
A Moldable Scheduling Problem:: 8 / 26
Outline of the Talk
1 Introduction
2 A Moldable Scheduling Problem
3 Deadline Based Online Scheduler (DBOS)
4 Experiments
5 Conclusion
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 9 / 26
Principle of the Deadline Based Online Scheduler (DBOS)
All tasks running concurrently should get the same stretch tomaximize efficiency
Using the optimal maximum stretch as an instant measure of the load
Aim at a more efficient schedule than the optimal instant maximumstretch one to deal with still-to-arrive tasks
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 10 / 26
The DBOS Algorithm
Targeting a maximum stretch S
Task i must complete before the deadline Di = ri + pi ,1S .
Moldable Earliest Deadline First (MEDF)
Considers task in deadline order.
Allocates the minimum number of processors to each task tocompletes before the deadline.
Schedules the task as soon as possible without moving any other task.
DBOS(ρ)
Estimate the best maximum stretch S* using a binary search.
The deadline problem is solved by MEDF.
Build a schedule of good efficiency of stretch ρS*.
ρ is the online parameter
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 11 / 26
The DBOS Algorithm
Targeting a maximum stretch S
Task i must complete before the deadline Di = ri + pi ,1S .
Moldable Earliest Deadline First (MEDF)
Considers task in deadline order.
Allocates the minimum number of processors to each task tocompletes before the deadline.
Schedules the task as soon as possible without moving any other task.
DBOS(ρ)
Estimate the best maximum stretch S* using a binary search.
The deadline problem is solved by MEDF.
Build a schedule of good efficiency of stretch ρS*.
ρ is the online parameter
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 11 / 26
The DBOS Algorithm
Targeting a maximum stretch S
Task i must complete before the deadline Di = ri + pi ,1S .
Moldable Earliest Deadline First (MEDF)
Considers task in deadline order.
Allocates the minimum number of processors to each task tocompletes before the deadline.
Schedules the task as soon as possible without moving any other task.
DBOS(ρ)
Estimate the best maximum stretch S* using a binary search.
The deadline problem is solved by MEDF.
Build a schedule of good efficiency of stretch ρS*.
ρ is the online parameter
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 11 / 26
An example
�������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������
A system with two pending tasks
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 12 / 26
An example
max stretch=2
�������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������
Deadlines induced by a stretch of 2
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 12 / 26
An example
max stretch=2
�������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������
A maximum stretch of 2 is reachable
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 12 / 26
An example
max stretch=1
�������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������
But 1 is not
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 12 / 26
An example
max stretch=1.5
�������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������
Neither 1.5
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 12 / 26
An example
max stretch=1.6
�������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������
The best stretch is 1.6
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 12 / 26
An example
max stretch=1.75
�������������������������������������������������������������������������������������
�������������������������������������������������������������������������������������
�����������������������������������������������������������������
�����������������������������������������������������������������
The online parameter ρ = 1.1 leaves much more space (thanks to MEDF).
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task Scheduling
Deadline Based Online Scheduler (DBOS):: 12 / 26
Outline of the Talk
1 Introduction
2 A Moldable Scheduling Problem
3 Deadline Based Online Scheduler (DBOS)
4 Experiments
5 Conclusion
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 13 / 26
An Iterative Process [Sabin et al, JSSPP 06]
The algorithm
Processor allocation are evaluated using theflow-time of the FCFS schedule
Starts with one processor per task.
Try to add one processor to the task thatwill reduce its processing time the most
If it is better, keep it
Otherwise remove the processor and nevertry that task again
Properties
Optimizing flow time
Claimed to outperform fair share
Parameter-less
0
2
4
6
8
10
12
14
16
18
20
22
0 5 10 15 20 25 30
speedup
Improvement
If the speedup functionis non convex or hassteps. The algorithmgets stuck.Modification: step tothe next point on theconvex hull
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 14 / 26
First Experimental Setting
Goal: assess performance on a well known setting
Downey model
Two parameters:
Average parallelism
Distance to linear speedup
0
10
20
30
40
50
60
70
0 50 100 150 200 250 300
00.5
12
50
2YQFIV�SJ�4VSGIWWSVW
7TIIHYT�[MXL�ER�%ZIVEKI�4EVEPPIPMWQ�SJ����(M2IVIRX�GYVZIW�KMZIW�HM2IVIRX�HMWXERGI�XS�PMRIEV�WTIIHYT�
Generation
512 processors
First 5000 tasks of SDSC Par96 (From the Feitelsonarchive)
Sequential time : totalexecution time
Average parallelism : betweennumber of used processor and512
Distance to linear speedup :between 0 and 2
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 15 / 26
Downey model results
0 1 2 3 4 5x 10
4
0.00000001
0.000001
0.0001
0.01
1
100
10000
Sorted tasks
Str
etch
IterativeDBOS ρ=1DBOS ρ=1.5
DBOS generates less tasks with high stretch.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 16 / 26
Downey model results
0 1 2 3 4 5x 10
4
100
10000
1000000
100000000
10000000000
Sorted tasks
Flo
w
IterativeDBOS ρ=1DBOS ρ=1.5
DBOS leads to better flow time. Iterative could be improved.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 17 / 26
Second Experimental Setting
Goal: test case reflecting the cluster usage
Generation
512 processors
Each task corresponds to one lab studying one genome
Speedup according to the runtime prediction function
5000 tasks with exponential inter-arrival time
Changing the parameter of the exponential to control the load
Real data
Sequencing machine Reads454 GS FLX Genome Analyzer 1 millionSolexa IG sequencer 200 millionSOLiD system 400 million
Genome SizeE. Coli 4.6 millionYeast 15 millionA. Thaliana 100 millionMosquito 280 millionRice 465 millionChicken 1.2 billionHuman 3.4 billion
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 18 / 26
Mapping : the online parameter (average stretch)
100−115 200−230 330−360 450−500 500−570 640−7100.01
0.1
1
Ave
rag
e S
tret
ch
Load
DBOS ρ=1DBOS ρ=1.1DBOS ρ=1.3DBOS ρ=1.5
Quickly drops with ρ. Step at ρ = 1.3.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 19 / 26
Mapping : the online parameter (maximum stretch)
100−115 200−230 330−360 450−500 500−570 640−7100.1
1
10
100
Max
imu
m S
tret
ch
Load
DBOS ρ=1DBOS ρ=1.1DBOS ρ=1.3DBOS ρ=1.5
Max stretch is kept at a reasonable level. The online parameter ρ is veryhelpful here.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 20 / 26
Mapping : tuning the online parameter
1 2 3 4 5 6 70.01
0.1
1
Ave
rag
e S
tret
ch
ρ
640−710500−570450−500330−360200−230100−115
On non-overloaded cases, the average stretch is bimonotonic. Areasonable ρ value is easy to find.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 21 / 26
Mapping : DBOS vs Iterative (average flow)
100−115 200−230 330−360 450−500 500−570 640−71010,000
100,000
1,000,000
Ave
rag
e F
low
Load
IterativeImproved IterativeDBOS ρ=1.5
DBOS is competitive.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 22 / 26
Mapping : DBOS vs Iterative (average stretch)
100−115 200−230 330−360 450−500 500−570 640−7100.01
0.1
1
Ave
rag
e S
tret
ch
Load
IterativeImproved IterativeDBOS ρ=1.5
DBOS leads to much better stretch (even when iterative got stuck).
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingExperiments:: 23 / 26
Outline of the Talk
1 Introduction
2 A Moldable Scheduling Problem
3 Deadline Based Online Scheduler (DBOS)
4 Experiments
5 Conclusion
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingConclusion:: 24 / 26
The end
Conclusion
Pooling the resources in short sequence mapping operation shouldlower the costs.
To provide fairness stretch should be considered instead of flow time.
An scheduling algorithm is proposed to optimize stretch and avoidworst case online scenario.
Which performs well on Short Sequence Mapping application.
Perspective
Investigate other ways to avoid worst case scenarios.
Study more simple algorithms/models to get reference points.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingConclusion:: 25 / 26
The end
Conclusion
Pooling the resources in short sequence mapping operation shouldlower the costs.
To provide fairness stretch should be considered instead of flow time.
An scheduling algorithm is proposed to optimize stretch and avoidworst case online scenario.
Which performs well on Short Sequence Mapping application.
Perspective
Investigate other ways to avoid worst case scenarios.
Study more simple algorithms/models to get reference points.
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingConclusion:: 25 / 26
A Moldable Online Scheduling Algorithm and ItsApplication to Parallel Short Sequence Mapping
Erik Saule, Doruk Bozdag, Umit V. Catalyurek
Department of Biomedical Informatics, The Ohio State University{esaule,bozdagd,umit}@bmi.osu.edu
JSSPP 2010
Supported by the U.S. DOE SciDAC Institute, the U.S. National Science Foundation and the Ohio Supercomputing Center
Erik SauleOhio State University, Biomedical Informatics
HPC Lab http://bmi.osu.edu/hpcMoldable Task SchedulingConclusion:: 26 / 26