In Windows 98, the disk cache is dynamic. You do not need to configure its size as part of system configuration. Because of this, certain settings used for Windows 3.x are not required in Windows 98 and should be removed from the configuration files. Table 26.2 shows these settings.
Table 26.2 Configuration settings not required
Configuration file | Configuration setting to remove | |
---|---|---|
Autoexec.bat | SHARESMARTDRV settings. Any entries for other disk cache software. 1 | |
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 98 Setup, see Chapter 5, "Setup Technical Discussion." |
The overall performance, for example, of a computer with 16 MB of memory is better under Windows 98 than under Windows 3.1. However, the amount of paging might increase under Windows 98 for the following reasons:
Changing the cache size is not a good method of limiting paging. Paging through the cache would quickly overwhelm it and make it useless for other file I/O. Although swap file I/O operations do not go through the cache, memory-mapped files and executable files do. The cache, however, is designed to make sure it cannot be overwhelmed by such I/O operations.
Changing the cache size (even if you could) probably would not have much effect on paging. 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 98 building its icon cache or the cache lazy writing.
A common reason for excessive paging is that the working set of the applications you are running is greater than the amount of physical RAM available. If the amount of paging is extreme, to the point where system performance is poor, a real-mode driver for the hard disk may be the cause, and should be replaced with a protected mode driver. If Windows 98 needs to use real-mode for its disk I/O operations, a lot of code has to be locked down that would otherwise be pageable, and your working set increases significantly.
Note
Paging through a real-mode driver increases paging, and on a computer with 16 MB of memory (the minimum configuration for Windows 98), it can cause unacceptable performance.
Preventing Data Loss with 32-bit Disk Access The 32-bit disk access feature is always turned on in Windows 98 unless Windows 98 detects a real-mode disk driver that does not 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 98 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 98 real-mode disk driver was installed, check the Ios.log file. For more information, see Chapter 24, "Device Management." |
In Windows 98, 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 98, such as installing file and printer sharing services, or choosing the Portable option as the setup type when installing Windows 98.
Note
Application launch acceleration depends on cluster size and, therefore, the particular file system. Smaller cluster sizes give better application launch performance—the 4 KB cluster size (FAT32) is best; larger sizes (for example, FAT16) give less of a performance boost.
To optimize file system performance
Table 26.3 Computer role descriptions
Role | Description |
---|---|
Desktop computer | A normal computer acting primarily as a network client, or an individual computer with no networking. This configuration assumes that 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 that RAM is limited 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:
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, ContigFile AllocSize, 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 98, VFAT first tries to allocate space in the first contiguous 0.5 MB of free space and then returns to the MS-DOS method if it cannot 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, as when 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.
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), reducing the working set for Windows 98 but still allowing for better CD-ROM performance. When Windows 98 is retrieving data from a compact disc, it is still faster to read a record from the cache even if it has 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
Move the Supplemental Cache Size slider to the right to allocate more RAM for caching data from the CD-ROM drive or to the left to allocate less RAM for caching data.
Note
Many multimedia programs perform better with a smaller cache, because they tend not to reuse data.
Table 26.4 Optimizing cache size
CD-ROM drive speed | Cache size |
---|---|
No read-ahead | 1088 KB |
Single-speed drives | 1088 KB |
Double-speed drives | 1138 KB |
Triple-speed drives | 1188 KB |
Quad-speed or higher | 1238 KB |
Digital video discs (DVDs) primarily use the Universal Disk Format (UDF) for their file systems. UDF uses the main file system cache (VCACHE), and there are no performance settings for end users to change.
For more information about UDF, see Chapter 10, "Disks and File Systems."
For more information about DVD, see Chapter 10, "Disks and File Systems," and Chapter 30, "Hardware Management."
Windows 98 gives you the option to use write-behind caching to improve the performance of removable disk drives, such as the ZIP or JAZ drive.
To set write-behind caching for removable disk drives
The advantage of using direct memory access (DMA) with integrated device electronics (IDE) CD-ROM and disk drives is that it allows much lower CPU usage during I/O transfers for drives that are part of an original equipment manufacturer (OEM) computer. DMA is enabled by default in OEM computers, but because certain older IDE drives can corrupt data when using DMA, care must be taken when enabling DMA in upgraded computers.
To enable DMA
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 a product support representative. Otherwise, these options should rarely, if ever, be used.
To display the file system troubleshooting options
Table 26.5 summarizes the settings in Troubleshooting properties. Each option sets a value in the following registry key.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem
Table 26.5 File system troubleshooting options
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 98. This sets SoftCompatMode=0 in the registry. |
Disable long name preservation for old programs. | This option turns off the tunneling feature, which preserves long file names when files are opened and saved by applications that do not recognize long file names. This option should be checked in the rare case that an important legacy application is not compatible with long file names. This sets PreserveLongNames=0 in the registry. |
Disable protected-mode hard disk interrupt handling. | This option prevents Windows 98 from terminating interrupts from the hard disk controller and bypassing the read-only memory (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, slowing system performance. This sets VirtualHDIRQ=1 in the registry. This setting is off by default in Windows 98. |
Disable synchronous buffer commits. | The file commit API is used to guarantee integrity of user data that is being written by an application to a disk. Normally, the file commit API is used by applications to ensure that critical data that the application is writing is written to the disk before returning from a call made to the file commit API. Choosing this option disables this feature. Data is still written to disk, but it is written to disk in the background at the discretion of the file system. Choosing this option can compromise data written to disk by an application should the system crash before the data is actually written. This option was added to allow adequate performance of a defective database application that used the file commit API incorrectly and excessively. |
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 because of 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 case that 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 VxD would check this option. This sets DriveWriteBehind=0 in the registry. |