home technical personal links weddings

General Tech

MapInfo / GIS

Oracle / Database

Misc / Useless


Windows 2000/XP Information

Hotkeys
Command Window Hotkeys
DOS PROMPT notes
Customization Steps
Other Customization Steps
Extra Utilities
Other Information
Registry Information
Internet Information Server (IIS) 5
Indexing Service
Performance Tuning
Recommended tuning for file server hardware
Server Subsystem Small Business Configuration Enterprise
Configuration
Processors (CPUs) · Using CPUs with larger L2 cache has a positive impact on performance. · Using CPUs with larger L2 cache has a positive impact on performance.
· Use the interrupt-affinity filter to assign interrupts from each network adapter to different CPUs.
Network · Set network adapter receive buffers for optimal performance.
· Balance client I/O among network adapters.
· Use network adapters that support the TCP checksum offloading features in Windows 2000.
· Put the RAID controller in the fastest bus slot available, ideally a bus without network adapters or other controllers that generate many interrupts.
· Set cache memory: as large as possible.
· Set cache write policy: write back.
· Set cache read policy: read ahead.
· Set tripe size: 8 KB/16 KB for RAID 5 and 64 KB/128 KB or the maximum supported for RAID 0; the optimal size may vary by controller.
· Use multiple logical NTFS partitions. This can be set up using the RAID configuration software or logical disk manager in Windows 2000.
· Use 16 KB allocation size for formatting the NTFS volumes (format <drive>: /fs:ntfs /A:16K).
· Increase the NTFS log file size to 64 MB for large volumes (chkdsk /L:65536).
Data · Distribute access to data on the server across multiple network segments if applicable.
· Distribute your data as evenly as possible across multiple data volumes.


Recommended tuning for Web server hardware
Server Component Small Business
Web Server
Enterprise
Web Server
CPU · Using CPUs with larger L2 cache has a positive impact on performance. · Using CPUs with larger L2 cache has a positive impact on performance.
· Use the interrupt-affinity filter to assign interrupts from each network adapter to two CPUs.
Network · Set network adapter receive buffers for optimal performance (see Appendix 4: Tuning for Gigabit Adapters for values by type of gigabit network adapter).
· Balance client I/O among network adapters.
· Enable TCP checksum offloading support if network adapters support it.
RAID/Disk · Put the RAID controller in the fastest bus slot available, ideally a bus without network adapters or other controllers that generate many interrupts.
· Set cache memory: as large as possible.
· Set cache write policy: write back.
· Set cache read policy: read ahead.
· Set stripe size: 8 KB/16 KB for RAID 5 and 64 KB/128 KB or the maximum supported for RAID 0; the optimal size may vary by controller.
· Use multiple logical NTFS partitions. This can be set up using the RAID configuration software or logical disk manager in Windows 2000.
· Use 16 KB allocation size for formatting the NTFS volumes (format <drive>: /fs:ntfs /A:16K).
· Increase the NTFS log file size to 64 MB for large volumes (chkdsk /L:65536).
· If using separate SCSI disks, format them with an NTFS file system with a 16 KB allocation size.
Windows 2000 · Set as an application server (My Computer-->Properties-->Advanced-->Performance Options - optimize performance for applications and under My Network Places-->File and Printer Sharing for Microsoft Networks-->Property).
· Set Internet Information Services (IIS) performance for 100,000+ hits per day.
· Tune the registry (see below).
· Remove script and script/execute permission on directories containing only static data. Keep these permissions on directories with ISAPI, ASP, and CGI programs.
· Set Application Protection to Low (IIS Process) on directories with ISAPI, ASP, and CGI programs.
· Turn off Index This Resource property for the Web site.
· Put the log file on a disk other than the one with the Web site files.


Web Server Registry Parameters

in HKLM\System\CurrentControlSet\Services\InetInfo\Parameters
Recommended tuning for Web server software.


Networking Performance

