palirria accurate on line parallelism estimation for
play

Palirria: Accurate On-line Parallelism Estimation for Adaptive - PowerPoint PPT Presentation

Palirria: Accurate On-line Parallelism Estimation for Adaptive Work-Stealing Georgios Varisteas, Mats Brorsson PMAM, February 2014 KTH Royal Institute of Technology Motivation Increasing number of cores per die Worrisome power budget


  1. Palirria: Accurate On-line Parallelism Estimation for Adaptive Work-Stealing Georgios Varisteas, Mats Brorsson PMAM, February 2014 KTH Royal Institute of Technology

  2. Motivation ● Increasing number of cores per die – Worrisome power budget – Unequipped OS resource management Intel i7 AMD Phenom II Intel Xeon Phi 2

  3. Motivation: Scheduling ● Keep the system utilized just enough to lower the power budget – Conservative core allotment ● Allot cores so that application performance is maximized – Liberal core allotment 3

  4. Dynamic Multiprogramming ● Adapt allotment size to actual application processing requirements – Each application must provide knowledge on its exposed parallelism – The OS can intelligently partition available resources 4

  5. Summary ● Palirria – Method for estimating a task-based workload's concurrency ● Accurate, lightweight, online, no training – Built upon a variation to traditional work-stealing ● Deterministic Victim Selection ( DVS ) replaces victim selection in any work-stealing scheduler ➔ Good performance with less worker threads for workloads of irregular parallelism 5

  6. Task-centric programming models ● Expose independent computations, executable in parallel ● Adapt easily – Logical, not bound to hardware task Sync Spawn main main Sync Spawn task 6

  7. Work Stealing ● Pre created pool of worker threads ● Local task queue per worker thread ● Workers place spawned tasks in their queue ● If worker idle: 1. Steals from its own task-queue 2. Steals from a remote task-queue (victim) ● Victim selection : find a non-empty remote queue – Traditionally employs some randomness 7

  8. From Estimation to Adaptation ● Estimate a workload's parallelism – Metric for quantifying parallelism ● Decide adequate allotment size – Conditions for requesting change 8

  9. Parallelism Estimation: Metrics ● Traditional black box approaches ➔ Measure cycles or other perf. counters ✗ Estimate based on past behavior ✗ Hardware dependent ● Could we exploit the scheduling? ➔ Parallelism currency: task-queue size ✔ Estimate based on future processing needs ✔ Hardware agnostic 9

  10. Parallelism Estimation: Decision ● Maybe add more workers – Over-utilized allotment – Non empty task queues ● Probably need less workers – Under-utilized allotment – Empty task-queues 10

  11. Parallelism Estimation: Issues ● Threshold: What queue size should decide over-utilization? ● Overhead: How many workers should qualify this condition? ● Balance: What if some workers are over- and others under- utilized? ● Random victim selection hinders estimation 11

  12. Scheduling Support for Parallelism Estimation ● Must normalize work discovery latency – Predictable distribution of tasks among workers ● Must infer global status from some workers – Uniform distribution of tasks among workers 12

  13. DVS: Deterministic Victim Selection ● Completely non-random victim selection ➔ Uniformly distributes tasks to all workers ➔ Reduces worst latency for task discovery ➔ Maintains performance Paper: G. Varisteas, M. Brorsson. DVS: Deterministic Victim Selection to Improve Performance in Work-Stealing Schedulers . MULTIPROG 2014, Vienna http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-139400 13

  14. DVS: Worker Classification ● Model available workers as a virtual mesh grid ● Classify workers based on location – X : vertically & horizontally from the source – Z : at maximum distance from the source – F : what remains 14

  15. Palirria: Decision Policy ● Under-utilized : decrease – All workers in Z have empty task-queue ● Over-utilized : increase – All workers in X have more than L tasks in their task-queue ● Balanced : no change – If otherwise 15

  16. Palirria: Over-utilization condition ● L i > |O i | – |O i |: Number of Outer victims 16

  17. Palirria: Over-utilization condition ● L i > |O i | – |O i |: Number of Outer victims w i 17

  18. Palirria: Over-utilization condition Outer victims of w i ● L i > |O i | – |O i |: Number of Outer victims w i 18

  19. Palirria: Over-utilization condition Outer victims of w i ● L i > |O i | – |O i |: Number of Outer victims w i 19

  20. Palirria: Over-utilization condition Outer victims of w i ● L i > |O i | L > 3 – |O i |: Number of Outer victims w i 20

  21. Palirria: Over-utilization condition Outer victims of w i ● L i > |O i | L > 3 – |O i |: Number of Outer victims w i ● O i : workers that have w i as their primary victim 21

  22. Palirria: Over-utilization condition Outer victims of w i ● L i > |O i | L i > 3 – |O i |: Number of Outer victims w i ● O i : workers that have w i as their primary victim ● L tunes tolerance 22

  23. Palirria: Over-utilization condition Outer victims of w i ● L i > |O i | L i > 3 – |O i |: Number of Outer victims w i ● O i : workers that have w i as their primary victim ● L = |O i | + 1 ● L is calculated when constructing the victim-set 23

  24. ASTEAL: prominent related work ● Metric : cycles spent on wasteful actions – Failed steal attempts ● Samples the cycle counter of all workers 24

  25. Palirria Evaluation ● All implementations using the same WOOL scheduler ● Linux on a 48-core Opteron Numa system 25

  26. Accuracy ● Dynamically changed allotment size over time ● WOOL: best fixed size execution time 26

  27. Accuracy: irregular workloads 27

  28. Accuracy: regular workloads 28

  29. Wastefulness ● Percentage of the avg per worker execution time spent: – idling – on failed steal attempts % n: fixed n-workers AS: Asteal adaptive PA: Palirria adaptive 29

  30. Wastefulness: irregular workloads 30

  31. Wastefulness: regular workloads 31

  32. Conclusions ● Non-random workload distribution techniques – Are efficient – Enable accurate estimation of parallelism ● Task-queue size – Quantifies future parallelism – Is hardware agnostic 32

  33. Summary ● Palirria – Method for estimating a task-based workload's concurrency ● Accurate, lightweight, online, no training – Built upon a variation to traditional work-stealing ● Deterministic Victim Selection ( DVS ) replaces victim selection in any work-stealing scheduler ➔ Good performance with less worker threads for workloads of irregular parallelism 33

  34. Thank you 34

  35. Dynamic Resource Allocation ● The operating system knows resource availability ● The application runtime knows resource requirements 35

  36. Two Level Scheduling Scheme 36

  37. Flow of Tasks Parallel program One parallel section sequence of parallel sections 37

  38. Flow of Tasks Spawn Spawn main task task Spawn Spawn task task Spawn Spawn task task 38

  39. Task Scheduling Issues ● Adaptation of allotment size – Dynamically estimate actual parallelism ➔ Predictable distribution of tasks ● Uniform distribution – Available tasks equally distributed ➔ Controllable distribution of tasks 39

  40. Work-stealing ● Victim selection – Random ● Uncontrollable distribution – Semi-random (leap-frogging) ● Unpredictable distribution – Non-random? ● Controllable and predictable distribution ● Can it be as fast? 40

  41. DVS: Deterministic Victim Selection 41

  42. DVS: Deterministic Victim Selection 42

  43. DVS: Workers' Useful Time 43

  44. DVS: First successful steal latency 44

  45. DVS: Execution time 45

  46. DVS: Execution time 46

  47. 47

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend