Windows 95 Performance Tuning: The Basics

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Windows 95 provides the easiest methods and best defaults ever offered for configuring system memory and ensuring good performance on an x86-based computer. This chapter summarizes system features related to performance and describes tools for monitoring and managing system performance.

The Windows 95 architecture includes several improvements over earlier versions of Windows. These changes, which strongly impact most areas of system performance, include the following:

  • Fully integrated 32-bit, protected-mode operating system, eliminating the need to run MS-DOS separately

  • Complete 32-bit kernel, providing improved memory management and process scheduling, plus improved system-wide robustness and improved cleanup after an application closes or fails, delivering a more stable and reliable operating environment

  • Preemptive multitasking and multithreading support, providing improved system responsiveness, smooth background processing, and improved system capacity, allowing multiple applications and system tasks to run well concurrently

  • 32-bit installable file systems to support better performance and long filenames

  • 32-bit device drivers for all system components, ensuring better performance and better resource management

Many Windows 95 features provide dynamic configuration, reducing or eliminating the need for users to adjust their system settings. The following self-tuning features in Windows 95 are designed to improve performance and reduce support costs.

Dynamic swap file and dynamic caching using VCACHE.

Windows 95 uses dynamic sizes for the virtual-memory swap file, the cache for file and network access, and the CD-ROM cache. Both the swap file and cache sizes can grow or shrink, depending on the computer's memory configuration and the demand for memory from applications. This relieves users or administrators from having to change the cache parameters as new memory or new applications are added. Windows 95 can take advantage of new memory automatically and expand or reduce the file and cache sizes automatically based on demands when applications are loaded or unloaded. Also, the networking, disk, CD-ROM, and paging caches are integrated and will scale as more memory is added to the computer. For more information, see "Optimizing the Swap File" and "Optimizing File System Performance" later in this chapter.

32-bit disk and file access for fast hard-disk access.

These mechanisms allow Windows 95 to access the hard disk or file system directly, bypassing the computer's BIOS. Using 32-bit file and disk access improves performance and allows Windows 95 to handle BIOS requests in protected mode, rather than in real mode. For more information, see Chapter 20, "Disks and File Systems."

Background print rendering.

For a computer that has sufficient memory to take advantage of it, background print rendering is available automatically to reduce the return-to-application time for printing. With this feature, Windows 95 first writes an enhanced metafile (EMF) format file, which is a device-independent rendering of the print job that is much faster to produce than a device-specific rendering. In the background, Windows 95 uses the EMF file to create the device-dependent rendering while the user continues to work in the application. For more information, see "Optimizing Printing" later in this chapter.

Automatic system adjustments during Windows 95 Setup.

During installation, Windows 95 Setup makes decisions about certain operating system features based on the hardware configuration. For example, in a computer with low memory, Windows 95 turns off background print rendering, because this feature increases the operating system working set that is loaded into memory and cannot be paged out to the swap file.

Built-in tools for monitoring and adjusting system performance.

The following tools in Windows 95 are available for managing performance-related settings:

  • System option in Control Panel provides settings for tuning and troubleshooting. For information, see "Optimizing the Swap File," "Optimizing File System Performance," and "Setting Graphics Compatibility Options" later in this chapter.

  • System Monitor can be used to track the performance of key system components, as described in "Tracking Performance with System Monitor" later in this chapter.

  • DriveSpace includes a protected-mode driver that is installed by default, providing faster performance than the earlier real-mode compression driver and using only an additional 10 or 15 percent overhead. If you are using any real-mode disk-compression utilities other than DriveSpace or DoubleSpace, plan to switch to a protected-mode version. Contact the manufacturer to determine availability of protected-mode drivers that are compatible with Windows 95.

  • Disk Defragmenter can improve file access time by defragmenting uncompressed FAT drives and compressed DriveSpace or DoubleSpace drives. Fragmentation occurs over time, as programs read from and write to the hard disk. Eventually, files must be stored in noncontiguous sectors on a disk. Fragmentation doesn't affect the validity of the information, but it takes much longer for the computer to read and write fragmented files.

For more information about DriveSpace and Disk Defragmenter, see Chapter 20, "Disks and File Systems."

On This Page

Windows 95 Performance Tuning: The Issues
System Performance Overview
Optimizing the Swap File
Optimizing File System Performance
Setting Graphics Compatibility Options
Optimizing Printing
Optimizing Network Performance
Optimizing Conventional Memory
Tracking Performance with System Monitor

Windows 95 Performance Tuning: The Issues

This section summarizes performance issues, which are related principally to computer hardware.

486 versus 386 processors.

Windows 95 uses more 32-bit code than Windows 3.1, so it benefits more than Windows 3.1 did from a 486-based processor. This is because the 486-class chip is better optimized for 32-bit code than the 386-class chip. For a given clock rate, if you run a 16-bit performance benchmark on a 386-based versus a 486-based computer, the 486-based computer will outperform the other computer. If you run the same benchmark using 32-bit code, the 486-based computer will outperform the 386-based computer by an even greater margin. Overall, Windows 95 provides significant performance improvements on a 486-based (or higher) processor.

DX versus SX processors.

Although the minimum requirement to run Windows 95 is a 386SX-based processor, the SX processor is not a full 32-bit CPU. The SX-based processor accesses memory using 32-bit addressing, but it accesses data in 16-bit increments. Although Windows 95 will run on an SX-based processor, you will most likely not be sastisfied with the perceived performance when compared to a 16-bit operating system such as Windows 3.1.

Hard disk speed.

Hard disk speed affects Windows 95 more than Windows 3.1. To support many applications running at once, applications are paged out to the swap file when there is more demand for memory than what is available physically. This is a very efficient mechanism for running many applications in a constrained memory environment. Windows 95 performance can be enhanced greatly by installing a faster hard disk. Hard disk speed will also have a great effect on performance when running File and Printer Sharing services.

