PERFORMANCE
Back to top
Windows XP has several performance improvements
over its predecessor Windows 2000, but it requires some more
heavy machinery as well. The following paragraphs describe
how to monitor, optimize, and troubleshoot performance on
a Windows XP Professional system.
Memory and Processor
Back to top
The amount of physical memory as well as
the type and the number of processors in a Windows XP computer
are the most determining factors when it comes to performance.
On the Advanced tab of the Performance Options
shown below (click the Settings button in the Performance
section of the Advanced tab of the System
Properties), you can specify how processor time and
memory is put to use.
If the Windows XP computer is a regular client,
both the Processor Scheduling and Memory Usage
option should be set to the default selection Programs.
If the computer is used as a ‘server’ i.e. running
IIS or a shared application, and it is not used for the usual
client software such as email and office applications, it
is usually better to change the Processor Scheduling
setting to Background services and/or the Memory
Usage setting to System Cache.
Memory is something a computer running Windows
XP should have plenty of. The minimum recommended amount of
RAM is 128 MB or higher. Make that much higher if you are
running Microsoft Office or any other memory consuming application.
Because the amount of physical memory in a computer is often
not sufficient for running large programs simultaneously,
Windows XP uses virtual memory. Virtual memory is the RAM
in the computer and a large file on the hard disk. This file
is referred to as paging file or swap file and is named pagefile.sys
on disk. Data is swapped between physical memory and the paging
file as needed. Excessive swapping results in a lot of hard
disk activity, which can indicate that either the paging file
is too small but more often that the computer needs extra
physical memory.
You can configure the virtual memory settings
by clicking the Change button in the Virtual
Memory section of the Advanced tab of the Performance
Options. The recommended minimum size of the paging
file is 1.5 times the amount of the RAM, and the maximum size
3 times the amount of RAM. For optimal performance, it is
recommended that you locate the paging file on another physical
disk than the operating system.
Task Manager
Back to top
On the Performance tab of the Task
Manager you can get a quick overview of memory (physical
and paging file) and processor usage and availability. You
can open the Task Manager by right-clicking on the
Task bar and choosing it from the menu or by pressing CTRL-AT-DEL
and click the Task Manager button.
On the Task Manager’s Processes
tab shown below you can see the current running processes
and how much CPU and memory resources each process uses. It
also allows you to end a process, change the priority of a
process, and set processor affinity.
Ending processes is useful for killing a
process that hangs or looks suspicious. If the process has
child processes you can select End Process Tree from
the right-click menu instead of End Process (or clicking
the End Process button). If an applications hangs,
you should try to end it using the End Task button
on the Applications tab first as it might help to
shut down all related processes and child processes as well.
Changing the priority of a process allows
you to increase or reduce the share of processor time a process
gets. Increasing the priority is rarely done, but if you run
a CPU-intensive program (i.e. compiling, rendering, scanning)
that runs for several hours you could lower the priority for
that process reducing the impact it has on foreground applications.
On a dual-processor Windows XP computer, there is an additional
option Set Affinity. This allows you to assign a
process to one single CPU.
Performance tools
Back to top
A more advanced method to monitor memory,
processor, disk, network, and other activity is using Performance
from the Administrative Tools in the control panel.
It provides access to two different tools that can be used
for measuring performance on local and remote systems:
System Monitor – Allows you
to monitor system activity and view the real-time results
in graphs or reports. You can also view logged data from Performance
Logs and Alerts.
Performance Logs and Alerts –
Allows you to monitor system activity and record the results
to a log file. Additionally, you can set alerts to notify
you when a specified counter's value is above or below a defined
threshold. In addition to a binary log-file format, the data
can be stored in CSV or tab-separated format; hence can be
easily imported in spreadsheets or databases for further analysis
and reporting. You write the log data directly to an SQL database.
This option is typically only used when collecting data from
a large number of clients and servers.
Both tools use performance objects and performance
counters. A performance object is a collection of performance
counters for a particular part of the system. Examples of
performance objects are Memory, Processor,
Physical Disk, Paging file, and IP.
A performance counter represents the performance of a particular
aspect of a performance object by either a numeric or a %
value. By default, System Monitor uses the following objects
and counters:
• Processor / % Processor
Time – When this counter’s value exceeds
85% continuously, it may indicate you need to upgrade the
processor.
• Memory / Pages/sec - When this counter’s
value exceeds 20 continuously, it may indicate you need to
add additional RAM.
• PhysicalDisk / Avg. Disk Queue Length
- When this counter’s value exceeds the number of spindles
plus 2 continuously, it may indicate you need to add additional
RAM. Disk queue length refers to the number of read
and write requests waiting in the disk’s queue.
For a more complete list of performance objects
available in Windows XP click here and for acceptable values
of additional counters click here. When you add a counter
in System Monitor or Performance Logs and Alerts,
you can click the Explain button for an explanation.
Instead of displaying the counter values
in a real-time graph, Performance Logs and Alerts
writes the information to log files on disk. You can configure
counter logs, which record data at a specified interval,
or trace logs, which record system application events
when a specific event occurs such as a disk activity. You
will need a parsing tool to interpret trace logs. Trace logs
are useful mostly to developers.
Additionally, Performance Logs and Alerts
allows you to set Alerts on counters. Setting alerts
allows you to start a program, send a message, start a log,
or write an entry to the Application log when a counter’s
value exceeds or drops below a specified value.
Disk Defragmenter
Back to top
Windows XP includes performance counters
for monitoring performance of physical disks and logical volumes.
Depending on the exact results of the System Monitor
or Performance Logs and Alerts, all you may need
to do to increase disk performance is defragment it. When
you save a file to a disk that has been used for some time,
it is often not stored as a single contiguous block of data.
Instead, it is spread across the disk in small pieces starting
with the first available piece of free space – a piece
of free space that became available when a file was deleted.
This slows down both disk write and read times because the
disk heads have to move back and forth excessively.
To reorder the files and folders in a contiguous
block of data on disk, you can defragment its volumes by using
the graphical utility Disk Defragmenter or the command-line
utility Defrag.exe. The latter is suitable for scheduling
and scripting. Defragmenting the disk completely requires
the volume to have at least 15 percent free space to sort
file fragments. You can start the Disk Defragmenter
by clicking the Defragment Now button on the Tools
tab of a volume’s Properties. Follow the links
below for more information about the Disk Defragmenter
and defrag.exe.
Disk
Defragmenter Limitations in Windows XP
Description
of the New Command Line Defrag.exe Included with Windows XP
Scheduled Tasks
Back to top
You can schedule maintenance tasks by using
the Scheduled Tasks feature in Windows XP, which
you can access from the control panel. It allows you to run
a program, script, batch file, or a document at a predefined
date and time. New tasks are added by using the Schedule
Task wizard. You can schedule a task to run daily, weekly,
monthly, at system startup, at logon, or one time only. After
setting a date and time, you will need to provide a username
and password for the task. The task will run as if that user
started it, hence will have that user’s permissions
and rights.
When you add a task by using the wizard,
it will be listed in Scheduled Tasks in the control
panel. When you open the properties of a task, you can change
and configure additional settings such as:
- delete the task if it is not scheduled to run again.
- specify the maximum duration of the task.
- start the task only when the computer is idle for a specified
amount of time.
- stop or don’t start the task when the computer is
running on batteries.
Visual Effects
Back to top
On the Visual Effects tab of the
Performance Options shown below (click the Settings
button in the Performance section of the Advanced
tab of the System Properties) you can improve overall
performance for working in Windows. By default, Windows automatically
chooses the best settings for your computer. Usually these
settings are fine, but especially on older computers, it may
help to turn of some or all of the visual effects.
Additionally, you can turn of some visual
effects on the Appearance tab of the Display
Properties, which can also help to improve performance.
Back to top