miquel angel senar unitat d’arquitectura de computadors i sistemes operatius universitat autònoma...
DESCRIPTION
Self-Adjusting Scheduling of Master-Worker Applications A simple example: an image thinning application Original 10 It. Latter 36 It. LatterTRANSCRIPT
Miquel Angel SenarUnitat d’Arquitectura de Computadors i Sistemes Operatius
Universitat Autònoma de [email protected]
Self-Adjusting Scheduling of Master-Worker Applications on Opportunistic Environments
Self-Adjusting Scheduling of Master-Worker Applications
Problem Backgroung›Parallel Application that follows the master-worker model›A master process is assigned several batches of tasks›The master process allocates worker processes to solve each batch›Batches are solved iteratively
Self-Adjusting Scheduling of Master-Worker Applications
A simple example:an image thinning application
Original 10 It. Latter 36 It. Latter
Self-Adjusting Scheduling of Master-Worker Applications
Master Process
Divides ImageWorkers Compute
Concurrently
MasterAggregates
Image
Image Thinning as aMaster-Worker Application!
Self-Adjusting Scheduling of Master-Worker Applications
Running the application with MW + Condor-PVM
master
tasks
worker
worker
worker
results
worker
worker
workerPVM
PVM
Self-Adjusting Scheduling of Master-Worker Applications
Challenges of master-worker applications
› Task scheduling› Number of workers› Dealing with heterogeneous processor › Impact of preemption
Self-Adjusting Scheduling of Master-Worker Applications
Our Self-Adjusting Strategy› Dynamically measures application performance
and task execution times› Predicts the resource requirements from measured
history › Schedules tasks on the resources according to that
prediction in order to minimize the completion time of the application
› Voluntary relinquishes resources when they are not plentifully utilized
› Allocates more resources whenever a significant loss in speedup is detected.
Self-Adjusting Scheduling of Master-Worker Applications
0
0.2
0.4
0.6
0.8
1
0 5 10 15 20 25 30 35
Effic
ienc
y
Machines
EFFICIENCY. 30% 1-0 Dev=10 Tasks=31 Loop=35
LPTFRandomLPTF on AverageRandom & Average
Influence of Task Scheduling
Self-Adjusting Scheduling of Master-Worker Applications
How does our strategy work (1)?
› Collects task execution times at each iteration
› Sorts tasks according to their average execution time (Prediction)
› At each iteration, tasks are scheduled according following the order of that list
Self-Adjusting Scheduling of Master-Worker Applications
0
0.2
0.4
0.6
0.8
1
0 5 10 15 20 25 30
Effic
ienc
y
Machines
EFFICIENCY. Tasks=30
LPTF
Influence of the Number of Workers
85
145
2
Self-Adjusting Scheduling of Master-Worker Applications
0
0.2
0.4
0.6
0.8
1
0 5 10 15 20 25 30
Effic
ienc
y
Machines
EFFICIENCY. Tasks=30
LPTF
Influence of the Number of Workers
85
14
5
2
Self-Adjusting Scheduling of Master-Worker Applications
How does our strategy work (2)?
Initially, allocates 1 Worker per Task
Reduces the number of workers to
Allocates 1 more Worker if (ExecutionTime > (Largest Task + Threshold))
Releases 1 Worker if (Efficiency < 0.8)
TaskLargestTimeEx.Totalw
Self-Adjusting Scheduling of Master-Worker Applications
Sample Result: No. of Workers
0
510
1520
25Nu
mbe
r of
Wor
kers
Self-Adjusting Non Self-Adjusting
Self-Adjusting Scheduling of Master-Worker Applications
0
0,2
0,4
0,6
0,8
1Effic
ienc
y
Self-Adjusting Non Self-Adjusting
Sample Result: Efficiency
Self-Adjusting Scheduling of Master-Worker Applications
0510152025
1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90
Iteration Number
Exec
. Tim
e (s
ec.)
Sample Result: Execution Time
Self-Adjusting Non Self-Adjusting
Self-Adjusting Scheduling of Master-Worker Applications
Dealing with heterogeneity› Problem: wall clock time reflects application code
and resource performance
› Master and Worker machines have a performance normalization factor (i). (Benchmarking)
› Task scheduling decisions are based on normalized task execution times (user time multiplied by ’s)
› Worker allocation decisions are based on wall clock time measured at the master process
Self-Adjusting Scheduling of Master-Worker Applications
Dealing with heterogeneity
0
10
20
30
40
Num
ber of
Wor
kers
Self-Adjusting Non Self-Adjusting
Self-Adjusting Scheduling of Master-Worker Applications
Dealing with Preemption
845 4
8
45
3
2
2
4
1
We expect this
This is what happens And this is
what we get
8
1
32
2
45 44
Self-Adjusting Scheduling of Master-Worker Applications
Dealing with Preemption› SOLUTION (still working on it): Using extra
machines
› Complete Replication (extra machines running a copy of one of the largest tasks) usually performs better than No Replication
› Every extra machines has a negative impact on overall efficiency (between 3% and 8%)
› CR with 2 extra machines exhibits a good trade-off if one machine is lost at every iteration.
Self-Adjusting Scheduling of Master-Worker Applications
And coming soon…
delays
Miquel Angel SenarUnitat d’Arquitectura de Computadors i Sistemes Operatius
Universitat Autònoma de [email protected]
Self-Adjusting Scheduling of Master-Worker Applications on Opportunistic Environments