Processor and bus speed.

In Windows 95, processor and bus speed have a greater impact on display performance than under Windows 3.1. Display performance under Windows 3.1 was affected by inefficiencies in the monolithic display drivers and typically poor bus throughput (mostly ISA), so the CPU would typically encounter bottlenecks in either the bus or monolithic driver when writing to the display. With PCI and the miniport driver model under Windows 95, a CPU can send data as fast as possible down the PCI bus and through the miniport driver without encountering a bottleneck. This means that CPU performance can greatly affect display performance in Windows 95.

Miniport drivers for display adapters.

The new display drivers in Windows 95 have been optimized for enhanced display speed and improved graphics performance. Microsoft created a new universal driver with a better mechanism for manipulating memory bitmaps, which provides fast, reliable graphics support. Microsoft provides miniport drivers for most current display adapters, and these new drivers should be used whenever possible. Contact the hardware manufacturer to obtain new drivers if the correct driver is not provided with Windows 95.

Protected-mode drivers for increased performance and reliability.

Windows 95 provides protected-mode drivers for most devices, including display, network, disk, and so on. These drivers have been developed and tested to ensure better performance and increased reliability over real-mode drivers. After Windows 95 switches into protected mode during system startup, any time an I/O operation uses a device controlled by a real-mode driver, the computer has to switch from protected mode to virtual 8088 mode. This is a very expensive operation in terms of CPU cycles and typically has to be done several times during a single I/O operation, adversely impacting performance. Relying on a real-mode driver for I/O operations also reduces the degree of multitasking that Windows 95 can provide because real-mode drivers were not designed for a preemptively multitasking environment. Therefore, wherever possible, use protected-mode device drivers.

Added memory.

Unlike Windows 3.1, caching in Windows 95 is dynamic, which means that Windows 95 performs better than Windows 3.1 when you increase the amount of system memory. Also, under Windows 95 you do not have to reconfigure the operating system when you change the memory configuration; Windows 95 reconfigures itself automatically.

Low memory (4 MB) computers.

Most of the tuning necessary for a computer with low memory happens automatically, but to reduce the size of the Windows 95 working set and give the maximum amount of memory to applications, run only one network client; if possible, run a single network protocol; and run the fewest possible network services.

Entended Capabilities Port (ECP) for printers.

For locally attached printers, or for computers acting as print servers, it's helpful to use a computer that supports the ECP specification. This ensures better print throughput and bidirectional communications.

For information about performance related to network adapters, see "Optimizing Network Performance" later in this chapter.

System Performance Overview

Windows 95 greatly reduces the system resource limitations that many users experienced with Windows 3.1. Windows 95 also cleans up resources that have not been freed to help reduce system resource limitations. When Windows 95 determines that an application that owned certain resources no longer needs those resources in memory, it deallocates remaining data structures, freeing the resources for use elsewhere in the system.

Wherever possible, Windows 95 is self-tuning, adjusting cache sizes or other elements of the system environment to provide the best performance for the current configuration. Windows 95 can also detect when the drivers loaded or other performance-related components are not providing the optimal performance.

To see a report of performance problems

  • In the System option in Control Panel, click the Performance tab.

    Windows 95 reports the current performance status, including whether 32-bit, protected-mode components are being used.

Cc751096.rk17_05(en-us,TechNet.10).gif

If the performance status shows that real-mode components are being used for any device — and especially for disk drivers — you need to solve all the problems that prevent protected-mode drivers from loading. For information, see Chapter 19, "Devices." This chapter describes methods for optimizing or solving problems related to virtual memory, file system, or graphics performance.

System Resource Capacity in Windows 95

Windows 95 provides a significant increase in the system resources available to Windows-based and MS-DOS – based applications over what was available under earlier versions of Windows. The net result for users is that they can count on more system resources being available for creating windows, using fonts, running five or more applications simultaneously, and so on.

Windows 3.1 maintained 64K regions of memory heaps for use by the graphics device interface (GDI) and USER system components. These heaps stored GDI or memory object information allocated when an application called a Windows API function. The amount of space available in the combination of these two heaps is identified as a percentage of system resources that are free (that percentage appears in the Help About dialog box in My Computer and other Windows-based applications). Under Windows 3.1, when the calculated amount of free space dropped to a low number, the system often reported that it was out of memory even though the amount of free memory shown in the About dialog box was still quite high. This was often due to low memory in either the GDI or USER heap, or both.

In Windows 95, to help reduce the system resource limitation, many data structures formerly stored in the 16-bit GDI and USER heaps are now stored in 32-bit heaps. This provides more room for the remaining data elements to be created.

The following table shows the system limits in Windows 95, as compared to the constraining limits under Windows 3.1. For information about how to assess performance of key system resources, see "Identifying Performance Problems with System Monitor" later in this chapter. For information about the supporting architecture, see Chapter 31, "Windows 95 Architecture."

Resource

Windows 3.1 1

Windows 95 2

Windows Menu handles

~299

32K

Timers

32

Unlimited

COM and LPT ports

4 per type

Unlimited

Items per listbox

8K

32K

Data per listbox

64K

Unlimited

Data per edit control

64K

Unlimited

Regions

All in 64K segment

Unlimited

Physical pens and brushes

All in 64K segment

Unlimited

Logical pens and brushes

All in 64K segment

All in 64K segment

Logical fonts

All in 64K segment

750 – 800

Installed fonts

250 – 300 (best case)

1000

Device contexts

200 (best case)

16K

