Daniel Pearson David Solomon Expert Seminars SVR311.

Slides:



Advertisements
Similar presentations
© Neeraj Suri EU-NSF ICT March 2006 Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék Zoltán Micskei
Advertisements

Brian Alderman | MCT, CEO / Founder of MicroTechPoint Pete Harris | Microsoft Senior Content Publisher.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Faith Allington Program Manager Microsoft Corporation Session Code: WSV304.
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Windows Performance Troubleshooting and Analysis
Tech·Ed North America /19/2017 7:21 AM
Johan Arwidmark Chief Technical Architect TrueSec WEM303.
Hands-On Microsoft Windows Server 2008 Chapter 11 Server and Network Monitoring.
Windows Server 2008 Chapter 11 Last Update
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
Johan Arwidmark Chief Technical Architect WCL315.
Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402.
2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session.
Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék Scheduling in Windows Zoltan Micskei
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
demo ETL file Event Providers Control/Status Control/Status ETW Session 2. Any component that has been instrumented with Event.
Pradeep Kumar C Support Escalation Engineer Windows Azure Diagnostics Logging and Monitoring in the Cloud.
Amit Bansal CTO | Peopleware India (unit of eDominer Systems) | |
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

Exchange Deployment Planning Services Exchange 2010 Complementary Products.
Aaron Margosis Principal Consultant Microsoft Session Code: CLI405.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
demo Demo.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Windows Operating System Internals - by David A. Solomon and Mark E. Russinovich with Andreas Polze Unit OS3: Concurrency 3.3. Advanced Windows Synchronization.
Pieter Hancke Senior Consultant Microsoft Consulting Services Session Code: WCL303.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
FINDING THE “MAKE IT FASTER!” BUTTON AND HITTING IT! Ewan MacKellar Senior Premier Field Engineer Microsoft SESSION CODE: SVR306 (c) 2011 Microsoft. All.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.

Patrick Ortiz Global SQL Solution Architect Dell Inc. BIN209.
Mark Michaelis Chief Computer Nerd IDesign/Itron/IntelliTechture DTL313.
5/28/2018 9:16 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or.
TechEd /9/ :26 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
9/11/2018 5:53 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Task Parallel Library: Design Principles and Best Practices
TechEd /14/2018 6:55 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Tech·Ed North America /14/2018 7:13 PM
Introduction to SQL Server Management for the Non-DBA
9/18/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Maximizing Windows 7 Performance: Troubleshooting Tips
Windows PowerShell Remoting: Definitely NOT Just for Servers
TechEd /14/2018 6:26 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Sysinternals Tutorials
Advanced Dashboard Creation Using Microsoft SharePoint Server 2010
Twenty Windows Tools You Never Knew Existed
Brian Keller Sr. Technical Evangelist Microsoft Session Code: DEV310
Improving performance with the Windows Performance Toolkit
Customizing WPA Trace Views
Intro to Workflow Services and Windows Server AppFabric
Lecture Topics: 11/1 General Operating System Concepts Processes
Pedro Miguel Teixeira Senior Software Developer Microsoft Corporation
Brian Keller Sr. Technical Evangelist Microsoft Session Code: DEV310
Introduction to the new WPA user interface
Optimizing SQL Server Performance in a Virtual Environment
Top OS Deployment Issues With Answers from Experts
MDC-B203 Deploying Applications in Microsoft System Center Virtual Machine Manager Using Services John Messec Program Manager Microsoft.
Tech Ed North America /12/2019 6:45 AM Required Slide
5/16/2019 Windows Performance Jump Start Chell Sterioff Milad Aslaner Sr. Program Manager Premier Field Engineer Microsoft Corporation Microsoft.
Building BI applications using PowerPivot for Excel
Microsoft Virtual Academy
Microsoft Virtual Academy
Presentation transcript:

Daniel Pearson David Solomon Expert Seminars SVR311

