Windows XP Performance and Tuning An Update Demand

  • Slides: 30
Download presentation
Windows XP Performance and Tuning: An Update Demand Technology Software 1020 Eighth Avenue South,

Windows XP Performance and Tuning: An Update Demand Technology Software 1020 Eighth Avenue South, Suite 6, Naples, FL 34102 phone: (941) 261 -8945 fax: (941) 261 -5456 e-mail: markf@demandtech. com http: //www. demandtech. com ã 2001 Demand Technology Software, Inc.

Windows XP n Designed to provide an upgrade path from Windows (9 x, ME)

Windows XP n Designed to provide an upgrade path from Windows (9 x, ME) to Windows NT ¨ ¨ Conceived with usability, not performance, in mind Unified desktop permits MS apps to exploit native NT technology n n n Multithreading, file cache, NTFS, etc. Another new UI to get used to… A minor, maintenance release of Windows NT Server (internally, version 5. 1) ¨ Synchronized with Windows XP – 64 bit support ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 2

Windows XP n No major changes in the way the OS works! ¨ n

Windows XP n No major changes in the way the OS works! ¨ n New Power Management-related Processor utilization Counters Many incremental improvements: ¨ ¨ ¨ Several changes designed to enhance scalability Prefetching to speed-up program loading (including the boot process) New Volume snapshot copy APIs for backing up Open files with integrity ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 3

Windows NT evolution: new in Win. XP New Processor Object Counters Supports Intel Speed.

Windows NT evolution: new in Win. XP New Processor Object Counters Supports Intel Speed. Step processor that run at different speeds to save power Disk prefetching Designed to speedup the boot process and program image file loading System virtual memory changes Overcome a variety of “large system” deficiencies, most noticeable with large Terminal Services environments: Registry size limits, accessing very large mapped files, very large device drivers Volume shadow copy service Supports file Cache flush and freeze so that volume snapshots can be easily created with integrity ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 4