1 Limits for GDI objects in Windows 3.1 are not exact because all regions, physical objects, logical objects, device contexts (DCs), and installed fonts had to fit in a single 64K segment. Because many of these have been moved to the 32-bit heap, Windows 95 provides much more room for those remaining items, such as logical pens, brushes, and so on. The remaining items in the Windows 95 local heap are all less than 10 – 20 bytes each.

2 System-wide resources, unless noted otherwise.

Technical Notes on MS-DOS Components in Windows 95

Many users have wondered whether Windows 95 contains MS-DOS code, and if so, whether that means that Windows 95 is somehow built on top of MS-DOS. Many of these questions relate to how Windows 95 achieves the highest possible degree of compatibility with existing devices and the myriad applications created for MS-DOS and Windows 3.x. Three key questions are answered here:

  • How does Windows 95 support internal processes and certain application services?

  • How does Windows 95 reclaim memory from real-mode drivers?

  • Why does IO.SYS load WIN.COM rather than directly loading VMM32.VXD?

The following services are based on entirely new code created for Windows 95, not revisions to MS-DOS code:

  • Process and thread memory management

  • Interprocess communications and synchronization

  • Preemptive Win32 subsystem

  • CD-ROM, hard disk, and network I/O services

  • High-level graphics operations and window management

  • Printing services

Some functions, however, are handled by MS-DOS code, although the code itself is running in virtual 8086 mode, not real mode. Functions implemented in this manner ensure backwards compatibility with existing real-mode software, such as the Novell® NetWare® client. The following list shows such functions:

Create Program Segment Prefix (function 55h)
Create Temp File (function 5Ah)
Dup File Handle (function 45h)
Exit (function 4Ch)
Get Date/Time (functions 2Ah and 2Ch)

Get DOS Version (function 30h)
International (function 65h)
Set/Get Drive (functions 0Eh and 19h)
Set/Get Program Segment Prefix (functions 50h and 51h)
NetWare Get Station Num (function DCh)

An important example of how Windows 95 reclaims memory from real-mode device drivers is MSCDEX, the CD-ROM driver. After Windows 95 Setup is completed and Windows 95 starts from the hard disk for the first time, special code runs to determine whether the protected-mode CDFS drivers have taken over the CD-ROM drive completely. If so, the real-mode MSCDEX driver in memory is matched to the related lines in AUTOEXEC.BAT, and the MSCDEX entries are then commented out. This provides a trail in AUTOEXEC.BAT to show what has happened. Similar methods are used for other device drivers that Windows 95 knows to be safe to remove, such as other vendors' real-mode disk cache utilities and redundant protected-mode VxDs.

As a final example, some users have wondered whether the fact that IO.SYS loads WIN.COM (rather than loading VMM32.VXD directly) is an indication that Windows 95 is built on Windows 3.x code, with the addition of new virtual device drivers. However, IO.SYS is used to load WIN.COM only for purposes of backward compatibility. Certain real-mode drivers and TSRs insert themselves at various places in the Windows 3.1 startup process. If Windows 95 were to bypass the loading of WIN.COM and instead load virtual device drivers directly, any driver that needs to insert itself when WIN.COM is loaded would never be called. Instead, Windows 95 starts in precisely the same way as Windows 3.1 and loads the same components in the same order, ensuring compatibility with earlier versions of applications and device drivers.

Optimizing the Swap File

Windows 95 uses a special file on your hard disk called a virtual-memory swap file (or paging file). With virtual memory under Windows 95, some of the program code and other information are kept in RAM while other information is swapped temporarily to virtual memory. When that information is required again, Windows 95 pulls it back into RAM and, if necessary, swaps other information to virtual memory. This activity is invisible, although you might notice that your hard disk is working. The resulting benefit is that you can run more programs at one time than the computer's RAM would usually allow.

On Windows 3.x, users could enhance performance by changing virtual memory settings. The Windows 95 swap file is dynamic, so it can shrink or grow based on the operations performed on the system and based on available disk space. A dynamic swap file is usually the most efficient use of resources. The swap file can also occupy a fragmented region of the hard disk with no substantial performance penalty.

Tip for Swap File Performance

The single best way you can ensure high swap file performance is to make sure that the disk containing the swap file has ample free space so that the swap file size can shrink and grow as needed.

The Windows 95 swap file (WIN386.SWP) is not a permanent file. However, Windows 95 can also use a permanent Windows 3.1 swap file. In this case, the file cannot shrink below the permanent size set for it in Windows 3.1, although the file can grow bigger if required.

Under Windows 95, the swap file can reside on a compressed drive if a protected-mode driver (that is, DRVSPACE.VXD) controls the compressed drive. DriveSpace marks the swap file as uncompressible and, to reduce the risk of fragmentation, places the swap file as the last file in the sector heap, which allows room for the swap file to grow.

For a computer that runs a shared version of Windows 95 from a server, the swap file is placed in the computer's machine directory. If the computer is started from a floppy disk or uses remote booting, the swap file is in the machine directory on the network. If the computer is started from the local hard disk, the swap file can be stored in the machine directory on the local computer.

Although the system defaults usually provide the best performance, you can adjust the parameters used to define the swap file. For example, to optimize swap file performance on a computer with multiple hard disk drives, you might want to override the default location of the Windows 95 swap file. The swap file should be placed on the drive with the fastest performance (unless that disk is overused). If a user usually loads all software from the same drive in a computer that has multiple drives, performance might be boosted by placing the swap file on one of the drives that is not as busy.

Caution: Completely disabling virtual memory might cause the computer to stop operating properly. You might not be able to restart the computer, or system performance might be degraded. Do not disable virtual memory unless instructed to do so by a technical support representative.

To adjust the virtual memory swap file

  1. In the System option in Control Panel, click the Performance tab.

  2. Click the Virtual Memory button.

  3. To specify a different hard disk, click the option named Let Me Specify My Own Virtual Memory Settings. Then specify the new disk in the Hard Disk box. Or, type values (in kilobytes) in the Minimum or Maximum boxes. Then click OK.

