Remove this Foil Prior to Customer or Fellow Traveler Discussion IMPORTANT: The “optimization notice” slide MUST be included in ANY presentation which discusses in any form the following: Any mention of Intel compilers, libraries or Intel products containing Intel compilers or libraries. Note that libraries include, but are NOT limited to, the Intel® Threading Building Blocks (Intel® TBB), Intel® Math Kernel Library (Intel® MKL), Intel® Integrated Performance Primitives (Intel® IPP), Intel® Media SDK and Intel® MPI Library. Performance of compiled code, including benchmarks, when Intel compilers or libraries were involved. When in doubt, include the “optimization notice” slide. This applies to any presentation in which Intel is involved. This means any presentation in which is completely or partially created by, or presented by, Intel. Do not change the text in a disclaimer. You may refer any questions regarding this to Intel Legal, or Intel SSG software development products marketing. As of March 2014, James Reinders (Intel SSG DPD) and Mike Sirtori (Intel Legal) are key contacts who will know how to help with an inquiry. 1 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Remove this Foil Prior to Customer or Fellow Traveler Discussion PowerPoint Quick Tips This presentation template requires that the Intel Clear font be installed. Get it by downloading the DPD presentation template located in the DPD sharepoint. This file contains 16x9 and 4x3 wide DPD templates and the Intel Clear fonts. How to add the date and presentation footer Here is how to access the footer To install the fonts, go into the IntelClear_TTF folder, select all six fonts in the folder, right click on the selection and choose ‘Install fonts’ To make this your default PowerPoint template PowerPoint 2007 & 2010: Insert > Header&Footer Here are the recommended text for nonpublic foils in the footer: Intel Confidential – NDA presentation; presentation contains Intel confidential information presented to customers with a non-disclosure agreement. Intel Internal Use Only – Do Not Distribute - Material is not intended to be distributed outside of Intel Click the ‘File’ Tab and choose ‘Save As’ Set the filename to ‘blank’ To share presentations externally, save the presentation as a PDF. Set “Save as type’ to ‘PowerPoint Template (*.potx) Press the ‘Save’ button. If it asks if you want to replace the file ‘blank.potx’, say ‘Yes’. Do this by choosing File>Save As>Select PDF in the ‘Save As Type’ dropdown and click ok More helpful Quick Tips for PowerPoint are at the end of this document. 2 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice DPD Presentation Cover Sheet - Include this slide at start of all presentations to DPD Staff including DPD Staff Meeting, SRD and BRCs Presentation Summary Topic What is the topic of today’s presentation? What is the purpose of this presentation? Inform, Decision, Discussion, other? Purpose Desired Outcome Briefly describe the high level summary of the content to be presented; 1-2 sentences only. Include the desired outcome. If the purpose is a decision, include the high level recommendation as well Instructions: Complete the appropriate sections of the cover sheet, removing the existing text to make room for your info. Note: If no Name of Person(s) (hint: remove the text below) Status/Notes decision is needed, the RAPID section does not apply and can be left blank or deleted, same goes for the Communication Plan. RAPID Decision-Making Template Role Recommender Individual who leads process to develop recommendation, doing majority of analysis and makes the proposal Usage: Typical answer is NA, used only in extraordinary circumstance. Strictly limited to regulatory bodies like finance and legal, or toslide P&L owners by a decision. • Present this firstmaterially duringimpacted all SRD, BRC, DPD Staff Ops Reviews, F2F and Staff meetings (other forums may use it too). • Discussion is an expected and valued part of your presentation time. Include only an appropriate number of slides that Individual accountable for implementing the decision, e.g. a project manager Performer allow sufficient time for discussion Name of individual(s) or body who ask for decision, provide to recommendation on datadecisions, about the issue and Inputer • Expect to end your presentation/discussion withinput time remainingbased to recap ARs and communication plans, and to proposed solutions. People who need to be consulted before the decision is made ensure we end the meeting on time (about 10 min for a 60 min timeslot). Agreer Decider Name of individual who is empowered to make decision. Accountable for the decision once made Communication Plan Who owns communicating the decision? Method of communication (e.g. email, presentation, pass downs) Date by which communication will be complete Audience (e.g. forum, PDL, list of names) 3 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Intel® Energy Profiler power analysis training Agenda • Introduction to SocWatch and the Intel® Energy Profiler • Processor power states • Intel® Energy Profiler power data collection techniques • Optimizing for power • Deep dive into power analysis 5 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Introduction to SocWatch and the Intel® Energy Profiler SoC Watch & Intel® Energy Profiler SoC Watch collects platform power-relevant metrics Sleep state residencies, energy, thermals, idle/wakeup analysis, timer resolution change, bandwidth, etc. Command-line tool with text output Energy Profiler provides correlated views of these metrics Feature of VTune® Amplifier for Systems included in Intel System Studio Support Platforms: No extra H/W needed during collection Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 7 SoC Watch Usage Overview • Command line tool for collection/reporting • Generates CSV-formatted reports • Select metrics in groups or individually • Available metrics vary per platform If some requested metrics are not available on a platform, tool collects what is available & warns about what is not Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 8 Quick Start – Collect Collect data: socwatch –t 60 –f sys –m –o myResults Collects broad range of system metrics for 60 seconds, storing results in files with base name myResults Gather most detailed data with –m Specify 60 seconds via –t 60 Specify system metrics via –f sys Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 9 Quick Start - Results View summary resu Results in myResults.csv Summary report samples Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 10 Quick Start - Results You can also view data on temperature and D-states Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 11 Quick Start - Results NDA required – GPU and bandwidth data Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 12 Quick Start – Detailed Analysis Produce detailed results files: socwatch –r raw -m –f sys –o test1 Specify that we want to produce a txt file using the qualfier –r raw Specify max detail using –m On host process the file using the following command. socwatch_advanced_v1_4.py -f test1.txt –csv –o test_summary Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 13 Quick Start – Detailed Results Find CPU wakeup and idle analysis in test_summary.csv Detailed text report samples Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 14 Data Collection Model (THIS PAGE IS WIP) SoC Watch reports data H/W Sources Designated registers (MSR, IOSF sideband), MMIO, VISA Read at OS context switch points (no added wakeu Low overhead, generally < 2% No extra wakeups when reading H/W data Analysis done after collection ends Results corroborated by data collected using external H/W measuring device (NiDAQ) Intel Confidential Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 10/25/2014 Optimization Notice 15 Processor power states CPU C-States / P-States P0 - CPU active at highest frequency (HFM) C0 Power Higher C0 - CPU active (In any P-state) C1 C2 P0 CPU P1 Active Pn CPU Sleep C1 - Core clock is Off C3 C3/C4 - Reduced Voltage, Partial L2 cache flush C4 C6 - Core Off, L2 cache flush, state saved to SRAM C5 C6 Intel Confidential The deeper the sleep state more power saving but longer to wake up 17 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Latency Greater Pn - CPU active at lowest frequency (LFM) CPU Sleep States Flexible C-States to Select Idle Power Level vs. Responsiveness Active state C0 C1 C3 C4 C6 off off off off off off off flushed flushed off partial flush off Core voltage* Core clock PLL L1 caches L2 cache Wakeup time* active Idle power* * Rough approximation Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Selecting the right sleep state Breakeven for current state Cx Sleep Duration Next deeper sleep state C(x+1) BreakEven Clock Ticks Cx BreakEven Current state selected by OS Wasted-Power Good Decision Opportunity 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 19 Optimization Notice Processor Power and Processor Frequency Power vs. Frequency Curve for Single Architecture 359 309 Power (w) 259 209 Small Increases in Processor Speed Results in Large Increases in Power 159 109 59 9 0 0.5 1 1.5 2 Frequency (GHz) 20 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Copyright © 2004 Intel Corporation. All rights reserved. 2.5 Optimization Notice 3 3.5 Components of power analysis Idle vs. Active Do nothing efficiently Hurry up and get idle. e.g. Multi-threading (distributing work evenly across cores) Optimize Sleep Behavior Minimize sporadic wakeups. Schedule all periodic activities from the app into same wakeup period. What is waking h/w from low power states? Why? Optimize Utilization What is active? Why is it active? Minimize Polling Loops. Use event driven framework when possible. Turn devices off. Open devices can prevent the system from entering power saving state. Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Why Minimize Wakeups? Long uninterrupted Idle period, is the key Consolidate 12 11 10 9 8 7 6 5 4 Platform Power Frequency of software activity makes big difference Solid Activity Fragmented Activity 0% 2% 4% 6% CPU Utilization 8% 22 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice 10% Types of Analysis Expert analysis of results Comparison of results by non-experts Focus on area of expertise: Look for differences: • Wakeup frequency • P/C state changes • etc… Two flavors of SoCWatch use cases: • A specific SoC device • A specific driver module • A specific application • etc… Best to have a baseline for comparison in all cases Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Power Analysis with VTune™ Amplifier for Systems 24 Intel® VTune™ Amplifier Tune Applications for Power Performance Power Analysis Analyze the behaviors that potentially cause unnecessary power consumption. This analysis type collects platform-wide information that can be used to find and eliminate unnecessary power consumption . Collection methods for Android Socwatch Baytrail, Haswell, Merrified, Moorefield Wuwatch Medfield and Clovertrail+ 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 25 Optimization Notice Summary View 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 26 Optimization Notice C/P States Tab 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 27 Optimization Notice C - states 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 28 Optimization Notice Analyze Wakeups Find dominant wakeups Intel Confidential 29 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice What C-State residency numbers tell you Residency in the deepest C-state should be >95% @ idle If you see high residency in C0 state CPU is executing instruction Next Step: Active Analysis If you see high residency in the intermediate C-states Frequent active/idle transition is keeping CPU from entering deepest C-state. Possible causes are: Application scheduling periodic timer with short period activity Application waits for interrupts (from device, IPI) very frequently 30 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Component Device States Find Components Wasting Power Intel Device States: DOi0 = On DOi1-DOi2 = Intermediate D0i3 = Off Find: Which Devices are on/off? • • For this MP3 Playing video encoder is not used? When they got turned on/off? • • When a device is not in use… Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 31 Optimization Notice Find Android WakeLock keeping the system from sleeping Class Overview Class lets you say that you need to have the device on. Call release when you are done and don't need the lock anymore. Do not acquire WakeLocks unless you really need them, use the minimum levels possible, and be sure to release it as soon as you can. Android APP API http://developer.android.com/reference/android/os/PowerManager.WakeLock.html 32 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Correlate Metrics to find patterns See all the metrics at once Find patterns Find the cause 33 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Potential Collections Depends on the SoC C-States P-States (CPU frequency) SOi States (System State) Android Wakelocks Temperature (Core, Skin, SoC, PMIC) S(outh) C(luster) Device States N(orth) C(luster) Device States 34 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Example Command Line Usage ./socwatch –f sys –f wakelocks –t 10 -f sys -t 10 // collects all metrics // defines duration of collection Snapshots , Traces PStates for 10 seconds, create default SocWatchOutput files Import into VTune on Host via: adb pull <path-on-target>/SocWatchtOutput.sw1 amplxe-runss --import-socwatch-data ./SocWatchOutput.sw1 More details in SoCWatchForAndroid_v1_3_0.pdf 35 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Wuwatch 3.1 Collection Usage In adb root shell on target device: Get Help >./wuwatch --help Execute wuwatch command on Android target >./wuwatch -cs –ps –kb –ss –ds -dn -wl -t 60 –o /data/results/test Execute Benchmark (usually via Android UI) Import into VTune Amplifier GUI adb pull /data/wuwatch/results/test.ww1 amplxe-runss --import-socwatch-data ./test.ww1 [-r testresults] More details in WakeUpWatchForAndroid.pdf 36 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Power Analysis Use Cases 37 Use cases: Idle Comparison of system running at Idle with a system running at idle without the ability to go to sleep. 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 38 Optimization Notice Use cases: Idle Percentage of time in C6 Core 1: 62.7% Core 0: 63.3% Reasons for waking up Kernel Timer: 4347 User Timer: 4120 IRQ 46: 570 IRQ 93: 557 Frequency is almost 100% at .8 GHz 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 39 Optimization Notice Use case: Idle – No sleep If we don’t sleep we will not get good battery performance Minimizing wakeups is critical but it is important to remember that if the system is not going to sleep in the first place you won’t see the wakeups! We have forced the target to never sleep! 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 40 Optimization Notice Use case: Video playback 1080p playback 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 41 Optimization Notice Use Case: Video playback Percentage of time in C6 Core 1: 2.4% Core 0: 2.7% Reasons for waking up Kernel Timer: 1421 User Timer: 630 IRQ 46: 111 IRQ 93: 906 Frequency almost 58.9% at 2 GHz 42 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Use case: Video playback Video starts here, you can filter and only see wakeups during playback. Most of the time we spend in C0 during video playback. 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 43 Optimization Notice Use case: Android Workload Suite (AWS) - Fish tank test Percentage of time in C6 Core 1: 47% Core 0: 48% Reasons for waking up Kernel Timer: 4347 User Timer: 4120 IRQ 46: 570 IRQ 93: 557 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 44 Optimization Notice Use case: AWS Fish tank test The Browser is actively drawing fish only in the light green region. Otherwise the frequency drops and we have a regular periods where the processor is in C6. 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 45 Optimization Notice Use Case: AWS An3DBenchXL Dragon Flowers Walking Man 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 46 Optimization Notice Use Case: AWS An3DBenchXL Compare OpenGL ES 1.1 with ES 2.0 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 47 Optimization Notice Use Case: Audio playback Mp3 Audio playback scenario Initial view Filtered and zoomed Freq = 47ms VTune Amplifier can help find causes for wakeups and their frequencies Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Use Case: Audio playback Audio playback –Another scenario mp3-nousb-screen-off 150 wakeups/sec mp3-screen-off 197 wakeups/sec With no usb connection intel_pmu_driver can put platform in s0i3 state Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Expert Analysis Video Recording on CLT+ - Summary Check if these are within expected range are not Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Use Case: Video recording Video Recording on CLT+ - Display Driver Filter+Zoom Wakeups Why is display driver waking up both the CPUs ? Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons/Regression Tests VTune Amplifier Views WAKEUPS C6 Residency Pn Residency Wakelocks Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons Native Video Playback vs 3rd Party Application Native Video Playback 3rd Party Application Which is “Better”? Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons Native Video Playback vs 3rd Party Application Native Video Playback 3rd Party Application Which is “Better”? Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons Native Video Playback vs 3rd Party Application Native Video Playback 3rd Party Application Much more time spent in C0 for the 3rd part application Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons Adding a new Kernel Driver Idle Workload Note the Wake-up Counts Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons Adding a new Kernel Driver New Driver Note the Wake-up Counts Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons Adding a new Kernel Driver Reduce the kernel logging (printk) in driver void my_timer_callback( unsigned long data ) { int i,j,ret; for (i=0;i<5000000;i++) { for (j=0;j<5000000;j++) { sum=sum+i; printk( "my_timer_callback called %d\n", count ); }} // setup the timer again to fire 500ms if (count <50) { setup_timer( &my_timer, my_timer_callback, 0 ); ret = mod_timer( &my_timer, jiffies + msecs_to_jiffies(500) ); if (ret) printk("Error in my_timer_callback\n"); count++; } } void my_timer_callback( unsigned long data ) { int i,j,ret; for (i=0;i<5000000;i++) { for (j=0;j<5000000;j++) { sum=sum+i; //printk( "my_timer_callback called %d\n", count ); }} // setup the timer again to fire 500ms if (count <50) { setup_timer( &my_timer, my_timer_callback, 0 ); ret = mod_timer( &my_timer, jiffies + msecs_to_jiffies(500) ); if (ret) printk("Error in my_timer_callback\n"); count++; } else { printk( "callback called %d times\n",count); } } VTune Amplifier Comparison Feature Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice Comparisons Adding a new Kernel Driver Reduce the kernel logging (printk) in driver Reduced total C0 time VTune Amplifier Comparison Feature Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice References https://lesswatts.org 10/25/2014 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. 60 Optimization Notice Legal Disclaimer & Optimization Notice INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS”. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS INFORMATION INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. Copyright © 2014, Intel Corporation. All rights reserved. Intel, Pentium, Xeon, Xeon Phi, Core, VTune, Cilk, and the Intel logo are trademarks of Intel Corporation in the U.S. and other countries. Optimization Notice Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 61 Copyright © 2014, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others. Optimization Notice
© Copyright 2024