Daniel Pearson Started working with Windows NT 3.51 Three years at Digital Equipment Corporation Supporting Intel and Alpha systems running Windows NT Seven years at Microsoft Senior Escalation Lead in Windows base team Worked in the Mobile Internet sustained engineering team Instructor for David Solomon, co-author of the Windows Internals book series

Agenda Components of performance analysis Understanding the tools for troubleshooting and analyzing performance issues Troubleshooting CPU, memory and disk I/O issues using various Windows tools *Portions of this session are based on material developed by Mark Russinovich and David Solomon

Components of Performance Analysis Event Tracing for Windows Core component of the operating system Kernel mode data structures Used to store information about the system and system objects that can be read by various tools e.g. dt nt!_KTHREAD KernelTime CPU performance monitoring events Refer to the Intel 64 and IA-32 Architectures Software Developer’s Manual

Event Tracing for Windows Built in to the system High performance, low overhead and scalable 2.5% CPU usage for a sustained rate of 10,000 events/sec on a 2 GHz CPU 1 Operations throughout the system that are of interest to performance are fully instrumented e.g. process and thread activity, registry I/O, disk I/O 1.Milirud, Michael Windows Performance Analysis: Using Windows Performance Tools. Presented at Microsoft's WinHEC conference, November 5-7, Los Angeles, CA.

Event Tracing for Windows Uses a buffering and logging mechanism implemented in the kernel Per-processor buffers that are written to disk by an asynchronous writer thread Ability to enable and disable tracing dynamically Supports a managed code provider

Sysinternals Utilities

Process Explorer Useful for displaying which files, registry keys and other objects processes have open and which DLLs they have loaded Process Monitor Useful for showing real-time file system, registry and process & thread activity Available for download from the TechNet site

Resource Monitor

Included with Windows Vista and greatly enhanced in Windows 7 and Windows Server 2008 R2 Allows the viewing of CPU, memory, disk and network resources as well as handles and modules in real time Ability to end, suspend and resume processes as well as to start, stop and restart Windows services Useful for identifying the highest resource consumers by individual resource type, e.g. CPU Able to list the wait chain tree of a process to determine if a process is waiting on another

Using Resource Monitor

Performance Monitor

Queries performance counters that measure system state or activity Current values are read at specific intervals Performance counters are included in the operating system and can be included as part of applications Able to collect event trace data from trace providers that report actions or events Can combine multiple trace providers into a single session Configuration information can be collected from registry keys at a specific time or interval

Using Performance Monitor

Windows Performance Analyzer

Part of the Windows Performance Toolkit Support for both x86, x64, and IA64 architectures Consists of three primary programs xperf.exe Used for controlling tracing and processing trace data xbootmgr.exe Automates on and off state transitions and captures traces during those transitions xperfview.exe A graphical trace visualization tool to represent data in the form of interactive graphs and summary tables

Windows Performance Analyzer Primarily uses the Event Tracing for Windows infrastructure built in to the system Can be enabled or disabled at any time without requiring a system or process restart Supports symbol decoding, sample profiling, and recording of call stacks on kernel events Designed to be used during automation All the functions of the tools are available via the command line tool xperf.exe

Support for Earlier Systems The Windows Performance Toolkit will fail to install on Windows XP and on Windows Server 2003 although data collection is supported Copy xperf.exe and perfctrl.dll Trace analysis is only supported on Windows Vista and later systems

Capturing a Performance Trace Kernel options divided into two parts Kernel Flags Identified by the use of uppercase characters e.g. PROC_THREAD, LOADER, PROFILE Kernel Groups Indentified by the use of title case characters e.g. Base, Diag, Latency, FileIO Kernel Groups are made up of a collection of Kernel Flags e.g. SysProf = PROC_THREAD+LOADER+PROFILE Flags and groups are separated by the ‘+’ token e.g. xperf.exe -on FileIO+DISK_IO_INIT Can use a mixture of upper and/or lower case text e.g. xperf.exe -on sysprof+interrupt+dpc