Cc751096.rk17_01(en-us,TechNet.10).gif

If you set the maximum swap file size in the Virtual Memory dialog box to the amount of free space currently on a drive, Windows 95 assumes that it can increase the swap file beyond that size if more free disk space becomes available. If you want to impose a fixed limit on the swap file size, make sure that the limit you choose is less than the current maximum.

Optimizing File System Performance

In Windows 95, the disk cache is dynamic. You do not need to configure its size as part of system configuration. Because of this, the following types of settings used for Windows 3.x are not required in Windows 95 and should be removed from the configuration files.

Configuration file

Configuration setting to remove

autoexec.bat

SHARE
SMARTDRV settings
Any entries for other disk cache software1

config.sys

SMARTDRV settings (double-buffer driver)
Any entries for other disk cache software

1 For a list of the disk caching software that is removed by Windows 95 Setup, see Chapter 6, "Setup Technical Discussion."

The overall performance, for example, of a computer with 8 MB of memory is better under Windows 95 than under Windows 3.1. However, the amount of paging might be more under Windows 95 for several reasons:

  • Windows 95 aggressively writes the contents of dirty memory pages (pages that contain changes) during system idle time, even if it doesn't need the memory at that time. This causes more idle-time disk activity but speeds up future memory allocations by doing some of the work when the system is idle.

  • Much more of Windows 95 can be paged out to disk than Windows 3.1. That's why it's even possible to still run applications on low-memory computers when Windows 95 requires a working set of 4 MB. However, the working set isn't the amount of memory you need to hold all code and data; it's just the amount of memory you need to avoid an unacceptable amount of paging.

Changing the cache size (even if you could) probably wouldn't have much effect on paging. Paging through the cache would quickly overwhelm it and make it useless for other file I/O. Although swap file I/O operations don't go through the cache, memory-mapped files and executable files do. The cache, however, is designed to make sure it can't be overwhelmed by such I/O operations.

The cache grows and shrinks as needed. If the system begins to page a lot, the cache shrinks automatically. However, people often think they are seeing a lot of paging, but they are really seeing other disk activity, such as Windows 95 building its icon cache or the cache lazy writing.

If the amount of paging is extreme, to the point where system performance is poor, then you probably have a hard disk that requires a real-mode device driver. If Windows 95 needs to use real-mode for its disk I/O operations, then a lot of code has to be locked down that would otherwise be pageable, and your working set increases significantly. Paging through a real-mode driver does increase paging, but on a computer with 8 MB of memory, it shouldn't cause unacceptable performance.

Tip for 32-bit Disk Access in Windows 95

The 32-bit disk access feature is always turned on in Windows 95 unless Windows 95 detects a real-mode disk driver that doesn't have a protected-mode replacement. This could be, for example, an older Stacker® driver or a hard-disk security or encryption driver for a disk drive.

To prevent the performance loss that occurs when Windows 95 is forced to use a real-mode disk driver, upgrade to a protected-mode replacement for that driver. If you need to determine why a Windows 95 real-mode disk driver was installed, check the IOS.LOG file. For more information, see Chapter 19, "Devices."

Optimizing File System Performance with Profiles

In Windows 95, file system and disk performance can be controlled based on how the computer is used in most situations. The option for configuring file system performance is controlled only by the user. None of these settings are affected by other configuration changes that might be made in Windows 95, such as installing File and Printer Sharing services, or choosing the Portable option as the Setup Type when installing Windows 95.

To optimize file system performance

  1. In the System option in Control Panel, click the Performance tab, and then click the File System.

  2. In the list named Typical Role Of This Machine, select the most common role for this computer, and then click OK. The following table describes each role in the list.

    Role

    Description

    Desktop Computer

    A normal computer acting primarily as a network client, or an individual computer with no networking. This configuration assumes there is more than the minimum required RAM, and that the computer is running on power (rather than battery).

    Mobile Or Docking System

    Any computer with limited memory. This configuration assumes limited RAM and that the computer is running on battery, so the disk cache should be flushed frequently.

    Network Server

    A computer used primarily as a peer server for file or printer sharing. This configuration assumes that the computer has adequate RAM and frequent disk activity, so the system is optimized for a high amount of disk access.

Each disk performance profile adjusts the values of the following file-system settings in the Registry:

  • PathCache, which specifies the size of the cache that VFAT can use to save the locations of the most recently accessed directory paths. This cache improves performance by reducing the number of times the file system must seek paths by searching the file allocation table. The number of paths is 32 for the Desktop computer profile, 16 for Mobile Or Docking System, and 64 for Network Server.

  • NameCache, which stores the locations of the most recently accessed filenames. The combined use of PathCache and NameCache means that VFAT never searches the disk for the location of cached filenames. Both PathCache and NameCache use memory out of the general system heap. The number of filenames is about 677 names (8 KB) for the Desktop computer profile, 337 names (4 KB) for Mobile Or Docking System, and 2729 names (16 KB) for Network Server.

  • BufferIdleTimeout, BufferAgeTimeout, and VolumeIdleTimeout, which control the time between when changes are placed in the buffer to when they are written to the hard disk.

The values to be assigned to each disk performance profile are stored in the following Registry key:

Hkey_Local_Machine \Software \Microsoft \Windows \CurrentVersion
   \FS Templates

The following subkey contains the actual settings for the profile currently used:

Hkey_Local_Machine \System \CurrentControlSet \Control \FileSystem

