SlideShare a Scribd company logo
1 of 16
Download to read offline
Tue-4-Mar, 11:15am, Zoran Markovic, Vincent Guittot
LCA14-206: Scheduler tooling and
benchmarking
www.linaro.org
• From Energy Aware mini-summit @ Ksummit 2013
o extract from [1]: “Ingo Molnar came in with a complaint: none of the power-management work starts
with measurements of the system's power behavior. Without a coherent approach to measuring the
effects of a patch, there is no real way to judge these patches to decide which ones should go in.
We cannot, he said, merge scheduler patches on faith, hoping that they somehow make things
better.”
[1] https://lwn.net/Articles/571414/
• Tools need to:
o Generate repetitive, deterministic load patterns
o Evaluate performance and/or power consumption
o Check for violation of scheduling constraints
Scheduler Tools and Benchmarking
scheduler
load
energy model
hardware
idle stat
schedule
estimated power
power
www.linaro.org
Load Generation
www.linaro.org
• Maintained by Clark Williams of RedHat
• Devised to measure real-time performance
• Measures latencies in response times
o Performs timer sleep, followed by clock_gettime()
o Compares requested sleep time to measured time
o Difference is the latency
• Starts a number of threads whose sleep can be staggered in
time
• Linaro version also busy-loops a specified number of
iterations after wakeup
o Together with sleep time, this represents the periodic load pattern
o Auto Load calibration
Load Generation: Cyclictest
www.linaro.org
• Maintained by Giacomo Bagnoli and Juri Lelli
• Used to test deadline scheduler
• Use json file to describe scenario
• Locking scenario for thread dependency
• Task priority setting
• Runtime, Period and deadline
• Generate stats and trace events for debugging and analyses
Load Generation: rt-app
www.linaro.org
• Ability to generate custom load sequences
o Period, Load & Deadline
o non periodic load
• Auto Load calibration
• Task priority setting
• Task dependency with lock scenario
• Load configuration file
• Generate ftrace event and statistic
• Shared object library for linking into other scheduler tools
• Other?
Load Generation: New Development
www.linaro.org
Estimating Power Consumption
www.linaro.org
•
Energy Model
www.linaro.org
• Each platform has different power consumption parameters
• As a consequence, schedules are platform-specific, i.e.
o Each platform may have its own view of what’s most efficient
o There is no apples-to-apples comparison of efficiency across
platforms, but
o We can compare multiple scheduler solutions on a single platform
o It would be prudent to characterize scheduler implementation on a
multitude of platforms
Energy Model
www.linaro.org
Benchmarking
www.linaro.org
• Given an energy model, evaluate a schedule
o Capture the time spent in each C-state and P-state
o Run it through the energy model to assess power consumption
• Also, verify constraints
o How long did it take to complete processing?
o Were any of the deadlines missed?
o Were tasks properly prioritized?
o Was it done within thermal budget?
Benchmarking
www.linaro.org
• Helps to assess how much energy was spent for a particular
schedule
o Documentation RFC pending
• Makes no assumption about the energy model
• Uses kernel FTRACE function to capture:
o Entry and exit times for each C-state
o Entry and exit times for each P-state
o Raised IRQs
• idlestat is non-intrusive to C-state and P-state transitions:
o Sleeps while traces are captured
o Parses/analyzes traces after the acquisition is complete
Idlestat
www.linaro.org
clusterA@state hits total(us) avg(us) min(us) max(us)
C1 10821 5879554.00 543.35 0.00 23163.00
C2 0 0.00 0.00 0.00 0.00
C3 78 2929290.00 37555.00 0.00 101441.00
cpu0@state hits total(us) avg(us) min(us) max(us)
C1 6744 6407808.00 950.15 0.00 23194.00
C2 3 8819.00 2939.67 549.00 5310.00
C3 75 2960110.00 39468.13 213.00 101441.00
350 1047 204490.00 195.31 0.00 4578.00
700 5628 396247.00 70.41 0.00 1465.00
920 0 0.00 0.00 0.00 0.00
cpu0 wakeups name count
irq109 ehci_hcd:usb1 1727
irq029 twd 4524
cpu1@state hits total(us) avg(us) min(us) max(us)
C1 6544 6398931.00 977.83 0.00 36255.00
C2 1 1129.00 1129.00 1129.00 1129.00
C3 77 2955293.00 38380.43 122.00 101471.00
350 1124 212428.00 188.99 0.00 18677.00
700 5366 408782.00 76.18 0.00 946.00
920 0 0.00 0.00 0.00 0.00
cpu1 wakeups name count
irq029 twd 4737
Idlestat
www.linaro.org
• How do we get power parameters?
o Device tree/manufacturer’s data?
o Linear fitting?
• Method evaluated on TC2
o Work in progress
o Has registers to measure per-cluster power consumption
o Has 2 clusters, 5 cores, 2 C-states and 8 P-states each
o Large solution space (~50 power parameters)
o Linear fitting simplified to solving 6x6 equation system for A7s only,
single P-state (350MHz)
o ~2.6% error* (cyclictest -t 10 -L c0p15 --latency 100000 -q)
Idlestat
www.linaro.org
• Related to verification of scheduling constraints
• Assessment of performance:
o Time execution: launch executable and wait to complete
o Add synchronization points to load generation tool
o Time between synchronization points represents a measure of
performance
• Assessment of processing latencies
o How do we do this in a non-intrusive manner?
o Inside load generation utility?
• Thermal assessment
o Energy consumed over time
o Overshooting/undershooting target
Benchmarking: Enhancements
More about Linaro Connect: http://connect.linaro.org
More about Linaro: http://www.linaro.org/about/
More about Linaro engineering: http://www.linaro.org/engineering/
Linaro members: www.linaro.org/members