Merging of Performance Trace Data Traces can be copied to another system for analysis The trace file should be “merged” on the collection system before analysis to include additional system information xperf -d trace.etl Trace Kernel trace Merged trace XPerf System and symbol information

Using the Windows Performance Toolkit

Understanding CPU Activity Windows uses 32 priority levels The system implements a preemptive, priority driven scheduler Priority adjustments can be applied to threads in the “dynamic” range At least one runnable thread with the highest priority will be running Real time Dynamic Thread – Priority Current Thread – Thread State

Context Switching A switch from one thread to another is known as a context switch Switching involves saving the hardware state of a thread and restoring the state of another When a thread is scheduled, that thread’s context switch count is also incremented The context switch count represents how often a thread begins running, not how long it ran System – Context Switches/sec Thread – Context Switches/sec

Time Accounting Quirks Looking at total CPU time for each process may not reveal where the system has spent its time CPU time accounting is driven by an interrupt timer which is set by the Hardware Abstraction Layer Usually at either 10 or 15 msec intervals Thread execution and context switches that happen between clock intervals are not accounted for e.g. a thread runs and enters a wait before the clock fires Thus threads may run but never get charged Process – % Privileged Time Process – % User Time

Time Accounting Prior to Windows Vista Windows accounted for CPU time based on the interval clock timer Thread quantum expiration was not always fair A thread might get almost no turn Threads were also charged for interrupts that occurred while they were running Idle IdleT1 T2 T2

Time Accounting Since Windows Vista Windows Vista and later reads the Time Stamp Counter during every context switch The actual CPU cycles consumed are charged to a thread Any interrupt time is not charged to the interrupted thread Allows for more accurate quantum accounting A thread gets at least one turn and at most will be given one turn plus an additional tick Idle IdleT1T1T2

Troubleshooting High CPU Utilization

Understanding Memory Management Windows provides two system memory pools Nonpaged Pool and Paged Pool Used for system wide persistent data Prior to Windows Vista, pool sizes were a function of memory size and whether or not the system was configured as a server or a workstation Windows Vista introduced the concept of a dynamic system address space Memory – Pool Nonpaged Bytes Memory – Pool Paged Bytes

Dynamic System Address Space In 32-bit Windows Vista and later, virtual memory is assigned as needed Permits larger paged, nonpaged, and session pools Components still cannot exceed 2 GB on 32-bit systems On 64-bit systems, address space regions are configured to their current maximum limits for all memory sizes

Troubleshooting Memory Leaks

Understanding Disk I/O Background I/O, e.g. indexing, disk defragmenting, interferes with foreground interactive tasks, e.g. reading In earlier systems, the only way to prioritize work was based on thread CPU priority Windows Vista introduced I/O priority and I/O bandwidth reservation Physical Disk – Current Disk Queue Length Physical Disk – Disk Transfers/sec

I/O Priority Levels Critical – Used by the Memory Manager High – Not currently implemented Normal – Default priority, e.g. Microsoft Outlook Low – Task priority, e.g. application prefetching Very Low – Background activity, e.g. antivirus MMMMWMPWMPOutlookOutlookPrefetchPrefetchDefragDefragIndexerIndexerAVAV CriticalHighNormalLowVery Low HierarchyIdle

Troubleshooting Disk I/O

Additional Information Windows Internals 5 th edition Windows Performance Analysis Developer Center Windows Server Performance Team Blog Ask the Performance Team Blog

Additional Information David Solomon Expert Seminars offers training on Windows Internals both as public and private workshops and public webinars via the Internet Currently scheduled up and coming classes Public workshop in London scheduled March, 2010 Public webinar scheduled for January, 2010 Visit for further course descriptions and up to date informationhttp://

Sessions On-Demand & Community Resources for IT Professionals Resources for Developers Microsoft Certification & Training Resources Resources

Complete an evaluation on CommNet and enter to win an Xbox 360 Elite!

© 2009 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.