loga low overhead gpu accounting using events
play

LoGA: Low-Overhead GPU Accounting Using Events Jens Kehne , Stanislav - PowerPoint PPT Presentation

LoGA: Low-Overhead GPU Accounting Using Events Jens Kehne , Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa 10 th ACM International Systems and Storage Conference Operating Systems Group, Karlsruhe Institute of Technology


  1. LoGA: Low-Overhead GPU Accounting Using Events Jens Kehne , Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa 10 th ACM International Systems and Storage Conference Operating Systems Group, Karlsruhe Institute of Technology (KIT) www.kit.edu KIT – The Research University in the Helmholtz Association

  2. GPU Sharing GPUs increasingly popular in computing Not every application saturates a GPU time Move GPUs to the cloud Sharing increases cost-efficiency Problem: Need fairness Software scheduling is inefficient 2 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  3. NEON (University of Rochester, ASPLOS '14) Applies fair queuing to GPUs NEON App 1 App 2 App 1 App 2 3 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  4. NEON (University of Rochester, ASPLOS '14) Applies fair queuing to GPUs NEON App 1 App 2 App 1 App 2 4 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  5. NEON (University of Rochester, ASPLOS '14) Applies fair queuing to GPUs NEON App 1 App 2 App 1 App 2 5 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  6. NEON (University of Rochester, ASPLOS '14) Applies fair queuing to GPUs NEON App 1 App 2 App 1 App 2 6 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  7. NEON (University of Rochester, ASPLOS '14) Applies fair queuing to GPUs NEON App 1 App 2 App 1 App 2 Threshold 7 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  8. NEON (University of Rochester, ASPLOS '14) Applies fair queuing to GPUs NEON STOP App 1 App 2 App 1 App 2 8 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  9. NEON: Accounting Problem NEON‘s accounting disables GPU access GPU idle! STOP Sampling Phase Freerun Phase  High accounting overhead if application does not saturate the GPU 9 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  10. Idea GPUs have lots of status registers for the device driver Leak information about GPU‘s internal state Reading has no effect on GPU driver or running application Idea: Poll status registers Infer GPU-internal context switches 10 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  11. Design STOP App Scheduler Submit Query Accounting thread Poll 11 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  12. Accounting Thread Accounting Poll Status reg thread App 1 App 2 12 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  13. Accounting Thread Accounting Poll Status reg Status reg thread App 1 App 2 13 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  14. Accounting Thread Accounting Poll Status reg Status reg Status reg thread App 1 App 2 Poll frequency must be faster than kernel length High CPU load Poll periodically  14 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  15. Scheduling Scheduling thread queries accounting thread Updates fair queuing counters Stops applications if necessary Different metric than NEON NEON: Average kernel length LoGA: Total GPU time consumed 15 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  16. Benchmark Scenario Accounting overhead Accuracy of accounting (→ scheduling quality) Competing workload: Throttle Creates well-defined GPU load run sleep 16 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  17. Accounting Overhead (10% load) 1,6 10 instances of throttle, 1% load each 1,5 1,4 Normalized against execution Normalized runtime Scheduling disabled time w/o accounting 1,3 1,2 1,1 NEON LoGA 1 0,9 0,8 0,7 u p e d n l t D n t s D d n w r r 1 2 r s d l e e n o r e a p e e o f e 2 a a o n t u n v v f 3 M t n a b w p y d c g y t _ _ t r r t i m s a l s s t l e p t w s c c i n o a r d d + t d e f u s f o e m k r t o e i d p f v f a a b u a o i m l c u r k m h y l c h s b a c r r o a e a h k u m t s s m t l y m i a e g h o t b e r h p a G h a l u e p m r t s 17 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  18. Accounting Overhead (90% load) 1,6 10 instances of throttle, 9% load each 1,5 1,4 Normalized against execution Normalized runtime Scheduling disabled time w/o accounting 1,3 1,2 1,1 NEON LoGA 1 0,9 0,8 0,7 u p e d n l t D n t s D d n w r r 1 2 r s d l e e n o r e a p e e o f e 2 a a o n t u n v v f 3 M t n a b w p y d c g y t _ _ t r r t i m s a l s s t l e p t w s c c i n o a r d d + t d e f u s f o e m k r t o e i d p f v f a a b u a o i m l c u r k m h y l c h s b a c r r o a e a h k u m t s s m t l y m i a g h o t e b e r h p a h a G l u e p m r t s 18 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  19. Fairness Goal: LoGA should not reduce fairness Problem: Which application runtime is fair? Measure total GPU time for each application Calculate optimal scheduling Next slide: Speedup over fair schedule 19 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  20. Fairness: Results (4x throttle, 20% load each) 5 4,5 Speedup over fair schedule 4 3,5 3 2,5 No scheduling NEON 2 LoGA LoGA-CL 1,5 1 0,5 0 p d n l D n t s e d t s l r a o o e 2 a a n f f 3 o b c w p r r t i m s a t p w s t o s t d e + s k r t f d p a o f i m b u c u r s e h b a a h k t h y b g o h h 20 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  21. Conclusion Sharing beneficial if applications do not saturate the GPU Scheduler interference reduces sharing LoGA accounts GPU usage without overhead Poll GPU status registers, detect context switches Time between context switches as input for fair queuing 21 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

  22. Finding Registers Envytools project has documented some registers Unfortunately, far from complete Trial and error: Run workload with known behavior Dump register values See which registers correlate with workload behavior Two registers identified: ID of currently running GPU context Activity status of entire GPU 22 22.05.17 LoGA: Low-Overhead GPU Accounting Using Events Operating Systems Group Jens Kehne, Stanislav Spassov, Marius Hillenbrand, Marc Rittinghaus, Frank Bellosa Karlsruhe Institute of Technology

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