|   Register   |  
Search  

Key to Optimizing and Tuning Windows NT 4.0

Last Updated 2/3/2009 3:42:57 PM


Abstract


In addition to basic internal architecture, knowledge about a few other key elements of Windows NT can support your pursuit of a high-performance system. This chapter reviews the NT virtual memory system, looks at how NT manages storage, and how hardware affects performance — and tells you where you locate troubleshooting and extension documentation.


NT MEMORY, STORAGE DESIGN, AND MORE

In addition to basic internal architecture, understanding a few other NT issues can aid you in maintaining a high-performance system. Appendix B reviews memory, storage, service packs (SPs), and additional documentation.

NT Memory


The NT networking operating system supports up to 4 GB of physical RAM. However, with the exception of specialized experimental equipment, it is not possible to host that much RAM within a single computer. Even without the physical existence of RAM, NT still offers 4 GB of address space to every active process by using virtual machines to isolate and protect processes. Each virtual machine is assigned a unique 4-GB address space. The Virtual Memory Manager (VMM) from the kernel’s Executive Services maps the address space from each virtual machine. Figure B.1 offers a representation of this mapping.

Under NT, systems can have memory configurations larger than 4 GB. Such systems are usually Alpha CPU-based and require NT Server 4 Enterprise. They are configured for use by specialized memory-intensive applications, such as databases or transaction management systems. In systems with more than 4 GB of RAM, memory above 4 GB is not paged. We generally refer to NT’s memory capabilities as being 4 GB because most readers of this book work with NT deployments of NT that support only 4 GB.

NT uses a memory architecture and organizational system comprising a 32-bit flat linear address space that employs a demand-paging virtual memory. Because physical installations of 4 GB RAM are not widespread, NT hosts 4 GB of RAM by combining physical RAM with a swap file or paging file on a hard drive which lets NT use a larger memory resource than is physically present. Because hard drives are 100 to 10,000 times slower than physical RAM, working with memory out of the paging file is clearly much slower than working from actual RAM (Figure B.2).

The memory system NT uses is divided into pages; each page is a 4K chunk or block of memory (8K on Alpha and some MIPS systems). Through the demand-paging process, NT attempts to keep the active portions of memory in physical RAM while storing the less active memory pages in the paging file. The process of moving pages from RAM to paging file and from paging file to RAM takes place as a background task unknown to the executing thread or operating user. However, you see a reduction in performance when the VMM pulls a page from the paging file. A page fault occurs when a process or thread requests a memory page that is not currently located in active memory.

If the page exists somewhere else in physical RAM, it is moved to the correct location very quickly. This is called a soft page fault because it has little effect on performance — moving a page from one location in RAM to another is a nearly instantaneous process. However, if the page exists in the paging file, it must be moved into physical RAM from the hard drive. This involves creating space within physical RAM by saving pages to the paging file, then loading the needed pages from the paging file to RAM. This is called a hard page fault because it has significant impact on system performance. The VMM is responsible for managing pages; it attempts to keep frequently accessed memory pages in RAM so hard page faults are kept to a minimum.

NT can map multiple 4-GB address spaces to a single 4-GB maximum physical memory resource because the address space used by each virtual machine does not use every page within its space. In the address space, 2 GB is reserved for use by the core system itself, with the remaining 2 GB reserved for use by the application.

Note: NT Server Enterprise allows for an adjustment of this split so that the core uses only 1 GB, making 3 GB available to the process.

Most applications use less than 5 MB of memory for their own purposes and rarely do applications use memory to store data. Thus, more than 90 percent of the memory pages within a single virtual machine are unused. Multiple virtual machine memory address spaces can consume (via reference mapping) all available memory. However, the system issues a warning when it determines that the remaining available memory is too low. The warning clearly states that you must either shut down active processes or increase the size of the paging file to prevent data loss or system failure. (You can also alleviate this problem by adding more physical RAM, but because that option requires the purchase of additional hardware, it is not part of the warning message.)

Tip: When you install RAM and determine the amount of RAM your system requires, a good rule of thumb is to install enough RAM so that the foreground application does not get paged while it is operating.