Windows NT evolution: new in Win. XP n Boot and image file prefetch: (An

Windows NT evolution: new in Win. XP n Boot and image file prefetch: (An attempt to answer criticisms leveled at OS designers by Jeffrey Raskin in his influential book, The Humane Interface) ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 5

Windows NT evolution: new in Win. XP n Volume shadow copy: IOCTL_VOLSNAP_FLUSH_AND_HOLD_WRITES, IOCTL_VOLSNAP_RELEASE_WRITES ã

Windows NT evolution: new in Win. XP n Volume shadow copy: IOCTL_VOLSNAP_FLUSH_AND_HOLD_WRITES, IOCTL_VOLSNAP_RELEASE_WRITES ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 6

Windows NT evolution: new in Win. XP n New Networking tab in Taskman ã

Windows NT evolution: new in Win. XP n New Networking tab in Taskman ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 7

Windows NT evolution: new in Win. XP n Some new Counters: ã 2001 Demand

Windows NT evolution: new in Win. XP n Some new Counters: ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 8

Windows NT evolution: new in Win. XP n New built-in security profiles ¨ ¨

Windows NT evolution: new in Win. XP n New built-in security profiles ¨ ¨ ¨ SYSTEM LOCAL SERVICE NETWORK SERVICE ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 9

Windows NT evolution: new in Win. XP n Improved disk defragger ã 2001 Demand

Windows NT evolution: new in Win. XP n Improved disk defragger ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 10

Windows XP – 64 bit support n Major new version of the OS to

Windows XP – 64 bit support n Major new version of the OS to support new Intel 64 bit processors ¨ ¨ n P 7 chips 64 -bit virtual addressing Matches look-and-feel of Windows XP 32 -bit desktop and applications ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 11

Intel 786 IA-64 architecture n EPIC: Explicitly Parallel Instruction Execution ¨ ¨ n Explicit

Intel 786 IA-64 architecture n EPIC: Explicitly Parallel Instruction Execution ¨ ¨ n Explicit parallelism Predication Speculation Massive Resources 10 GHz by 2010 ¨ First generation Itanium chips: 800 MHz n ¨ . 013 micron fabrication process Second generation Itanium chips (Mc. Kinley): n n Clocked at 1. 2 GHz and higher 400 MHz X 128 bit internal system bus ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 12

Intel 786 IA-64 architecture n Very difficult to compare performance of the P 7

Intel 786 IA-64 architecture n Very difficult to compare performance of the P 7 to the P 6 ¨ Significant architectural differences n n ¨ Massive microprocessor designed for high-end applications n ¨ New instruction set Parallel programming model Currently, requires Intel compiler optimizations that exploit its major architectural features Far superior Floating Point performance ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 13

Intel 786 IA-64 architecture n Parallel Execution Resources ¨ ¨ 2 Memory Units 2

Intel 786 IA-64 architecture n Parallel Execution Resources ¨ ¨ 2 Memory Units 2 Integer Units 2 Floating Point Units 3 Branch Units all designed to execute up to six separate instructions in parallel ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 14

Intel 786 IA-64 architecture n Massive Resources: extended Register set ¨ ¨ 64 -bit

Intel 786 IA-64 architecture n Massive Resources: extended Register set ¨ ¨ 64 -bit Instruction Pointer (IP) 128 64 -bit GPRs, plus an associated Not a Thing (Na. T) bit n some GPRs have reserved meanings; – – n ¨ ¨ ¨ Register stacking functions for loop optimization 128 82 -bit Floating Point Registers 128 64 -bit dedicated Application Registers n ¨ GR 0 is hardwired to always contains a Zero value GR 1 is a global data pointer (gp) for the currently addressable global data segment e. g. , 8 dedicated Kernel registers (AR 0 -AR 7) 64 1 -bit Predicate Registers 8 64 -bit Branch Registers ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 15

Intel 786 IA-64 architecture n VLIW: Very Long Instruction Word ¨ ¨ ¨ 16

Intel 786 IA-64 architecture n VLIW: Very Long Instruction Word ¨ ¨ ¨ 16 -byte Instruction Bundles (aligned on 16 -byte boundaries) 5 -bit template, followed by 3 41 -bit instruction slots n n Can be filled out with No Ops Compiler optimization: ¨ ¨ Match Instruction Bundles to Execution Resources Instruction dispersal ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 16

Intel 786 IA-64 architecture n Memory Latency ¨ Instructions executing in parallel all stall

Intel 786 IA-64 architecture n Memory Latency ¨ Instructions executing in parallel all stall during memory waits Cache level Size Integer latency (cycles) Floating point latency L 1 32 KB 2 n/a L 2 96 KB 6 9 L 3 4 MB 22 24 176 178 RAM ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 17

Intel 786 IA-64 architecture n Strategies to minimize memory latency ¨ Instructions executing in

Intel 786 IA-64 architecture n Strategies to minimize memory latency ¨ Instructions executing in parallel all stall during memory waits ¨ Utilizes a Register stack for passing parameters to and from functions n n ¨ Function arguments do not have to be loaded from memory Register stack overflows into process virtual memory Speculative Loads from memory ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 18

Intel 786 IA-64 architecture n Speculation ¨ Data speculation n n ¨ Advanced Load

Intel 786 IA-64 architecture n Speculation ¨ Data speculation n n ¨ Advanced Load with an associated Check to ensure that there was no intermediate store instruction ld 8. a r 6=[r 8] makes an entry in the ALAT (Advanced Load Address Table) ld 8. c r 6=[r 8] is a zero cycle Check instruction that must be issued prior to using the data loaded in r 6 speculatively Store into memory at [r 8] sets the Na. T Register bit & invalidates the ALAT entry, causing the processor to recover the Load Control speculation n n Advanced Load in front of a Branch instruction with an associated Check to ensure the Branch was taken ld 8. s r 6=[r 8] ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 19

Intel 786 IA-64 architecture n Predication ¨ Conditional execution of an instruction based on

Intel 786 IA-64 architecture n Predication ¨ Conditional execution of an instruction based on a qualifying predicate value n ¨ Contained in a Predicate Register Uses: n n If conversion: remove branches from IF-THEN-ELSE constructs and execute in-line predicated instructions Loop optimizations (control parallel execution) ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 20

HP i 2000 Itanium Workstation n Uses first generation Itanium chip: ¨ ¨ ¨

HP i 2000 Itanium Workstation n Uses first generation Itanium chip: ¨ ¨ ¨ 733 MHz 4. 2 GB/sec system bus 1 GB RAM DVD/CD drive Ethernet port Etc. ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 21

HP i 2000 Itanium Workstation n Uses first generation Itanium chip: ¨ ¨ Install

HP i 2000 Itanium Workstation n Uses first generation Itanium chip: ¨ ¨ Install Evaluation copy of Windows XP – 64 bit from bootable CD-ROM Test Performance Se. NTry collection agent ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 22

64 -bit Address Space n n One uniform 64 -bit Virtual address space 7152

64 -bit Address Space n n One uniform 64 -bit Virtual address space 7152 GB Process address spaces are built on demand ã 2001 Demand Technology Software, Inc. 0 6 fc 0000 User Mode User Space Kernel Mode User Space 1 fff ff 00 0000 2000 0000 3 fff ff 00 0000 User Page Tables Session Space Page Tables e 0000 e 000 0600 0000 ffff ff 00 0000 Windows XP: Introduction System Space Page Tables 23

64 -bit Address Space Resource Physical Memory (RAM) Nonpaged pool Paged pool System file

64 -bit Address Space Resource Physical Memory (RAM) Nonpaged pool Paged pool System file cache User Address Space System space Paging File size (max) ã 2001 Demand Technology Software, Inc. Win 32 Win 64 64 GB 256 MB 470 MB 960 MB 2 or 3 GB 2 GB 16 GB 128 GB 1024 GB 7152 GB 128 GB 32 TB Windows XP: Introduction 24

64 -bit Windows Applications n WOW 64 provides emulation services for 32 -bit applications

64 -bit Windows Applications n WOW 64 provides emulation services for 32 -bit applications ¨ Thunking in User mode is performed to extract arguments from the 32 -bit stack, extend them to 64 bits, then make the native 64 -bit system call to ntdll. n n WOW 64. dll, WOW 64 cpu. dll, and WOW 64 win. dll increase the size of the application’s working set significantly System calls redirected to %systemroot%Sys. WOW 64 for 32 -bit DLLs ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 25

64 -bit Windows Applications n WOW 64. dll, WOW 64 cpu. dll, and WOW

64 -bit Windows Applications n WOW 64. dll, WOW 64 cpu. dll, and WOW 64 win. dll increase the size of the application’s working set significantly ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 26

64 -bit Windows Programming n New data types ¨ ¨ ¨ ¨ ¨ DWORD

64 -bit Windows Programming n New data types ¨ ¨ ¨ ¨ ¨ DWORD 32 DWORD 64 INT 32 INT 64 LONG 32 LONG 64 UINT 32 UINT 64 ULONG 32 ULONG 64 ã 2001 Demand Technology Software, Inc. 32 -bit unsigned integer 64 -bit unsigned integer 32 -bit signed integer 64 -bit signed integer Unsigned INT 32 Unsigned INT 64 Unsigned LONG 32 Unsigned LONG 64 Windows XP: Introduction 27

64 -bit Windows Programming n New Pointers: ¨ POINTER_32 n ¨ A 32 -bit

64 -bit Windows Programming n New Pointers: ¨ POINTER_32 n ¨ A 32 -bit pointer. On 32 -bit Windows, this is a native pointer. On 64 -bit Windows, this is a truncated 64 -bit pointer. POINTER_64 n A 64 -bit pointer. On 64 -bit Windows, this is a native pointer. On 32 -bit Windows, this is a sign-extended 32 -bit pointer. ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 28

64 -bit Windows Programming n New 64 -bit compiler ¨ macros: n n n

64 -bit Windows Programming n New 64 -bit compiler ¨ macros: n n n ¨ _WIN 64 – 64 -bit platform. _WIN 32 – 32 -bit platform. This value is also defined by the 64 bit compiler for backward compatibility. _WIN 16 – 16 -bit platform Inline Helper functions to convert from one data type to another n E. g. , UInt. To. Ptr ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 29

Where to get more information n “Windows XP: Kernel improvements create a more robust,

Where to get more information n “Windows XP: Kernel improvements create a more robust, powerful, and scalable OS” by David Solomon and Mark Russinovich, MSDN Magazine, December 2001. n Itanium Processor Microarchitecture Reference http: //developer. intel. com/design/itanium/downloads/245474. htm n Programming Itanium-based Systems By Triebel, Bissell and Booth (Intel Press) n Tech. Net or the Microsoft Developer Network (MSDN) CD ã 2001 Demand Technology Software, Inc. Windows XP: Introduction 30