An additional performance setting in the FileSystem subkey, ContigFileAllocSize, can be used to change the size of the contiguous space that VFAT searches for when allocating disk space. Under MS-DOS, the file system began allocating the first available space found on the disk, which ensured a great deal of disk fragmentation and related performance problems. By default under Windows 95, VFAT first tries to allocate space in the first contiguous 0.5 MB of free space, then returns to the MS-DOS method if it can't find at least this much contiguous free space. This optimizes performance for both the swap file and multimedia applications.

In some cases, you might choose to set a smaller value in the Registry, such as if you are not running demanding applications on the computer. A smaller value for ContigFileAllocSize, however, can lead to more fragmentation on the disk and, consequently, more disk access for the swap file or applications that require larger amounts of disk space.

Optimizing CD-ROM File System Performance

The CD-ROM cache is separate from the cache used for disk file and network access because the performance characteristics of the CD-ROM are different. This cache can be paged to disk (the file and network cache cannot), which reduces the working set for Windows 95 but still allows for better CD-ROM performance. When Windows 95 is retrieving data from a compact disc, it is still faster to read a record from the cache even if it's been paged to disk because the disk-access time is much faster than the compact-disc access time.

Tip A small CD-ROM cache makes a big difference in streaming performance, but a much larger cache does not pay off as significantly, unless the cache is large enough to contain entire multimedia streams.

To set the supplemental cache size for CDFS

  1. In the System option in Control Panel, click the Performance tab, and then click the File System button.

  2. In the CD-ROM Optimization area, drag the slider to set the supplemental cache size.

    Cc751096.rk17_10(en-us,TechNet.10).gif

  3. In the Optimize Access Pattern For list, select a setting based on the size of your computer's RAM and CD-ROM access speed. The following list shows recommended settings related to RAM size and the size of the cache that's created.

    RAM size

    Optimize setting

    Cache size

    8 MB or less

    Single-speed drives

    64K

    8 MB to 12 MB

    Double-speed drives

    626K

    12 MB or more

    Quad speed or higher

    1238K

  4. Click OK, and then shut down and restart the computer.

For information about how VCACHE and the supplemental CD-ROM cache work, see Chapter 20, "Disks and File Systems."

Using File-System Troubleshooting Options

The System option in Control Panel presents a set of options for changing file system performance. You can use these options when you experience rare hardware or software compatibility problems.

Important: Enabling any of the file-system Troubleshooting options will seriously degrade system performance. Typically, you want to enable these options only if instructed to do so by your product support representative.

To display the file-system Troubleshooting options

  1. In the System option in Control Panel, click the Performance tab.

  2. Click the File System button, and then click the Troubleshooting tab.

The following table summarizes the settings in Troubleshooting properties. Each option sets a value in this Registry key:

Hkey_Local_Machine \System \CurrentControlSet \Control \FileSystem

File system option

Description

Disable New File Sharing And Locking Semantics

This option alters the internal rules for file sharing and locking on hard disks, governing whether certain processes can have access to open files in certain share modes that guarantee a file will not be modified. This option should be checked only in the rare case that an MS-DOS – based application has problems with sharing under Windows 95. This sets SoftCompatMode=0 in the Registry.

Disable Long Name Preservation For Old Programs

This option turns off the tunneling feature, which preserves long filenames when files are opened and saved by applications that do not recognize long filenames. This option should be checked in the rare case that an important legacy application is not compatible with long filenames. This sets PreserveLongNames=0 in the Registry.

Disable Protected-Mode Hard Disk Interrupt Handling

This option prevents Windows 95 from terminating interrupts from the hard disk controller and bypassing the ROM routine that handles these interrupts. Some hard disk drives might require this option to be checked in order for interrupts to be processed correctly. If this option is checked, the ROM routine handles the interrupts, which slows system performance. This sets VirtualHDIRQ=1 in the Registry. (This setting is off by default for all computers in Windows 95, which is the reverse of Windows 3.x.)

Disable All 32-bit, Protected-Mode Disk Drivers

This option ensures that no 32-bit disk drivers are loaded in the system, except the floppy driver. Typically, you would check this option if the computer does not start due to disk peripheral I/O problems. If this option is enabled, all I/O will go through real-mode drivers or the BIOS. Notice that in this case, all disk drives that are visible only in protected mode will no longer be visible. This sets ForceRMIO=1 in the Registry.

Disable Write-Behind Caching For All Drives

This option ensures that all data is flushed continually to the hard disk, removing any performance benefits gained from disk caching. This option should be checked only in the rare cases where you are performing risky operations and must ensure prevention of data loss. For example, a software developer who is debugging data at Ring 0 while creating a virtual device driver would check this option. This sets DriveWriteBehind=0 in the Registry.

Setting Graphics Compatibility Options

In Windows 95, graphics hardware acceleration features can be turned off when system performance indicates incompatibility problems. Specifically, problems can occur when Windows 95 assumes a display adapter can support certain functionality that it cannot. In such cases, the side effects might be anything from small irregularities on the screen to system failure. You can disable hardware acceleration features of the display adapter so that the computer can still be used if there is a problem with the display adapter. If changing these settings fixes otherwise unexplained system crashes or performance problems, then the source of the problem is probably the computer's display adapter.

To change graphics performance settings

  1. In the System option in Control Panel, click the Performance tab, and then click the Graphics button.

  2. Drag the slider to change the hardware acceleration setting, as summarized in the following list. Then click OK.

    Cc751096.rk17_09(en-us,TechNet.10).gif

    • The default setting is Full, which turns on all graphics hardware acceleration features available in the display driver.

    • The first notch from the right can be set to correct mouse pointer display problems. This setting disables hardware cursor support in the display driver by adding SwCursor=1 to the [Display] section of SYSTEM.INI.

    • The second notch from the right can be set to correct certain display errors. This setting prevents some bit block transfers from being performed on the display card and disables memory-mapped I/O for some display drivers. This setting adds SwCursor=1 and Mmio=0 to the [Display] section of SYSTEM.INI, and SafeMode=1 to the [Windows] section of WIN.INI.

    • The last notch from the right (None) can be set to correct problems if your computer frequently stops responding to input, or has other severe problems. This setting adds SafeMode=2 in the [Windows] section of WIN.INI, which removes all driver acceleration support and causes Windows 95 to use only the DIB engine rather than bit block transfers for displaying images.

      For example, if you receive an error message at system startup stating that an application caused "an invalid page fault in module <unknown>," this indicates a problem between the display driver and the Windows 95 DIB engine. In such cases, this setting should correct the problem.