Performance Metric Gathering
Performance Counters (basic system bottlenecks for any type of server)
Potential Bottleneck Performance Counter Definition
Memory Memory\ Available Bytes The amount of physical memory in bytes available to processes running on the computer. This counter displays the last observed value only; it is not an average.
Memory\ Cache Bytes The number of bytes currently being used by the file system cache (default to use 50% of available memory up to 900MB). The file system cache is an area of physical memory that stores recently used pages of data for applications. Windows 2000 continually adjusts the size of the cache, making it as large as it can while still preserving the minimum required number of available bytes for processes. This counter displays the last observed value only; it is not an average. IIS automatically trims cache if it is running out of memory (use with Process: Private Bytes to isolate application memory leaks).
Memory\ Page Faults/sec The overall rate-faulted pages are handled by the processor. It is measured in numbers of pages faulted per second. A page fault occurs when a process requires code or data that is not in its working set (its space in physical memory). This counter includes both hard faults (those that require disk access) and soft faults (where the faulted page is found elsewhere in physical memory). Most processors can handle large numbers of soft faults without consequence. However, hard faults can cause significant delays. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval. A sustained high number may indicate need to increase physical memory on server.
Memory\ Pages/sec The number of pages read from or written to disk to resolve hard page faults. (Hard page faults occur when a process requires code or data that is not in its working set or elsewhere in physical memory, and must be retrieved from disk). This counter serves as a primary indicator of the kinds of faults that cause system-wide delays.
Cache\ Data Maps/sec The frequency that a file system such as NTFS maps a page of a file into the file system cache to read the page.
Network
(Capture for each network adapter instance. You must install the Network Monitor Driver in order to collect performance data using the Network Segment object counters.)
Network Interface\ Bytes Total/sec The rate at which bytes are sent and received on the interface, including framing characters. Compare to the total bandwidth of network adapter card (should be using no more than 50% of capacity). If number is close to capacity and processor and memory use are moderate then connection may be the problem.
Network Interface\ Bytes Sent/sec The rate at which bytes are sent on the interface, including framing characters.
Network Interface\ Bytes Received/sec The rate at which bytes are received on the interface, including framing characters.
Network Segment\ % Network Utilization Percentage of network bandwidth in use on a network segment.
Disk PhysicalDisk\ % Disk Time The percentage of elapsed time that the selected disk drive is busy servicing read or write requests. If over 90% check Physical Disk: Current Queue Length to see how many request are waiting for disk access. Number of I/O requests sustained should be no more than 1.5 to 2 times the number of spindles making up the physical disk (mostly 1 except got RAID devices - also on RAID % Disk Time value can sometimes be greater than 100% - if so use Physical Disk: Average Disk Queue Length). Can monitor for each physcal drive or use _Total instance to monito all drives.
PhysicalDisk\ % Idle Time Reports the percentage of time during the sample interval that the disk was idle.
PhysicalDisk\ Disk Reads/sec The rate of read operations on the disk.
PhysicalDisk\ Disk Writes/sec The rate of write operations on the disk.
PhysicalDisk\ Avg. Disk Queue Length The average number of both read and write requests that were queued for the selected disk during the sample interval.
CPU Processor\ % Processor Time
(Use the _Total instance to track performance of all processors in a multiprocessor system.)
The percentage of time that the processor is executing a non-idle thread. This counter was designed as a primary indicator of processor activity. It is calculated by measuring the time that the processor spends executing the thread of the idle process in each sample interval, and subtracting that value from 100 percent. (Each processor has an idle thread, which consumes cycles when no other threads are ready to run.) It can be viewed as the percentage of the sample interval spent doing useful work. If Processor Time numbers are high and the NIC and disk I/O numbers are well below capacity, you're experiencing a CPU bottleneck. On a multiprocessor computer, recommend that monitor the Processor: % Processor Time counter to determine whether the system is imbalanced.
Processor\ Interrupts/sec The average number of hardware interrupts the processor is receiving and servicing in each second. It does not include deferred procedure calls (DPCs), which are counted separately. This value is an indirect indicator of the activity of devices that generate interrupts, such as the system clock, the mouse, disk drivers, data communication lines, network interface cards, and other peripheral devices. These devices normally interrupt the processor when they have completed a task or require attention. Normal thread execution is suspended during interrupts. Most system clocks interrupt the processor every 10 milliseconds, creating a background of interrupt activity. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval. Can use these Performance Monitor counters to determine how much time the processor spends on interrupts and deferred procedure calls (DPCs). Both interrupts and DPCs can be huge sources of load on your servers' CPUs. Client requests can drive these problems. Some new NICs include interrupt moderation, which accumulates interrupts in a buffer when the level of interrupts becomes too high. Interrupt moderation alleviates the interrupt problem, but you won't find this feature on most network boards that have been in production a while.
System\ Processor Queue Length The number of threads waiting to be executed in the processor queue. There is a single queue for processor time even on computers with multiple processors. Unlike the disk counters, this counter counts ready threads only, not threads that are running. A sustained processor queue of greater than two threads generally indicates processor congestion (bottleneck). The problem could be a renegade component or a poorly written application, but it might just be that your system is overloaded. This counter displays the last observed value only; it is not an average.
System\ % Privileged Time
(Use the _Total instance to track performance of all processors in a multiprocessor system.)
The percentage of non-idle processor time spent in privileged mode. (Privileged mode is a processing mode designed for operating system components and hardware-manipulating drivers. It allows direct access to hardware and all memory. The alternative, user mode, is a restricted processing mode designed for applications, environment subsystems, and integral subsystems. The operating system switches application threads to privileged mode to access operating system services.) % Privileged Time includes time servicing interrupts and DPCs. A high rate of privileged time might be attributable to a large number of interrupts generated by a failing device. This counter displays the average busy time as a percentage of the sample time.
System\ % User Time
(Use the _Total instance to track performance of all processors in a multiprocessor system.)
The percentage of non-idle processor time spent in user mode. (User mode is a restricted processing mode designed for applications, environment subsystems, and integral subsystems. The alternative, privileged mode, is designed for operating system components and allows direct access to hardware and all memory. The operating system switches application threads to privileged mode to access operating system services.) This counter displays the average busy time as a percentage of the sample time.
System\ System Calls/sec The combined rate of calls to Windows 2000 system service routines by all processes running on the computer. These routines perform all of the basic scheduling and synchronization of activities on the computer, and provide access to non-graphic devices, memory management, and name space management. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
System Context Switches/sec The combined rate at which all processors on the computer are switched from one thread to another. Context switches occur when a running thread voluntarily relinquishes the processor, is preempted by a higher priority ready thread, or switches between user-mode and privileged (kernel) mode to use an Executive or subsystem service. It is the sum of Thread: Context Switches/sec for all threads running on all processors in the computer and is measured in numbers of switches. There are context switch counters on the System and Thread objects. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.