More Related Content

More from Linaro

Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...Linaro
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramLinaro
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNLinaro
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...Linaro
 
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...Linaro
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionLinaro
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersLinaro
 

More from Linaro (20)

Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready Program
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NN
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
 
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: Introduction
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 Servers
 

Lca14 206- scheduler-tooling_and_benchmarking

  • 1. Tue-4-Mar, 11:15am, Zoran Markovic, Vincent Guittot LCA14-206: Scheduler tooling and benchmarking
  • 2. www.linaro.org • From Energy Aware mini-summit @ Ksummit 2013 o extract from [1]: “Ingo Molnar came in with a complaint: none of the power-management work starts with measurements of the system's power behavior. Without a coherent approach to measuring the effects of a patch, there is no real way to judge these patches to decide which ones should go in. We cannot, he said, merge scheduler patches on faith, hoping that they somehow make things better.” [1] https://lwn.net/Articles/571414/ • Tools need to: o Generate repetitive, deterministic load patterns o Evaluate performance and/or power consumption o Check for violation of scheduling constraints Scheduler Tools and Benchmarking scheduler load energy model hardware idle stat schedule estimated power power
  • 4. www.linaro.org • Maintained by Clark Williams of RedHat • Devised to measure real-time performance • Measures latencies in response times o Performs timer sleep, followed by clock_gettime() o Compares requested sleep time to measured time o Difference is the latency • Starts a number of threads whose sleep can be staggered in time • Linaro version also busy-loops a specified number of iterations after wakeup o Together with sleep time, this represents the periodic load pattern o Auto Load calibration Load Generation: Cyclictest
  • 5. www.linaro.org • Maintained by Giacomo Bagnoli and Juri Lelli • Used to test deadline scheduler • Use json file to describe scenario • Locking scenario for thread dependency • Task priority setting • Runtime, Period and deadline • Generate stats and trace events for debugging and analyses Load Generation: rt-app
  • 6. www.linaro.org • Ability to generate custom load sequences o Period, Load & Deadline o non periodic load • Auto Load calibration • Task priority setting • Task dependency with lock scenario • Load configuration file • Generate ftrace event and statistic • Shared object library for linking into other scheduler tools • Other? Load Generation: New Development
  • 9. www.linaro.org • Each platform has different power consumption parameters • As a consequence, schedules are platform-specific, i.e. o Each platform may have its own view of what’s most efficient o There is no apples-to-apples comparison of efficiency across platforms, but o We can compare multiple scheduler solutions on a single platform o It would be prudent to characterize scheduler implementation on a multitude of platforms Energy Model
  • 11. www.linaro.org • Given an energy model, evaluate a schedule o Capture the time spent in each C-state and P-state o Run it through the energy model to assess power consumption • Also, verify constraints o How long did it take to complete processing? o Were any of the deadlines missed? o Were tasks properly prioritized? o Was it done within thermal budget? Benchmarking
  • 12. www.linaro.org • Helps to assess how much energy was spent for a particular schedule o Documentation RFC pending • Makes no assumption about the energy model • Uses kernel FTRACE function to capture: o Entry and exit times for each C-state o Entry and exit times for each P-state o Raised IRQs • idlestat is non-intrusive to C-state and P-state transitions: o Sleeps while traces are captured o Parses/analyzes traces after the acquisition is complete Idlestat
  • 13. www.linaro.org clusterA@state hits total(us) avg(us) min(us) max(us) C1 10821 5879554.00 543.35 0.00 23163.00 C2 0 0.00 0.00 0.00 0.00 C3 78 2929290.00 37555.00 0.00 101441.00 cpu0@state hits total(us) avg(us) min(us) max(us) C1 6744 6407808.00 950.15 0.00 23194.00 C2 3 8819.00 2939.67 549.00 5310.00 C3 75 2960110.00 39468.13 213.00 101441.00 350 1047 204490.00 195.31 0.00 4578.00 700 5628 396247.00 70.41 0.00 1465.00 920 0 0.00 0.00 0.00 0.00 cpu0 wakeups name count irq109 ehci_hcd:usb1 1727 irq029 twd 4524 cpu1@state hits total(us) avg(us) min(us) max(us) C1 6544 6398931.00 977.83 0.00 36255.00 C2 1 1129.00 1129.00 1129.00 1129.00 C3 77 2955293.00 38380.43 122.00 101471.00 350 1124 212428.00 188.99 0.00 18677.00 700 5366 408782.00 76.18 0.00 946.00 920 0 0.00 0.00 0.00 0.00 cpu1 wakeups name count irq029 twd 4737 Idlestat
  • 14. www.linaro.org • How do we get power parameters? o Device tree/manufacturer’s data? o Linear fitting? • Method evaluated on TC2 o Work in progress o Has registers to measure per-cluster power consumption o Has 2 clusters, 5 cores, 2 C-states and 8 P-states each o Large solution space (~50 power parameters) o Linear fitting simplified to solving 6x6 equation system for A7s only, single P-state (350MHz) o ~2.6% error* (cyclictest -t 10 -L c0p15 --latency 100000 -q) Idlestat
  • 15. www.linaro.org • Related to verification of scheduling constraints • Assessment of performance: o Time execution: launch executable and wait to complete o Add synchronization points to load generation tool o Time between synchronization points represents a measure of performance • Assessment of processing latencies o How do we do this in a non-intrusive manner? o Inside load generation utility? • Thermal assessment o Energy consumed over time o Overshooting/undershooting target Benchmarking: Enhancements
  • 16. More about Linaro Connect: http://connect.linaro.org More about Linaro: http://www.linaro.org/about/ More about Linaro engineering: http://www.linaro.org/engineering/ Linaro members: www.linaro.org/members