Operating System Performance

Posted Mar 30, 2001 | by David Risley  

Of course there are ways to improve performance by playing with
the hardware settings, but there are also ways of tweaking the operating system. The OS is
very tightly knitted with the hardware’s performance. Tweaking it really helps.

I’m gonna keep this short and sweet. Every subject has a
whole world of details that I could go into, but it just eats bandwidth. I’m going to
outline the basics and tell you how to do it. This is based on Windows 95. Some may
complain, but this OS is simply the most common.

The biggest drawback on performance that has to do with
the OS is virtual memory. This is where the OS writes to the hard drive when it has run
out of space in the RAM. When running many programs or large programs, the system makes
use of this virtual memory, and performance lags. It causes frequent read/write actions
and head movements. These head movements, or seek time, is the slowest feature of the hard
drive.

When storing this temporary info to the hard drive, it
puts it in a swap file. This file gets larger as Win95 needs more room, and smaller as it
needs less. Adjusting the characteristics of the swap file can benefit performance.

You can mess with the swap file settings in the Control
Panel. Click on System, then the Performance tab. Under Advanced Settings, click Virtual
Memory. Here you can set the minimum and maximum size of the swap file as well as it’s
location. If you set the min and max sizes to be the same, it tells Windows that it can’t
resize the file. If they are different, it can resize the file within the limits. The
default value is to let Windows do it all, with a 0 min and no max. When done, hit OK. It
will give you a warning to scare you, but who cares.

Do not set the swap file size to be too low. If you do,
you may get out of memory problems later. And definitely do not disable the use of a swap
file.

The automatic resizing feature of the swap file under
Windows 95 is good for conserving disk space, but not good for performance. Using virtual
memory at all reduces performance, but its even worse when the drive is continually
resizing the file. So, if you have plenty of disk space to spare, give the swap file a set
size. In the virtual memory settings window, set the min and max files to be the same.
This will eliminate resizing.

The size to set it to is sort of a judgment call. It sort
of depends on the kind of work you use your system for. I have set mine for 50MB. This is
a generally accepted value. If you run into problems, you may want to increase it.

Another method of improving performance that I have heard
of, but never done, is to optimize the position of the swap file on the hard disk. Placing
it near the front of the drive ensures that the read/write heads don’t have to travel as
far. This can be done by using a second hard drive for the swap file. This gets the
read/write action off of the same drive as the OS and the major programs, and can increase
performance. You can also make use of partitions to do this. You can set off a separate
partition for the swap file. This treats it as its own drive and eliminates some problems.
You can also create two partitions and put the swap file at the beginning of the second,
thus putting the file at the center of the hard disk and minimizing the distance traveled
by the heads.

This partition method can be used on any files which one
wants to increase performance on.

The Windows 95 use of disk cache can damper performance.
Disk cache is what Win95 does with data from the hard drive. It places the most recently
used data from the hard drive into whatever memory is not being used by programs. This
serves as a sort of virtual disk. The intent is to increase performance by minimizing hard
disk activity, but it doesn’t always work that way. As activity increases, the system
wants to use this disk cache. This wants more room on memory. Then, as the programs need
more memory for operation, they have to go to virtual memory because disk cache has taken
so much memory up. This leads to a weird situation where the disk performance increases,
but performance decreases anyway due to the use of virtual memory.

The way around this is to limit the amount of space the
OS is allowed to use for disk cache. You can choose whatever amount you want taking into
consideration how much memory you have. If you have 32MB of RAM, a 4MB limit should be
fine.

Unlike adjusting the swap file size, playing with the
disk cache size is not easy. It involves editing the SYSTEM.INI file in a text editor.
Once you are in the file, find the line that contains "vcache". Right below this
line, insert "MinFileCache=x" and "MaxFileCache=x" as separate lines.
Replace "x" with the value of min and max in KB. Keep in mind that 1KB is
actually 1024 bytes. So, in the above 32MB of memory example, you could insert
"MinFileCache=4096" and "MaxFileCache=4096" to limit the disk cache
size to 4MB. Like all changes to Windows, you will have to reboot for the changes to take
effect.

Automatic virus scanning software can really decrease
performance. Such programs are always scanning every file as you open it for viruses. This
continual scanning is a drain on the system. I recommend a good virus scanner, but not one
that is always on and scanning.

A few more things. When you upgrade hardware and install
the drivers, always remove the drivers of the old hardware if you remove it. A system,
over time, can become crammed with drivers, many outdated, and this just serves to
decrease performance. You can see what hardware and drivers are installed on your system
by clicking on System in the Control Panel. Then click the Device Manager tab. You are
given a list of installed hardware. If you see devices that are no longer on the system,
you should delete them. Be positive they are no longer in use before doing this.

Also, get a good installer program. Over time, after
cycling through many different programs on your system and since deleting them, the system
can become clogged with traces of the old software. Manually deleting some programs is
fine, but other dig themselves into the OS and if you delete them, there are still traces.
All Windows programs create entries in the Windows registry and these entries are often
still there after the program is long gone. This can lead to a long registry file and it
bogs performance. Many good programs exist that uninstall old software and are quite good
at removing every trace. Many programs come equipped with their own uninstalling program.
Still other programs are designed to clean out Windows registry.

Most of the tweaks on this page are relatively harmless
and have the possibility of speeding up your system while decreasing hard drive activity.

Which Of These Traits Applies To YOUR Computing Life?...

One Response to “Operating System Performance”

  1. Larry Miller says:

    This article was written in 2001 for Windows 9x systems. It has little relevance to more modern systems.

    Larry Miller
    Microsoft MCSA

Leave a Reply