Performance Counters (web server specific)
Performance Object Performance Counter Definition
Process (Inetinfo instance) Private Bytes The current amount of memory allocated that cannot be shared with other processes. If allocate more memory without relaseing back to system over extended period of time then can show memory leak. If isolation level for application if low then monitor Inetinfo process, if medium or high then monitor appropriate DLLHost processes.
% Processor Time The percentage of elapsed time that all of the threads of this process used the processor to execute instructions. An instruction is the basic unit of execution in a computer; a thread is the object that executes instructions; and a process is the object created when a program is run. Code executed to handle some hardware interrupts and trap conditions are included in this count. On multi-processor machines the maximum value of the counter is the number of processors multiplied by 100 percent.
% Privileged Time The percentage of elapsed time that the threads of the process have spent executing code in privileged mode. When a Windows 2000 system service is called, the service will often run in privileged mode to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system can be explicit or implicit, such as page faults or interrupts. Unlike some early operating systems, Windows 2000 uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows 2000 on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process.
% User Time The percentage of elapsed time that the threads of the process have spent executing code in user mode. Applications, environment subsystems, and integral subsystems execute in user mode. Executing code in user mode cannot damage the integrity of the Windows NT Executive, Kernel, and device drivers. Unlike some early operating systems, Windows 2000 uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows 2000 on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process.
Thread Count The number of threads currently active in the process. An instruction is the basic unit of execution in a processor, and a thread is the object that executes instructions. Every running process has at least one thread.
Page File Bytes The current number of bytes the process has used in the paging file(s). Paging files are used to store pages of memory used by the process that are not contained in other files. Paging files are shared by all processes, and lack of space in paging files can prevent other processes from allocating memory.
Web Service ISAPI Extension Requests/sec
(if using ISAPI extensions)
Rate of ISAPI Extension requests that are simultaneously being processed by the Web service. If values decrease as load increases then application code may have to be fixed.
CGI Requests/sec
(if using CGI programs)
Rate of CGI requests that are simultaneously being processed by the Web service.
Get Requests/sec or Post Requests/sec Rate at which HTTP requests using the GET or POST method are made. Get requests are generally used for basic file retrievals or image maps, though they can be used with forms. These counters are important to underastand general load characteristics of site.
Bytes Total/sec The sum of Bytes Sent/sec and Bytes Received/sec. This is the total rate of bytes transferred by the Web service.
Active Server Pages
(only if you use ASP programs)
Requests Executing Number of requests currently executing. If just 1 requests are being serialized for some unknown reason (like if App Debugging is on through Internet Services Manager for the Virtual Directory).
Requests Queued Number of requests waiting for service from the queue (ideally 0). If continiously increases ASPs are blocking threads, if fluctuates considerably while processor utilization is low then script is calling COM object receiving more calls then it can handle (may then be necessary to increase ASPProcessorThreadMax metabase entry, default 25 max 100, which specifies maximum number of worker threads per processor that IIS creates, example: adsutil.vbs set w3svc/AspProcessorThreadMax <NewValue>).
Sessions Total Total number of sessions since the web service was started.
Requests/sec The number of requests executed per second.
Internet Information Services Global Current Files Cached Current number of files whose content is in the cache for World Wide Web (WWW) and File Transfer Protocol (FTP) services.
File Cache Hits % The ratio of file cache hits to total cache requests. A file cache hit is a successful lookup in the system's file cache.


