chapter ten performance tuning. objectives create a performance baseline create a performance...

41
Chapter Ten Chapter Ten Performance Performance Tuning Tuning

Upload: eustacia-blair

Post on 23-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Chapter TenChapter Ten

Performance Performance TuningTuning

Page 2: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

ObjectivesObjectives

Create a performance baselineCreate a performance baseline Understand the performance and Understand the performance and

monitoring tools found in Windows XP monitoring tools found in Windows XP ProfessionalProfessional

Create a counter log for historical Create a counter log for historical analysisanalysis

Create Alert events to warn of Create Alert events to warn of performance problemsperformance problems

Detect and eliminate bottlenecksDetect and eliminate bottlenecks

Page 3: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Establishing a BaselineEstablishing a Baseline

BaselineBaseline Definition of what a normal load looks like on Definition of what a normal load looks like on

a computer systema computer system In object-oriented parlance, In object-oriented parlance, objectsobjects have have

propertiesproperties In Windows operating systems, some of these In Windows operating systems, some of these

properties are called properties are called counterscounters because they because they count, average, or otherwise monitor specific count, average, or otherwise monitor specific events, activities, or behavior of the objects events, activities, or behavior of the objects with which they’re associatedwith which they’re associated

Page 4: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Monitor and Monitor and Performance TuningPerformance Tuning

When it comes to system analysis, there When it comes to system analysis, there are two primary activities involved in are two primary activities involved in tackling performance-related issues:tackling performance-related issues: MonitoringMonitoring

Requires a thorough understanding of system Requires a thorough understanding of system components, their behavior, and how they components, their behavior, and how they interactinteract

Performance tuningPerformance tuning Consists of changing a system’s configuration Consists of changing a system’s configuration

systematically and carefully observing systematically and carefully observing performance before and after such changesperformance before and after such changes

Page 5: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Task ManagerTask Manager

Figure 10-1: Task Manager, Applications tab

Page 6: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Task ManagerTask Manager ProcessProcess

An environment that defines the resources An environment that defines the resources available to threadsavailable to threads

ThreadThread Minimum unit of system execution and Minimum unit of system execution and

corresponds roughly to a task within an corresponds roughly to a task within an applicationapplication

HandleHandle Indicates an internal identifier for some kind Indicates an internal identifier for some kind

of system resource, object, or other of system resource, object, or other component that must be accessed by name (or component that must be accessed by name (or through a pointer)through a pointer)

Page 7: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Task ManagerTask Manager

Figure 10-2: Task Manager, Performance tab

Page 8: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Task ManagerTask Manager

Figure 10-3: Task Manager, Networking tab

Page 9: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Task ManagerTask Manager

Figure 10-4: Task Manager, Users tab

Page 10: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

System MonitorSystem Monitor

System MonitorSystem Monitor Utility that tracks registered system or Utility that tracks registered system or

application objects, where each such application objects, where each such object has one or more counters that object has one or more counters that can be tracked for information about can be tracked for information about system behaviorsystem behavior

A graphical tool that can monitor A graphical tool that can monitor different different eventsevents concurrently concurrently

Page 11: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

System MonitorSystem Monitor

Figure 10-5: System Monitor displays memory pages accessed, disk queue length, and CPU utilization by default

Page 12: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Realtime monitoring is the process of Realtime monitoring is the process of viewing the measured data from one or viewing the measured data from one or more counters in the System Monitor more counters in the System Monitor display areadisplay area

System Monitor can display realtime and System Monitor can display realtime and logged data in one of three formats:logged data in one of three formats: GraphGraph Histogram (thermometer bars)Histogram (thermometer bars) Report (text-based values)Report (text-based values)

Page 13: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Figure 10-6: Add Counters dialog box

Page 14: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Figure 10-7: The Explain Text window provides additional information about the counter selected in the Add Counters dialog box

Page 15: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Performance object and counter Performance object and counter pairs worth memorizing:pairs worth memorizing: LogicalDisk: Current Disk Queue LogicalDisk: Current Disk Queue

LengthLength LogicalDisk: %Disk TimeLogicalDisk: %Disk Time LogicalDisk: Disk Bytes/TransferLogicalDisk: Disk Bytes/Transfer Memory Available BytesMemory Available Bytes Memory: Cache Faults/secMemory: Cache Faults/sec

Page 16: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Performance object and counter Performance object and counter pairs worth memorizing (cont.):pairs worth memorizing (cont.): Memory: Page Faults/secMemory: Page Faults/sec Memory: Pages/secMemory: Pages/sec Network Interface: Bytes Total/secNetwork Interface: Bytes Total/sec Network Interface: Current BandwidthNetwork Interface: Current Bandwidth

