35
Windows Vista: Windows Vista: System Performance System Performance Enhancements Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Embed Size (px)

Citation preview

Page 1: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Windows Vista: Windows Vista: System Performance System Performance

EnhancementsEnhancements

Simon Martyn

Infrastructure Specialist

The IQ Business Group Technology Services Division

Page 2: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Agenda• Current performance limitations• Optimizing Memory Use

– SuperFetch™• Avoiding the Disk Bottleneck

– ReadyBoost™– ReadyDrive™

• Supporting infrastructure– Low-priority I/O– Diagnostic tools

Page 3: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

What Causes Inconsistent Responsiveness?• Poor memory content

– Performance erodes over time• The application has not run recently• Background applications have swept through memory

– Transitions affect memory• After boot or hibernate• After Fast User Switch• After lunch or big application

• Random/blocking disk operations– Page faults– Program loads– Disk spin up time– Disk seeks

Page 4: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

The Seek Problem

• Drive industry continues to deliver impressive data rate, rotation and interface speed improvements– ATA/33 ATA/66 ATA/100 SATA– 4200RPM 5400RPM 7200RPM 10000RPM– 2 MB 8 MB 16 MB– Result: Sequential IO rates of 80 MB/s+

• At that rate, 1 GB of RAM fully populated in ~12.8sec• Seek times improving, but not as significantly

– 3.5” Desktop drive avg seek ~10 mSec– 2.5” Mobile drives ~12.5 mSec– Much better when hitting the track buffer– Result: Random IO rate limited to an effective 1MB/sec

• At that rate, populating 1GB of RAM takes ~1024sec!

Page 5: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

.data pages.data pages

MFT EntryMFT Entry

Directory EntryDirectory Entry

PE HeaderPE Header.text pages.text pages

DramDramCacheCache

DLLs On DiskDLLs On Disk

Page 6: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

The Seek Problem• 50% of MobileMark 2005 I/Os are 4 KB and random • Files and structured files

– A single DLL is generally 5 to 6 Disk Locations (min)• Directory, MFT Entry, and other File System Metadata• PE Hdr page, .text pages, .data pages, .rsrc pages, etc.

– Programs like Internet Explorer, Adobe Reader, or Outlook use over 100 DLLs

• Reliability and durability– Logging, Transactions, Application Temp Files

• A simple Registry Write can require 5 to 6 Random and Ordered Disk Writes

• Synchronous blocking nature of page faults– Code pages, Stack pages, and Heap pages can all be

faulted upon– Hard to develop Asynchronous Client applications

Page 7: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

What Do Users See?

• Slow state transitions• Decreased application responsiveness under memory

pressure• Slower program launch

Page 8: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

How Does Microsoft Windows Vista Help?

• Provides new innovations inmemory management

• Avoids hitting the disk where possible• Prioritizes I/O when you do hit the disk• Contains new diagnostic tools

Page 9: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Smart Memory Management

Page 10: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Internet ExplorerInternet Explorer

MemoryMemory

OS

Startup Apps

Microsoft Word

Outlook

Photo Editor

DiskDisk

free memoryfree memory

memory cachememory cache

Current Memory Management

Page 11: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

SuperFetch

• SuperFetch is a breakthrough inmemory management – Optimizes based on usage patterns over time– Takes into account frequency of page usage,

usage of page in context of other pagesin memory

– Adapts to memory usage patterns, including complex usage scenarios

– Can differentiate based on user, time and day of week

Page 12: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Internet Explorer

MemoryMemory

OS

Startup Apps

Microsoft Word

Outlook

Photo Editor

DiskDisk

memory cachememory cache

Photo Editor

SuperFetch

Page 13: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

SuperFetch

• SuperFetch is proactive and resilient– Smart about getting the right content into

memory early– Keeps correct content in memory

Page 14: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Internet ExplorerInternet ExplorerIdle Tasks

Microsoft Word

OutlookIdle Tasks

Internet Explorer

Idle TasksOutlook

Idle Tasks

MS WordIdle Tasks

OS

Startup Apps

PhotoshopPhotoshop

Traditional

OS

Startup Apps

Photoshop

memorycache

OS

Startup Apps

PhotoshopPhotoshop

Superfetch

OS

Startup Apps

Photoshop

Keeping The Right Data In Memory

Page 15: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

SuperFetch

• SuperFetch is efficient– Uses low priority I/O for pre-fetching

and pre-population• SuperFetch manages RAM and

cache memory

Page 16: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Avoid The Disk Bottleneck

Page 17: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

ReadyBoost

• Flash memory serves as a cache for SuperFetch– External USB keys, SD cards, Compact Flash, internal PCIe

cards• Allows fast reads to satisfy page faults when page is not in

main memory– Up to 10x faster than random HDD reads

• Caches data proactively based onuser activity

Page 18: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

ReadyBoost Properties• Reliable