Performance Counters (file server specific)
Performance Object Performance Counter Definition
Server Bytes Transmitted/sec The number of bytes the server has sent on the network. Indicates how busy the server is.
Bytes Received/sec The number of bytes the server has received from the network. Indicates how busy the server is.
System File Control Operations/sec The combined rate of file system operations that are neither read operations nor write operations, such as file system control requests and requests for information about device characteristics or status. This is the inverse of System: File Data Operations/sec and is measured in number of operations per second. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.
Server Work Queues Queue Length The current length of the server work queue for the CPU. A sustained queue length greater than four might indicate processor congestion. This is an instantaneous count, not an average over time.
Memory Transition Faults/sec Transition Faults/sec is the number of page faults resolved by recovering pages that were on the modified page list, on the standby list, or being written to disk at the time of the page fault. The pages were recovered without additional disk activity. Transition faults are counted in numbers of faults, without regard for the number of pages faulted in each operation. This counter displays the difference between the values observed in the last two samples, divided by the duration of the sample interval.


check for the following in order when tuning a server
  1. CPU bottlenecks
  2. Memory bottlenecks
  3. Disk bottlenecks
  4. Network bottlenecks


Performance Counter Thresholds (CPU bottlenecks)
Resource Object\ Counter Suggested Threshold Comments
Processor Processor\ % Processor Time 95% (for web servers should be around 70%) Upgrade to a processor with a larger L2 cache, a faster processor, or install an additional processor.
Processor Processor\ Interrupts/sec Depends on processor. A dramatic increase in this counter value without a corresponding increase in system activity indicates a hardware problem. Identify the network adapter causing the interrupts. Use the affinity tool to balance interrupts in a multiprocessor system.
Processor Processor\ % Interrupt Time Depends on processor. An indirect indicator of the activity of disk drivers, network adapters, and other devices that generate interrupts.
Server Server Work Queues\ Queue Length 4 Tracks the current length of the server work queue for the computer. If the value reaches this threshold, there may be a processor bottleneck. This is an instantaneous counter; observe its value over several intervals.
Multiple Processors System\ Processor Queue Length 2 This is an instantaneous counter; observe its value over several intervals. A queue of two or more items indicates a bottleneck. If more than a few program processes are contending for most of the processor's time, installing a faster processor or one with a larger L2 cache will improve throughput. An additional processor can help if you are running multithreaded processes, but be aware that scaling to additional processors may have limited benefits.


