Understanding pool usage using Windows Performance Analyzer - PowerPoint PPT Presentation

understanding pool usage using windows performance analyzer n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Understanding pool usage using Windows Performance Analyzer PowerPoint Presentation
Download Presentation
Understanding pool usage using Windows Performance Analyzer

play fullscreen
1 / 18
Understanding pool usage using Windows Performance Analyzer
341 Views
Download Presentation
sherry
Download Presentation

Understanding pool usage using Windows Performance Analyzer

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. HW-927P Understanding pool usage using Windows Performance Analyzer Rahul Nair Program Manager Microsoft Corporation

  2. Agenda • Pool Overview and Concepts • Demo: Collecting and Analyzing Pool Data • Guidelines and Best Practices • Key takeaways

  3. Pool Overview

  4. Pool Overview • Memory resource for kernel mode components that the OS and device drivers use to store their data structures • Primary Audience - Driver Developers • Motivation • Pool usage is a significant contributor to the overall memory usage on a machine • Largest consumer of memory immediately after boot • Any reduction in Pool usage will reduce the overall memory usage of the system across the OS

  5. Session Pool NX NonPaged Pool Paged Pool • New for Windows 8: Non Paged Pool allocations which are non-executable Pool Overview NonPaged Pool • The Windows Pool has four basic allocation areas: • Allocations that are guaranteed to reside in memory • Allocations that can be paged out of memory to the pagefile • Allocations made per session. These allocations are pageable

  6. Pool Data Collection and Analysis

  7. Pool Vocabulary • General • Pool Type –Non Paged Pool, Paged Pool etc. • Session or Non-Session • Basic Data • Lifetime – How long an allocation remains outstanding • Size – Size of an allocation • Stack – Stack corresponding to the allocation • Address – Address corresponding to allocation • Page Address – Page within which the allocation was placed • Metadata • Pool Tag – 4 character label associated with an allocation • Pool Tag Module – Module responsible for allocation • Small Pool – Allocations smaller than a page (<4KB) • Big Pool – Allocations larger than (>=4kB) • NX Bit – Represents non executable allocations • Context: • Transient – allocations with a short lifetime, measured in milliseconds • Outstanding – allocations that remain alive at the point in time being investigated

  8. Pool Data Collection • Pool data is collected system wide and not restricted to a single process or driver • Steps • Open Windows performance recorder UI • Select Target application to be “Entire System” • Select Pool Usage from the Memory Profiles • Select scenario of Interest • General or On/Off scenario • Click on ‘Start’ to start tracing and ‘Save’ to save the trace when done WindowsPerformance Recorder UI

  9. WPA Pool Analysis • WPA displays 4 graphs for Pool • Pool Cumulative Allocation Size • Whatis the total size of allocations to a particular point in time? • Pool Cumulative Allocation Count • What is the total number of allocations to a particular point in time? • Pool Outstanding Allocation Size • What is size of all allocations alive at a given point in time? • Pool Outstanding Allocation Count • What is the total number of allocations alive at a given point in time? Pool graphs in Windows Performance Analyzer

  10. Summary Tables • Raw data is exposed via summary tables • Vocabulary • Allocation lifetime is expressed based on the visible region used to generate the table • AIFO - Allocated inside, freed outside • AIFI - Allocated inside, freed inside • AOFO - Allocated outside, freed outside • AOFI - Allocated outside, freed inside Enable Summary table view Summary table views for Windows Performance Analyzer

  11. Demo

  12. Guidance/Best Practices

  13. Guidance and Best practices • Approach • Understand and optimize pool usage for the most important user scenarios • Transient and steady state memory usage • Guidance • Pool usage • Be judicious and economical in allocation size and count • Minimize Non Paged usage • Pool allocations, MDL allocations, Non Paged Code • Allocation patterns • Ensure that scenario specific allocations are freed as soon as possible • Avoid excessive pre-allocation that you might never use • Avoid intermingling long and short lived allocations which causes fragmentation and increases memory usage • Move Non Paged allocations to the more secure Non-Executable Non Paged Pool

  14. Key Takeaways • Pool usage is a significant contributor to the overall memory usage of a system • Understand the pool usage of your component and utilize the tools to identify areas for optimization

  15. For more information RELATED SESSIONS • HW-59T Improving performance with the Windows Performance Toolkit • HW-141T Reducing the memory footprint of drivers and apps • HW-928P Understanding heap data Using Windows Performance Analyzer • HW-977P Understanding VirtualAlloc usage using Windows Performance Analyzer • HW-925P Customizing WPA Trace Views • HW-926P Introduction to the new WPA user interface

  16. thank you Feedback and questions http://forums.dev.windows.com Session feedbackhttp://bldw.in/SessionFeedback

  17. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.