For more information about the built-in graphics performance features in Windows 95, see Chapter 19, "Devices," and Chapter 31, "Windows 95 Architecture."

Optimizing Printing

Printing to a printer attached to a file or print server occurs differently, depending on the server's operating system. If you print to a server running Windows 95, the rendering from the EMF format to the printer-specific language happens on the server. This means that less work is performed on the client computer, giving the user better performance.

When you print to NetWare or Windows NT servers, the rendering from EMF to the printer-specific format happens on the client computer. Although this happens in the background, it still means more work is performed on the client computer. Printing to a printer attached locally causes both the EMF rendering and the device-specific rendering to happen on the computer. For more information, see Chapter 23, "Printing and Fonts."

You also need to decide on the trade-off between disk use and return-to-application time when configuring printing in Windows 95.

To define spool settings for print performance

  1. In the Printers option in Control Panel, right-click the printer icon, and then click Properties.

  2. Click the Details tab, and then click Spool Settings.

    Cc751096.rk17_08(en-us,TechNet.10).gif

    Select Spool Print Jobs So Program Finishes Printing Faster, and then click one of the following options:

    • Click Start Printing After Last Page Is Spooled if you want the return-to-application time to be faster. This requires more disk space and increases the total print time. The second rendering does not start until the entire file is written to the EMF file, which decreases the amount of work performed on the computer as you print but increases the disk space because the entire file has to be written before the second rendering starts.

    • Click Start Printing After Page Is Spooled if you want the second rendering to take place simultaneously with the writing of the EMF file. This reduces the total print time and disk space required, but it increases the return-to-application time.

Optimizing Network Performance

Windows 95 automatically adjusts system parameters to accommodate user demands and various network configurations. For example, it alters the size of the system paging file and cache buffer as memory requirements change and automatically tunes network time-out values to fit varying LAN topologies.

With a few exceptions, manual tuning of operating system parameters is not required to improve network performance. However, you can take several other measures that can increase file-sharing performance, such as reconfiguring or changing hardware components. This section summarizes these measures.

  • Use a 32-bit, protected-mode network client.

    For example, the Microsoft Client for NetWare Networks significantly out-performs the VLM or NETX version of the NetWare client. On large block transfers over the network, Client for NetWare Networks is up to twice as fast as Windows 3.x with the VLM shell, based on benchmarks performed by beta testers. The protected-mode networking client can take advantage of caching and other automatic tuning features. With a real-mode client, you are limited to the same performance tuning capabilities that were available under Windows 3.x.

  • Use the new NDIS 3.1 network adapter drivers provided with Windows 95.

  • Install a new network adapter. The adapters currently available provide markedly better performance than earlier models. If possible, select an adapter that matches the computer bus. For more information, see Chapter 12, "Network Technical Discussion."

    Network adapters have become exceptionally reliable and inexpensive. The low costs of Ethernet adapters, including new Plug and Play hardware, means that usually the most cost-effective way to improve network performance is to replace an older network adapter with a new model. The cost for the new hardware is offset almost immediately by savings in support time and improved performance.

The following measures can help you obtain the best performance from computers that provide File and Printer Sharing services:

  • Let Windows 95 determine the right size for the swap file.

  • Make sure the computer has enough memory, depending on the size of your network and the number of users who will be accessing the peer server.

  • In the System option in Control Panel, set the typical role of the computer to Network Server, as described in "Optimizing File System Performance with Profiles" earlier in this chapter.

  • Install a high-performance network adapter on the peer server. If the computer uses an 8-bit adapter, you can increase performance significantly by replacing it with a high-performance 16-bit or 32-bit adapter.

  • Disable rarely used network adapters. This improves overall network performance by decreasing the number of broadcast packets on the network. Each broadcast packet must be processed by every active adapter on the network. High broadcast rates adversely affect LAN performance by increasing network connection time. You can disable a network adapter by disabling its binding to protocols in the Network option in Control Panel.

  • Install faster hard disks or disk controllers (or both). Typically, when setting up peer servers, you will want to choose computers configured with the best-performing hardware.

  • On a computer running File and Printer Sharing for NetWare Networks, set the read-only attribute on shared files wherever possible. The network client can take better advantage of file caching with read-only files, which will improve network performance and reduce the load on the server.

Optimizing Conventional Memory

The methods for conventional memory management under Windows 95 are the same as for MS-DOS 6.x:

  • In CONFIG.SYS, load himem and emm386 (using either the ram or noems switches), and load any required real-mode drivers and applications using devicehigh or loadhigh statements.

  • Remove as many real-mode drivers and TSRs from CONFIG.SYS and AUTOEXEC.BAT as possible, and instead use new protected-mode drivers and applications created for Windows 95.

  • Use buffershigh, fcbshigh, fileshigh, lastdrivehigh, and stackshigh to ensure that reserved memory is taken out of the upper memory area. For information about these commands, see Appendix A, "Command-Line Commands Summary."

  • Do not load smartdrv in your configuration files, except in configuration files for an application that you run in MS-DOS Mode. Windows 95 uses an improved method for disk caching, so loading smartdrv typically wastes memory that could be used by MS-DOS – based applications.