Performance Counter Thresholds (Memory bottlenecks)
Resource Object\ Counter Suggested Threshold Comments
Memory Memory\ Available Bytes Less than 4 MB (triggers event 26 in system event log), reserve 10% of memory for peak load Research memory usage and add memory if needed.
Memory Memory\ Pages/sec 20 Research paging activity.
Server Server\ Pool Paged Peak Amount of physical RAM This value is an indicator of the maximum paging file size and the amount of physical memory.


Performance Counter Thresholds (Disk bottlenecks)
Resource Object\ Counter Suggested Threshold Comments
Disk PhysicalDisk\ % Disk Time 90% Add more disk drives and partition the files among all of the drives.
Disk PhysicalDisk\ Disk Reads/sec, PhysicalDisk\ Disk Writes/sec Depends on manufacturer's specifications Check the specified transfer rate for your disks to verify that this rate doesn't exceed the specifications. In general, Ultra Wide SCSI disks can handle 50 I/O operations per second.
Disk Physical Disk\ Current Disk Queue Length Number of spindles plus 2 This is an instantaneous counter; observe its value over several intervals. For an average over time, use Physical Disk\ Avg. Disk Queue Length.


Performance Counter Thresholds (Network bottlenecks)
Resource Object\ Counter Suggested Threshold Comments
Network Segment Network Segment\ % Net Utilization Depends on type of network For full-duplex, switched Ethernet networks, for example, 80 percent can indicate a bottleneck.
Network Segment Network Segment\ Broadcast frames received
/second
Depends on network Can be used to establish a baseline if monitored over time. Large variations from the baseline can be investigated to determine the cause of the problem. Because each computer processes every broadcast, high broadcast levels mean lower performance.
Network Segment Network Segment\ % Network utilization Depends on network Indicates how close the network is to full capacity. The threshold depends on your network infrastructure and topology. If the value of the counter is above 30 to 40 percent, collisions can cause problems.
Network Segment Network Segment\ Total frames received
/second
Depends on network Indicates when bridges and routers might be flooded.
Processor Processor\ Interrupts/sec Depends on processor A dramatic increase in this counter value without a corresponding increase in system activity indicates a hardware problem. Identify the network adapter causing the interrupts. Use the affinity tool to balance interrupts in a multiprocessor system.
Server Server\ Work Item Shortages 3 If the value reaches this threshold, consider tuning InitWorkItems or MaxWorkItems in the registry (under HKEY_LOCAL_MACHINE \SYS
TEM\CurrentControlSet\Services
\LanmanServer
).
Server Server\ Bytes Total/sec If the sum of Bytes Total/sec is roughly equal to the maximum transfer rates of your network, you may need to segment the network.


for questions/comments: kgmahoney@yahoo.com   © 2001-2017 kmahoney.com