In most cases 128 to 256 MB of RAM is sufficient, but for those applications that manipulate data in memory rather than on storage devices, you may not be able to add enough physical RAM to prevent paging of the foreground application. You can determine whether an application is being paged by watching the appropriate process instance of the Process: Page Faults/sec, Page File Bytes, and Page File Bytes Peak counters.

Details about configuring the paging file and modifying NT’s memory system are covered in various chapters. I discuss how to track memory performance, how to determine whether there is a bottleneck, and what steps you can take to remedy or reduce the performance impact of a memory shortage.

NT and Mass Storage


NT treats all storage devices as if they were virtual RAM resources. This lets virtual machines issue resource requests using the same interface, communications methods, and system connections that are already present for memory management. Using the RAM resource model, storage device access is homogenized and isolated from the virtual machines. All access to storage devices is managed by the I/O Manager from the kernel’s Executive Services. The I/O Manager is responsible for understanding all the communications requirements for interacting with each storage device. Most local storage devices are accessed using either a generic controller card and interface driver or a manufacturer- or model-specific driver. Resources located over the network are accessed through a similar, but extended method that uses redirectors to forward the resource request on to the host system.

In addition to memory, NT’s storage or disk subsystem can significantly affect system performance. Essentially, the type and number of disk controllers (and subsequently the number of physical drives) determine the storage system’s responsiveness. Multiple disk controllers offer a higher rate of throughput by separating high-access disk devices, so each disk controller hosts a minimum number of busy disk drives. The type of controller and drive has a significant impact as well, as indicated in the following list:
  • IDE controllers have a data throughput of » 2.5 Mbps.
  • Standard SCSI controllers have a data throughput of » 3 Mbps.
  • SCSI-2 controllers have a data throughput of » 5 Mbps.
  • Fast SCSI-2 controllers have a data throughput of » 10 Mbps.
  • EIDE controllers have a data throughput of » 11 Mbps to 16 Mbps.
  • DMA controllers have a data throughput of » 16 Mbps.
  • Fast Wide SCSI, Ultra SCSI controllers have a data throughput of » 20 Mbps.
  • UltraDMA controllers have a data throughput of » 33 Mbps.
  • Wide Ultra SCSI and Ultra2 SCSI controllers have a data throughput of » 40 Mbps.
  • Wide Ultra2 SCSI controllers have a data throughput of » 80 Mbps.
Other important hardware performance considerations include the following:
  • Bus mastering — Controllers with bus mastering capabilities have an onboard processing chip that manages all interrupts related to data location and transfer; this releases the CPU from dealing with disk-related activity.
  • Controller cache — Cache on the drive controller can speed reads and writes by offloading the slow access time from the CPU or RAM to the controller itself.
Note: Volumes of less than 15 MB use 12-bit FAT; all others use 16-bit FAT (Table B.1).

Software RAID vs. Hardware RAID


NT offers native support for software-based redundant arrays of inexpensive disks (RAID). RAID is a drive configuration that uses multiple drives to provide higher speed and greater data protection than a single drive. NT can combine multiple independent drives into a RAID configuration through its disk subsystem components. In other words, NT performs all of the complicated disk read and write activities necessary to create RAID sets. This is known as software-based RAID. It has the advantage of being cheap, because it is built into Windows NT. However, it is minimally useful as a performance improvement tactic. NT provides RAID from software by using the CPU and other system resources to process disk reads and writes. For systems with minimal disk access, performance is improved; however, for systems with significant disk access, performance is severely degraded.

Hardware RAID devices are specialty drive devices that host multiple drives external to the computer system. Hardware RAID devices manage all of the disk reads and writes independent of the operating system. This provides several benefits, including true high-performance disk access. Hardware RAID does not tax the CPU or other system resources because a hardware RAID device requires no more processing power than a standard disk drive. In fact, the OS is typically unaware that the disk device is RAID hardware. The only drawback to hardware RAID is the cost. A RAID device typically costs two to ten times as much as a comparable non-RAID drive (or set of drives).




Page: 1, 2

next page

Rate this:
Recent Comments
There are currently no comments. Be the first to make a comment.