You can still run the MEMMAKER utility provided with MS-DOS 6.2x to load real-mode drivers in the upper memory blocks (UMB). This utility is available in the OTHER\OLDDOS directory on the Windows 95 compact disc.

For information about MS-DOS Mode, and other configuration issues related to MS-DOS – based applications, see Chapter 22, "Application Support." For specific information about MS-DOS memory settings, consult the Microsoft MS-DOS 6.2 Technical Reference or other books on MS-DOS memory management.

Tip for MS-DOS Mode don't assume that running an MS-DOS – based application in MS-DOS Mode provides better performance. When an application runs in MS-DOS Mode, Windows 95 and all of its protected-mode drivers are unloaded, so the application is running in real mode with exclusive use of the computer's resources.

Although this might help with a few applications that otherwise cannot run under Windows 95, it does not benefit performance overall because the application doesn't get the benefit of protected-mode drivers, VCACHE, 32-bit disk access, and so on. Also, real-mode device drivers must be loaded, reducing the amount of conventional memory available to the application.

Tracking Performance with System Monitor

System Monitor is a Windows 95 tool you can use to help determine the cause of problems on a local or remote computer by measuring the performance of hardware, software services, and applications. When you make changes to the system configuration, System Monitor shows the effect of your changes on overall system performance. You can also use System Monitor to justify hardware upgrades.

Before making major configuration changes, use System Monitor to evaluate your current configuration; this can help you determine whether a particular system or network component is acting as a performance bottleneck.

To install and run System Monitor

  1. In the Add/Remove Programs option in Control Panel, click the Windows Setup tab.

  2. In the Components list, make sure Accessories is checked, and then click Details.

  3. In the Components list, make sure System Monitor is checked, and then click OK.

  4. To install System Monitor, click OK.

  5. To run System Monitor, click the Start button, click Run, and then type sysmon

To use System Monitor to monitor remote computers

  1. Install the Microsoft Remote Registry service on your computer and on the computer you want to monitor, as described in Chapter 16, "Remote Administration."

  2. Click the File menu, and then click Connect.

  3. Type the computer name of the computer you want to monitor, and then click OK.

Notice that monitoring a remote computer requires user-level security.

Configuring Performance Charts in System Monitor

System Monitor uses the dynamic data information in the Registry to report on the state of processes. You can use System Monitor to do the following:

  • Monitor real-time system performance and compare it with historical performance to help identify trends over time.

  • Determine system capacity and identify bottlenecks.

  • Monitor the effects of system configuration changes.

To use System Monitor to track performance problems

  1. Click the Edit menu, and then click Add Item.

  2. In the Category list, click the resource that you want to monitor.

  3. In the Item list, select one or more resources that you want to monitor.

    To select more than one item, press CTRL while clicking the items that you want to select. To select several items in a row, click the first item, and then press and hold down SHIFT while clicking the last item.

    For more information about a selected resource, click the Explain button, which is dimmed until after step 3.

    Cc751096.rk17_02(en-us,TechNet.10).gif

  4. Click OK.

    To change the view of the data from a line chart to a bar chart or a numeric listing, click the related button on the button bar.

    Cc751096.rk17_03(en-us,TechNet.10).gif

System Monitor offers menu commands for configuring the charts:

  • To change the update interval, click the Options menu, and then click Chart.

  • To configure the color and scaling for a selected item, click the Edit menu, and then click Edit Item.

  • To control the display of the toolbar, status bar, and title bar, click the View menu, and then click Toolbar, Status Bar, or Hide Title Bar, respectively.

Identifying Performance Problems with System Monitor

If you want to use System Monitor effectively, you need to run it frequently to become familiar with what typical performance looks like for a standard configuration so that you can recognize performance problems when they appear in System Monitor.

To become well-acquainted with System Monitor, run it while you are doing your usual work under Windows 95. To do this, add the System Monitor icon to your desktop. Then run System Monitor and use commands on the View menu to remove the title bar or to force the window to be always on top.

The following presents some general guidelines and key settings for using System Monitor in troubleshooting performance problems:

  • If you suspect a application might not be freeing memory when it finishes using it (sometimes called memory leaks), monitor the value of Kernel: Threads over time. This will indicate whether the application is starting threads and not reclaiming them. Windows 95 automatically removes such threads when the application closes, but if you identify a leak while the application is running, you might decide that you should restart the application periodically.

  • If the values for Memory Manager: Discards and Memory Manager: Page-outs indicate a great deal of activity, performance problems might be related to system memory stress. These values might indicate a need for more physical memory.

    If a computer seems slow, check the values reported by Kernel: Processor Usage (%) and by Memory Manager: Page Faults and Memory Manager: Locked Memory, as described in the following list:

    • If values for Kernel: Processor Usage are high even when the user is not working, check to see which application might be keeping it busy. To do this, press CTRL+ALT+DEL to see the list of tasks in the Close Program dialog box.

    • If the values for Memory Manager: Page Faults are high, it might indicate that the applications being used have memory needs that are beyond the computer's capabilities.

    • If the Memory Manager: Locked Memory statistics continually are a large portion of the Memory Manager: Allocated Memory value, then inadequate free memory might be affecting performance. Also, you might be running an application that locks memory unnecessarily. (Locked memory indicates the portion of memory used that cannot be paged out.)

The following basic example shows several memory management statistics over a few minutes while Windows-based word processing, spreadsheet, and mail applications were loaded and several files were opened.

Cc751096.rk17_03a(en-us,TechNet.10).gif

Summary of System Monitor Categories

System Monitor tracks functionality for the following categories:

  • File System

  • IPX/SPX Compatible Protocol

  • Kernel

  • Memory Manager

  • Microsoft Client for NetWare Networks and Microsoft Network Client

  • Microsoft Network Server (File and Printer Sharing service)

  • Microsoft Network Monitor Performance Data

