Performance Tuning & PC Tweaking
Be it a desktop machine or a server, when it comes to getting the most out of your hardware and software investment, there’s no substitute for a well-tuned machine. In fact, many operating systems–including Windows and most varieties of Linux or UNIX (which also means Mac OS X)–claim with some justification to be “self-tuning.” But that doesn’t mean that some investigation of available tools to help improve on performance, and some time spent learning to use them, won’t deliver a useful return on investment. Likewise, for major applications and services, tools to monitor, analyze and improve performance may also be available and equally worth putting to work.
In another vein, there’s a whole different take on performance turning that applies primarily to desktop machines. That’s because some individual tends to work on the same box day after day, and begins to develop an intimate knowledge of and relationship with that machine. This is the side of tuning that goes along with tweaking, tuning and fooling around to keep edging one’s PC ever closer to performance perfection (at least, in the regard of its primary user). Here, too, you’ll find a plethora of tools and techniques available that can repay assiduous study, inveterate tinkering and the occasional “what if?” experiment with a series of personal bests in computer performance.
The Serious Side of Performance Tuning
In fact, performance analysis, tuning and system optimization is a field of study in computer science in its own right. Based on various intensely mathematic ways to model computer behavior and service delivery, it consists of roughly equal parts of queuing theory, Monte Carlo simulations and various sophisticated ways to model how services behave and perform under varying loads.
Fortunately for most system or network administrators, a deep understanding of these technical details is not required to gain a decent working knowledge of performance tuning. Because what’s measured in the process of capturing information about performance is so deeply rooted in a computer’s operating system, it shouldn’t be a huge surprise that most of the information used to tune a machine comes from that software. Most operating systems include all kinds of built-in hooks and reporting mechanisms–collectively known as “instrumentation”–that are designed to collect and report on what’s happening when a system monitor is activated. The self-tuning capability that most operating systems claim arises from their own use of that same data to adjust various parameters–usually related to consumption of resources like CPU cycles, disk space and memory–to provide a reasonable trade-off between letting the OS do its job and permitting applications and services to do their jobs.
This explains why Windows operating systems include a facility known either as Performance Monitor or System Monitor, and why other operating systems support similar capabilities or add-ons. Be they built-in or bolted on, these tools can acquire, interpret and present run-time data about system activity and performance to help careful observers:
- Examine what’s going on.
- Establish patterns of typical operation (usually called “performance baselines” or, more simply, “baselines”).
- Detect occasional problems or pathologies if and when they occur.
The desire for early problem detection (and pre-emption, where possible) explains why most performance monitors include the ability to watch certain counters or values and set alarms or alerts to fire off when certain conditions occur (for example, when network utilization tops 95 percent, when available disk space drops below 5 percent to 10 percent on any logical volume, when available RAM drops below some critical threshold and so forth).
Monitoring and reporting on performance reflects on Heisenberg’s Uncertainty Principle in an interesting way. In this case, a butterfly doesn’t flap its wings in California to cause a tornado in Kansas. Instead, the act of monitoring itself causes a performance impact. Most books and training materials therefore stress the need to recognize this impact and explain ways to mitigate where possible (for example, by running only performance agents on the machine being monitored, and running the management console and data collection on another machine across the network).
A quick recitation of the kinds of performance objects that Windows monitors will give a sense of what is accounted for in this oh-so-quantitative view of what a computer is up to. (Please note that applications can register with the System or Performance Monitor in Windows, so that other objects may appear on your machine for that reason.) Inside perfmon.exe (the name of the program that runs Performance Monitor/System Monitor on Windows NT, 2000, XP and Server 2003) you’ll find a plethora of items related to:
- Computer Hardware: Memory, processor and physical/logical disks, plus other devices that register with perfmon.
- Windows Add-Ons and APIs: Most notably, .NET and .ASP.
- Windows Services: Includes the NetBIOS browser and file system redirector, the server service, plus RSVP, telephony and Internet Authentication services, among many others.
- Networking: Various IP protocol and network interface objects (plus other protocols, if present).
- Windows OS: Cache, job objects, paging file, threads, processes and so forth.
Each of these many objects has a slew of associated counters, so what emerges is a set of numeric values that can tell savvy system or network administrators a lot about what’s happening on a Windows machine. Don’t forget that you’ll also find similar monitors or tools for other operating systems that provide the same kinds of information.
Working with such tools requires an understanding of what’s being measured and developing a sense of what’s normal for any particular machine under various load conditions (or building a set of baselines to snapshot normal operating conditions and counter values or ranges). Microsoft and third parties do a good job for Windows of pointing out what’s normal and what’s pathological, and also provide lots of information about interesting patterns of counters that help pinpoint diagnoses and potential cures for performance problems and other pathologies that might be revealed from their analysis and further testing.
This is a fascinating field, and it rewards time spent learning, measuring, experimenting and troubleshooting with desktops and servers that have been tuned to make the most of their capabilities. The usual approach is to identify which component in a system causes the biggest performance losses or limits performance most severely (called a “bottleneck” for that reason), then to devise methods to eliminate that bottleneck (or, at least, to widen it as much as possible). This also helps explain why the results of some system-tuning activities may include replacing older, slower hardware components with newer, faster ones (and also explains why the ultimate cure for a bottleneck is a wholesale system replacement).
Getting Personal: Tweaking and Tuning
Though some of the items that fall under this heading–such as disk defragmentation–can be good for disk subsystems on servers and desktops alike, this is a category of system tuning that typically applies more to desktops than to servers, simply because its rewards are most obvious to those who use a system on an everyday basis. Tweaks to boost performance run a gamut of options, from various methods to speed up system boot-up and shutdown to ways of manipulating various user interface characteristics to favor speed over appearance (and includes methods to remove drop shadows, complex shading and other techniques that enhance the way the interface looks and also impose modest, but noticeable, performan