– Write-through cache allows user to remove deviceat any time

– Device wear is not an issue• Unique write gathering algorithm optimizes

performance and wear patterns• Projected life of 19.4 – 1823 years depending on

device size and variant (10K or 100K write-erase cycles)

• Secure– Data is encrypted using AES-128

• Efficient– Data is compressed by a factor of 1.8X to 2.3X

Page 19: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

ReadyDrive Hybrid Hard Disk• A Nonvolatile cache (NV Cache) is added to

the hard disk drive

– Allows data to be read and written while platter is spun down

– Data in cache persisted when powered down

– SuperFetch provides efficient cache utilization

DramCache

NVCache

Up to 90% Power Saving

over conventional HDD

SATA or PATA Interface

Read and Write while spindle is stopped

Page 20: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

MFT EntryMFT Entry

Directory EntryDirectory Entry

DramDramCacheCache

.data pages.data pages PE HeaderPE Header.text pages.text pages

DLLs On DiskDLLs On Disk

Page 21: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

MFT Entry

Directory Entry

PE Header

.text pages

DramCache

NV Cache

.data pages

DLLs On ReadyDrive H-HDD

Page 22: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

NV Cache contents

• Cached writes• Boot/resume sectors• Sectors pinned by OEMs• Read cache

Page 23: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

ReadyDrive Benefits

• Performance– Faster Boot– Faster Hibernate/Resume– Performance improvement from minimizing disk seeks

and enabling more IOs per second• Power Savings/Battery Life

– Windows Vista can reduce HDD power consumption of typical 2.5” HDD by 70-90% when operating on battery by keeping magnetic platter spun down most of the time

• Reliability improvements– Vibration or impact during writes not a problem with

NV memory• Reduced noise

Page 24: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

ReadyDrive ATA Command Set

• A new ATA command set has been specified by Microsoft, HDD manufacturers, and industry partners which enables rich management of the NV Cache

• Single ATA command with sub-commands– Identify hybrid hard disk functionality– Add/Remove LBAs from NV Cache “pinned set”– Query NV Cache pinned set– Enter/Leave power saving mode– Etc.

• Accepted by T13 for standardization in the ATA 8 specification

• Opportunity for innovation by device and host moving forward

Page 25: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

ReadyBoost And ReadyDrive

System Memory

HDD Platter

Read Cache

ReadyBoost

Write Cache

OEM Pinning

Boot Data

Read Cache

ReadyDrive

NVRAM

RAM

Magnetic

Page 26: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

ReadyBoost And ReadyDrive

• ReadyBoost and ReadyDrive arecomplementary technologies

• Both powered by SuperFetch• ReadyDrive

– Helps state transitions– Can pin and accelerate some data – Improves reliability– Saves power

• ReadyBoost– Large read cache– Relieves memory pressure

Page 27: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Prioritized I/O

Page 28: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Low-priority I/O• Why low-priority I/O?

– Developers have long been able to throttle CPU usage by setting thread priorities

– Low CPU usage can still slow down the system– With Windows Vista, developers can set

I/O priorities• Low-priority I/O applications

– SuperFetch– Search indexing– Windows Defender– Disk defrag software– Startup applications

Page 29: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Using Low-priority I/O

• Call SetThreadPriority with THREAD_BACKGROUND_MODE_BEGIN

• Call SetProcessPriorityClass with PROCESS_BACKGROUND_MODE_BEGIN

Page 30: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Diagnostic Tools

Page 31: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Current Tool Limitations

• Repeatability – Often times, issues are non-deterministic

• Proactivity– Event logs are a good start but not

end-user friendly

Page 32: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

PerformanceAnalyzerWindows

DiagnosticInfrastructure

System Event Log

CKCL - ETW Kernel Events

Performance Diagnostics Architecture

Performance Tuning And Diagnostics

• Lower the cost for diagnosing performance problems– Easier diagnosis and resolution of performance problems

• Leverages data within the Circular Kernel Context Logger (CKCL)– Provides a record of recent system activity– Automated analysis applied for defined scenarios– Analysis results written to System Event Log

Page 33: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Vista Performance Benefits

• Windows Vista Delivers Consistent Performance – Improved power transitions– Consistent responsiveness, even in adverse conditions

• Windows Vista uses innovative technology to address the biggest user issues– SuperFetch is a breakthrough in memory management– ReadyDrive Hybrid Hard Disks provide reliability, battery,

and performance benefits– ReadyBoost enabled flash improves responsiveness without

needing to add more RAM– Low priority I/O prevents background applications from affecting

user actions• Windows Vista has improved diagnostic infrastructure

– Circular Kernel Context Logger (CKCL)

Page 34: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division

Thank you to our Partners for their support of TechDays

2007

Page 35: Windows Vista: System Performance Enhancements Simon Martyn Infrastructure Specialist The IQ Business Group Technology Services Division