powernightmares the challenge of efficiently using sleep
play

Powernightmares: The Challenge of Efficiently Using Sleep States on - PowerPoint PPT Presentation

Powernightmares: The Challenge of Efficiently Using Sleep States on Multi-Core Systems Thomas Ilsche, Marcus Hhnel, Robert Schne, Mario Bielert, and Daniel Hackenberg Technische Universitt Dresden 29.08.17 5th Workshop on Runtime and


  1. Powernightmares: The Challenge of Efficiently Using Sleep States on Multi-Core Systems Thomas Ilsche, Marcus Hähnel, Robert Schöne, Mario Bielert, and Daniel Hackenberg Technische Universität Dresden 29.08.17 5th Workshop on Runtime and Operating Systems for the Many-core Era

  2. Observation Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 2 ¨ Systems with continuous energy measurement ¨ Tuned for low idle power consumption ¨ Prolonged phases of excessive power consumption during idle phases “Powernightmare” 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  3. Background – Processor Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 3 ¨ Each processor is a package ¨ A package comprises multiple cores ¨ Each core has two hardware threads ¨ A hardware thread is called CPU 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17 Image source: http://download.intel.com/pressroom/kits/45nm/penryn_dualcore_txt.jpg

  4. Background – C-states Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 4 ¨ Idle power conservation Package C-state TDP of Intel Xeon E5-2690 v3 ¨ Increasing latency 160 140 ¨ Controllable per CPU, 135 W 120 but applied per core Shallower Lower 100 C-state Sleep ¨ Package C-state 80 determined by lowest 60 40 core C-state Deeper Higher 38 W 30 W 20 ¨ Effective use is essential 13 W 0 C0 C1E C3 C6 for low idle power Package TDP in Watts 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  5. Background – Linux idle governor Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 5 ¨ Selects C-state for CPU ¨ ladder_governor gradually changes C-state ¨ menu_governor is based on a heuristic ¨ Heuristic used to predict idle time ¤ Next timer event with correction factor ¤ Repeatable interval detector (up to 8 data points) ¤ Latency requirement 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  6. Investigation – lo2s Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 6 ¨ Uses Linux’ perf infrastructure ¨ Create a trace combining ¤ Active processes using the trace point sched_switch ¤ Selected C-state using the cpu_idle trace point ¤ External power measurements ¤ C-state residency using x86_adapt ¨ Available at https://github.com/tud-zih-energy/lo2s 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  7. Investigation – lo2s Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 7 Scheduled processes Power measurement C-state of the cores Vampir showing a lo2s trace of a parallel build using make 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  8. Investigation – Powernightmare Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 8 ¨ Up to 3 wakeups needed for correction after a misprediction by the heuristic Zoomed begin of Powernightmare: Scheduled tasks, C-states and socket power Full duration of a Powernightmare: C-states, system and socket power 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  9. Triggering the issue Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 9 ¨ Code to reliably trigger a Powernightmare int main() { #pragma omp parallel { #pragma omp barrier while (1) { for (int i = 0; i < 8; i++) { #pragma omp barrier usleep (10); } sleep (10); } } } 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  10. Approaching the problem Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 10 ¨ Changing task behavior ¨ Improving the idle time prediction ¨ Biasing the prediction error ¨ C-state selection by hardware ¨ Mitigating the impact 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  11. Impact mitigation approach Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 11 ¨ Set a wakeup timer if huge difference between next known timer and predicted idle time Prediction incorrect Prediction correct ¨ Wakeup event in ¨ Timer triggers wakeup predicted time interval ¨ Ignore recent residency ¨ Cancel timer ¨ Enter high C-state ✔️ Misprediction corrected 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  12. Powernightmare with timer Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 12 ¨ Fallback timer corrects wrong C-state selection ¨ Only 10 ms of shallow sleep Reduced impact of Powernightmare with active fallback timer 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  13. Verification Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 13 ¨ Measurements taken over 20 minutes ¨ Trigger workload every 10 seconds Power consumption during idle and trigger workload 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  14. Production servers? Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 14 ¨ Found on node of production HPC system “taurus” ¨ Lustre related pattern every 25 seconds ¨ Triggers one second Powernightmare After Lustre ping several cores remain in C1 Scheduling of Lustre related kernel tasks 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  15. Summary Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 15 ¨ Analyzed pattern of inefficient use of sleep states ¨ Developed a methodology and tools to observe ¨ Investigation shows misprediction in idle governor ¨ Proposed solution to mitigate effect ¨ Discussion with Linux community initiated ¨ Increasing probability with rising number of cores ¨ Effect not limited to HPC Systems 5th Workshop on Runtime and Operating Systems for the Many-core Era 29.08.17

  16. Any questions? Collaborative Research Center 912: HAEC − Highly Adaptive Energy-Efficient Computing 29.08.17

Recommend


More recommend