Page 17: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Performance object and counter Performance object and counter pairs worth memorizing (cont.):pairs worth memorizing (cont.): Network Interface: Output Queue Network Interface: Output Queue

LengthLength Network Interface: Packets/secNetwork Interface: Packets/sec PhysicalDisk: Current Disk Queue PhysicalDisk: Current Disk Queue

LengthLength PhysicalDisk: % Disk TimePhysicalDisk: % Disk Time

Page 18: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Performance object and counter Performance object and counter pairs worth memorizing (cont.):pairs worth memorizing (cont.): PhysicalDisk: Avg. # Disk PhysicalDisk: Avg. # Disk

Bytes/TransferBytes/Transfer Processor: % Processor TimeProcessor: % Processor Time Processor: Interrupts/secProcessor: Interrupts/sec System: Processor Queue LengthSystem: Processor Queue Length

Page 19: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Figure 10-8: System Monitor Properties, General tab

Page 20: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Realtime MonitoringRealtime Monitoring

Figure 10-9: System Monitor Properties, Source tab

Page 21: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Logging and Using Logging and Using Logged ActivityLogged Activity

Counter logCounter log Records measurements on selected Records measurements on selected

counters at regular, defined intervalscounters at regular, defined intervals Allows you to define exactly which Allows you to define exactly which

counters are recordedcounters are recorded Trace logTrace log

Records data only when certain events Records data only when certain events occuroccur

Record nonconfigurable data from a Record nonconfigurable data from a designated provider when an event occursdesignated provider when an event occurs

Page 22: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Logging and Using Logging and Using Logged ActivityLogged Activity

Figure 10-10: The Counter Logs node in the Performance tool is where you configure and access Counter log files

Page 23: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

AlertsAlerts Automated Automated

watchdog that watchdog that informs you informs you when a counter when a counter crosses a crosses a defined defined threshold, high threshold, high or lowor low

Figure 10-11: Setting a CPU threshold alert

Page 24: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

AlertsAlerts

Figure 10-12: The Action tab controls actions taken for Alert objects when thresholds are

passed, or specific events occur

Page 25: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Event ViewerEvent Viewer Tracks all Tracks all

events events generated generated by the by the operating operating system as system as well as well as security security and and application application eventsevents

Figure 10-13: Event Viewer, displaying a typical System log

Page 26: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Event ViewerEvent Viewer

Figure 10-14: System Properties, General tab

Page 27: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Performance OptionsPerformance Options

Figure 10-15: The Performance Options dialog box (Advanced tab) offers controls for Processor scheduling, Memory usage, and Virtual memory

Page 28: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Performance OptionsPerformance Options

Windows XP Professional uses 32 levels of Windows XP Professional uses 32 levels of application priority, numbered 0 (zero) to application priority, numbered 0 (zero) to 31, to determine which process should gain 31, to determine which process should gain access to the CPU at any given momentaccess to the CPU at any given moment

There are two techniques available to users There are two techniques available to users and administrators to manipulate process and administrators to manipulate process priorities:priorities: Manage already running processes using Task Manage already running processes using Task

ManagerManager Use the Start command to launch processes with Use the Start command to launch processes with

specific priority settingsspecific priority settings

Page 29: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Performance Tuning in Performance Tuning in the System Appletthe System Applet

Figures 10-16 and 10-17: The System Applet’s performance controls include Visual Effects and Advanced tabs, respectively

Page 30: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Performance Tuning in Performance Tuning in the System Appletthe System Applet

Figure 10-18: A Windows XP

Professional default setup

Page 31: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Recognizing and Recognizing and Handling BottlenecksHandling Bottlenecks

BottleneckBottleneck System resource or device that limits a System resource or device that limits a

system’s performancesystem’s performance Ideally, the user should be the Ideally, the user should be the

bottleneck on a system, not any bottleneck on a system, not any hardware or software componentshardware or software components

There is no single bottleneck monitor There is no single bottleneck monitor that can easily identify all possible that can easily identify all possible problemsproblems

Page 32: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Recognizing and Recognizing and Handling BottlenecksHandling Bottlenecks

Steps involved with finding and Steps involved with finding and fixing computer system bottlenecks:fixing computer system bottlenecks: Create a baselineCreate a baseline Compare baseline observations to Compare baseline observations to

current system behaviorcurrent system behavior Investigate the more common causes of Investigate the more common causes of

system problemssystem problems

Page 33: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Recognizing and Recognizing and Handling BottlenecksHandling Bottlenecks