Note: Because System Monitor uses Registry information, drivers can be written to report additional information in System Monitor. For information about creating such drivers, see the Windows 95 Device Development Kit.

The following tables describe the settings for the built-in System Monitor categories.

Setting

Description

Bytes Read/Second

The number of bytes read from the file system each second.

Bytes Written/Second

The number of bytes written by the file system each second.

Dirty Data

The number of bytes waiting to be written to the disk. Dirty data is stored in cache blocks, so the number reported might be larger than the actual number of bytes waiting.

Reads/Second

The number of read operations delivered to the file system each second.

Writes/Second

The number of write operations delivered to the file system each second.
IPX/SPX Compatible Protocol

Setting

Description

IPX Packets Lost/Second

The number of IPX packets received by the computer from an IPX network that were ignored.

IPX Packets Received/Second

The number of packets received by the computer from an IPX network each second.

IPX Packets Sent/Second

The number of packets sent by the computer to an IPX network each second.

Open Sockets

The number of free sockets.

Routing Table Entries

The number of IPX interworking routes known.

SAP Table Entries

The number of service advertisements known.

SPX Packets Received/Second

The number of packets received by the computer from an SPX network each second.

SPX Packets Sent/Second

The number of packets sent by the computer to an SPX network each second.
Kernel

Setting

Description

Processor Usage (%)1

The approximate percentage of time the processor is busy.

Threads

The current number of threads present in the system.

Virtual Machines

The current number of virtual machines present in the system.

1 Monitoring processor usage will increase processor usage slightly, so don't monitor this setting unless you are investigating a problem.

Setting

Description

Allocated Memory1, 2

The total amount in bytes of Other Memory and Swappable Memory. If this value is changing when there's no activity on the computer, it indicates that the disk cache is resizing itself.

Discards

The number of pages discarded from memory each second. (The pages aren't swapped to the disk because the information is already on the disk.)

Disk Cache Size

The current size, in bytes, of the disk cache.

Free Memory

The total amount of free RAM, in bytes. This number is not related to Allocated Memory. If this value is zero, memory can still be allocated, depending on the free disk space available on the drive that contains the swap file.

Instance Faults

The number of instance faults each second.

Locked Memory1

The amount of allocated memory that is locked.

Maximum Disk Cache Size

The largest size possible for a disk cache. This is a fixed value loaded at system startup.

Minimum Disk Cache Size

The smallest size possible for a disk cache. This is a fixed value loaded at system startup.

Other Memory1

The amount of allocated memory not stored in the swap file; for example, code from Win32 DLLs and executable files, memory mapped files, nonpageable memory, and disk cache pages.

Page Faults

The number of page faults each second.

Page-ins

The number of pages swapped into memory each second, including pages loaded from a Win32-based executable file or memory-mapped files. Consequently, this value does not necessarily indicate low memory.

Page-outs

The number of pages swapped out of memory and written to disk each second.

Swapfile Defective

The number of bytes in the swap file that are found to be physically defective on the swap medium. Because swap file frames are allocated in 4096-byte blocks, a single damaged sector causes the whole block to be marked as defective.

Swapfile In Use

The number of bytes being used in the current swap file.

Swapfile Size

The size, in bytes, of the current swap file.

Swappable Memory1

The number of bytes allocated from the swap file. Locked pages still count for the purpose of this metric. This includes code from 16-bit applications and DLLs, but not code from Win32 DLLs and executable files.

1 This number includes the disk cache. To see the actual size, subtract the value of Disk Cache Size.

2 For any Windows-based application that uses common dialog boxes, the spooler, OLE, and so on, handles are cached for later use, so not all resources will be freed when the application closes.

Setting

Description

Burst Packets Dropped

Number of burst packets from this computer lost in transit.

Burst Receive Gap Time

Interpacket gap for incoming traffic, in microseconds.

Burst Send Gap Time

Interpacket gap for outgoing traffic, in microseconds.

Bytes In Cache

Amout of data, in bytes, currently cached by the redirector.

Bytes Read Per Second

Bytes read from the redirector per second.

Bytes Written Per Second

Bytes written to the redirector per second.

Dirty Bytes In Cache

Amount of dirty data, in bytes, currently cached by the redirector and waiting to be written.

NCP Packets Dropped

Number of regular NCP packets lost in transit.

Requests Pending

Number of requests waiting to be processed by the server.
Microsoft Network Client (Client for Microsoft Networks)

Setting

Description

Bytes Read/Second

The number of bytes read from the redirector each second.

Bytes Written/Second

The number of bytes written to the redirector each second.

Number Of Nets

Number of networks currently running.

Open Files

Number of open files on the network.

Resources

Number of resources.

Sessions

Number of sessions.

Transactions/Second

The number of SMB transactions managed by the redirector each second.
Microsoft Network Server (File and Printer Sharing for Microsoft or NetWare Networks)

Setting

Description

Buffers

The number of buffers used by the server.

Bytes Read/Sec

The total number of bytes read from a disk.

Bytes Written/Sec

The total number of bytes written to a disk.

Bytes/Sec

The total number of bytes read from and written to a disk.

Memory

The total memory used by the server.

NBs

Server network buffers.

Server Threads

The current number of threads used by the server.
Microsoft Network Monitor Performance Data1

Setting

Description

Mediatype2 broadcasts/sec

Broadcast frames transmitted over the network adapter per second.

Mediatype bytes/sec

Total bytes transmitted over the network adapter per second.

Mediatype frames/sec

Total frames transmitted over the network adapter per second.

Mediatype multicasts/sec

Total multicast frames transmitted over the network adapter per second.

1 Gathering these statistics on a heavily used, low-performance computer will impact performance.

2 Mediatype can be Ethernet or TokenRing.