Steps involved with finding and fixing Steps involved with finding and fixing computer system bottlenecks (cont.):computer system bottlenecks (cont.): If the list of “the usual suspects” does If the list of “the usual suspects” does

not produce an obvious culprit, further not produce an obvious culprit, further analysis is requiredanalysis is required

Once a potential bottleneck is identified, Once a potential bottleneck is identified, you make changes to the system you make changes to the system configuration to correct the situationconfiguration to correct the situation

Always test the impact of any fix you tryAlways test the impact of any fix you try

Page 34: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Common BottlenecksCommon Bottlenecks

Disk bottlenecksDisk bottlenecks Caused by a limitation in a computer’s Caused by a limitation in a computer’s

disk subsystemdisk subsystem Memory bottlenecksMemory bottlenecks

Caused by a lack of available physical Caused by a lack of available physical or virtual memory that results in system or virtual memory that results in system slowdown or an outright system crashslowdown or an outright system crash

Page 35: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Common BottlenecksCommon Bottlenecks

Processor bottlenecksProcessor bottlenecks Occurs when demands for CPU cycles Occurs when demands for CPU cycles

from currently active processes and the from currently active processes and the operating system cannot be metoperating system cannot be met

Network bottlenecksNetwork bottlenecks Caused by excessive traffic on the Caused by excessive traffic on the

network medium to which a computer is network medium to which a computer is attached, or when the computer itself attached, or when the computer itself generates excessive amounts of such generates excessive amounts of such traffictraffic

Page 36: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Eight Ways to Boost Eight Ways to Boost Windows XP Professional Windows XP Professional

PerformancePerformance Buy a faster machineBuy a faster machine Upgrade an existing machineUpgrade an existing machine Install a faster CPUInstall a faster CPU Add more L2 cacheAdd more L2 cache

Page 37: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Eight Ways to Boost Eight Ways to Boost Windows XP Professional Windows XP Professional

PerformancePerformance Add more RAMAdd more RAM Replace the disk subsystemReplace the disk subsystem Increase paging file sizeIncrease paging file size Increase application priorityIncrease application priority

Page 38: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Optimizing Performance Optimizing Performance for Mobile Windows XP for Mobile Windows XP

UsersUsers Steps to take in ensuring optimal Steps to take in ensuring optimal performance:performance: Make sure the network interface appears Make sure the network interface appears

higher in the binding order than a modem higher in the binding order than a modem or other slower link deviceor other slower link device

Make sure file synchronization settings for Make sure file synchronization settings for folder redirection and Offline Files do not folder redirection and Offline Files do not require machines to synchronize when require machines to synchronize when running in batteryrunning in battery

Make sure your mobile users understand Make sure your mobile users understand how to use hibernate and standby modes on how to use hibernate and standby modes on their battery-powered machinestheir battery-powered machines

Page 39: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Optimizing Performance Optimizing Performance for Mobile Windows XP for Mobile Windows XP

UsersUsers Steps to take in ensuring optimal Steps to take in ensuring optimal

performance (cont.):performance (cont.): Make sure that all Offline Files a user might Make sure that all Offline Files a user might

need are copied to his or her machine before need are copied to his or her machine before they leave the network environmentthey leave the network environment

Refresh rates also apply to Group Policy, Refresh rates also apply to Group Policy, which defaults to 90 minutes on Windows XPwhich defaults to 90 minutes on Windows XP

For machines operating off-network, refresh rates For machines operating off-network, refresh rates should be extended to avoid unnecessary network should be extended to avoid unnecessary network accessaccess

Page 40: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Chapter SummaryChapter Summary Windows XP Professional provides a Windows XP Professional provides a

number of tools to monitor system number of tools to monitor system performanceperformance

You can use Task Manager to view You can use Task Manager to view applications, processes, and overall applications, processes, and overall system performance, or to stop system performance, or to stop applications and processesapplications and processes

The Performance console is an The Performance console is an exceptionally useful collection of tools exceptionally useful collection of tools that includes System Monitor, log files, that includes System Monitor, log files, and alertsand alerts

Page 41: Chapter Ten Performance Tuning. Objectives Create a performance baseline Create a performance baseline Understand the performance and monitoring tools

Chapter SummaryChapter Summary

The Event Viewer is a less dynamic but The Event Viewer is a less dynamic but equally important tool that tracks logs equally important tool that tracks logs generated by the systemgenerated by the system

Keep an eye on logs and performance Keep an eye on logs and performance counters to isolate any bottlenecks that counters to isolate any bottlenecks that occur in the systemoccur in the system

Once a bottleneck is identified, take Once a bottleneck is identified, take the steps necessary to remove it and the steps necessary to remove it and get the system running more smoothlyget the system running more smoothly