Windows Server Tuning Parameters
- Know what /3GB parameter means?
- Do you only see 4GB RAM while you actually have 8GB?
- TCP tuned for optimal network throughput under load?
Windows Kernel Network Disk
I/O Disable
Services Not In Need
Windows Kernel
User-mode vs. Kernel Memory
By default Windows 2003 server kernel run in a 2GB memory space. For a
Windows server that is dedicated to a particular application, 2GB kernel maybe
too large. It is certainly feasible to reduce it to 1GB and leave more
physical memory for your application(s).
Microsoft Windows provides a
/3GB parameter
to be added to the BOOT.INI file
that reallocates 3 GB of memory to be available for user-mode applications and
reduces the amount of memory for the system kernel to 1 GB. Many enterprise
databases, such as DB2 and Oracle, can derive performance benefits from having
large amounts of addressable memory available for creating agent processes that
handle a large number of concurrent database connections.
To edit the BOOT.INI file to make this change, complete the following steps:
1. Open the System Control Panel.
2. Select the Advanced tab.
3. In the Startup and Recovery frame, click the Settings button.
4. Click Edit. Notepad opens to edit the current BOOT.INI file.
5. Edit the current ARC path to include the /3GB switch in the same line that
has /fastdetect.
6. Restart the server for the change to take affect.
Physical Address Extension (PAE)
The native 32-bit architecture of the x86 processor allows a maximum
addressable memory space of 4 GB (2^32). The Intel Physical Address Extension (PAE)
is a 36-bit memory addressing mode that allows 32-bit systems to address memory
above 4 GB. PAE requires appropriate hardware and operating system support to be
implemented. Intel introduced PAE 36-bit physical addressing with the Intel
PentiumŪ Pro processor. Windows supported PAE since Windows NT Server 4.0
Enterprise Edition, and it is supported with the Advanced and Datacenter
Editions of Windows Specify "/PAE" in boot.ini to allow full use of 8GB physical
RAM.
To edit the BOOT.INI file to make this change, complete the following steps:
1. Open the System Control Panel.
2. Select the Advanced tab.
3. In the Startup and Recovery frame, click the Settings button.
4. Click Edit. Notepad opens to edit the current BOOT.INI file.
5. Edit the current ARC path to include the /PAE switch in the same line that
has /fastdetect.
6. Restart the server for the change to take affect.
NetworkGigabit-based
network interfaces have many performance-related parameters inside of their
device driver such as CPU affinity. In addition, the TCP protocol can be tuned to
increase network throughput for connection-hungry applications. For
Windows servers, use the both the network adapter properties and Windows
registry to update the TCP layer parameters. If your environment is uniformly
Windows platform, make sure all these parameters are set to the same values
across all your servers:
Tune TCP
|
Registry Entry
Parameter=Value
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters
TcpTimedWaitDelay= 30 (decimal)
MaxUserPort=
32768 (dec)
KeepAliveInterval=
1 (dec)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
TcpAckFrequency= 1
Tcpip\Parameters\Interfaces\ID
TcpMaxDataretranmissions=
5 (dec)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters
"EnableDynamicBacklog"=dword:00000001
"MinimumDynamicBacklog"=dword:00000020
"MaximumDynamicBacklog"=dword:00001000
"DynamicBacklogGrowthDelta"=dword:00000010 |
For how to update registry settings, refer to
Microsoft URL:http://www.microsoft.com/technet/scriptcenter/guide/sas_reg_fzit.mspx.
The description of the tuned TCP parameters is as
follows:
TcpTimedWaitDelay Determines the
time (in seconds) that must elapse before TCP/IP can release a closed connection
and reuse its resources. This interval between closure and release is known as
the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During
this time, reopening the connection to the client and server costs less than
establishing a new connection. By reducing the value of this entry, TCP/IP can
release closed connections faster and provide more resources for new
connections. Adjust this parameter if the running application requires rapid
release, the creation of new connections, or an adjustment because of a low
throughput caused by multiple connections in the TIME_WAIT state.
MaxUserPort Determines the highest port number that TCP/IP can assign
when an application requests an available user port from the system.
KeepAliveInterval Determines how often TCP repeats keep-alive
transmissions when no response is received.
TcpAckFrequency TCP/IP can be the
source of some significant remote method delays. You can increase TCP
performance by immediately acknowledging incoming TCP segments, in all
situations.
TcpMaxDataretranmissions Determines how many times TCP retransmits an
unacknowledged data segment on an existing connection.
MaxConnect Backlog If many connection attempts are received
simultaneously, increase the default number of pending connections that are
supported by the operating system. Set all four parameters according to the
table above, EnableDynamicBacklog, MinimumDynamicBacklog, MaximumDynamicBacklog,
and DynamicBacklogGrowthDelta.
Offloading Checksum
Network adapter (such as Broadcomm) that implements Network Driver Interface
Specification (NDIS) task offload allows offloading checksum calculation to the
network adapter hardware. Because checksum calculation is the most expensive
function in the networking stack, doing so offers a significant performance
advantage by reducing the number of system CPU cycles required per byte. Offload
as many tasks shown in your network adapter. The following screen shows an
example offloading task configured for our test system:
In addition, the property "Jumbo MTU" stands for the support of jumbo frames with a specified
Maximum Transmission Unit (MTU). Data (or files) being transport through your network cards
are broken into MTUs. If your MTU is small (default 1500), more packets will have to be processed,
therefore, under heavy load, cpu can be high, and throughput can decrease. If your application
deals with large files (500K+ bytes), it is always recommended to turn on the Jumbo MTU support
and set it to 9000. But note, you can set Jumbo MTU on your server to be 9k, but if your network
switch does NOT support jumbo frames, then you are still actully using MTU=1500 (the lower of
the two). So make sure you ask your network admin about the Jumbo Frames support on the network
switch that your server(s) connect to.
Disk I/O
Tune Disk Performance
Microsoft has a very good article on monitoring and tune disk I/O on Windows
server systems:
http://www.microsoft.com/technet/prodtechnol/Windows2000Pro/reskit/part6/proch30.mspx.
Some disk tuning suggestions from the article - "if your disk system is too
slow, consider the following alternative steps:
- Rule out a memory shortage. When memory is scarce, the Virtual Memory Manager
writes more pages to disk, resulting in increased disk activity. Because low
memory is a common cause of bottlenecks, make sure that this is not the source
of the problem before adding hardware. Also, make sure to set the paging file to
an appropriate size as described in "Evaluating Memory and Cache Usage" in this
book.
- Defragment the disk using Disk Defragmenter. For information about using Disk
Defragmenter, see Windows 2000 Help.
- Use Diskpar.exe on the Windows 2000 Resource Kit companion CD to reduce
performance loss due to misaligned disk tracks and sectors.
- Use striped volumes to process I/O requests concurrently over multiple disks.
The type you use depends on your data-integrity requirements. Implement striped
volumes for fast reading and writing and improved storage capacity. When striped
volumes are used, disk utilization per disk need to fall due to distribution of
work across the volumes and overall throughput need to increase. When using
striped volumes, make sure to use the optimal size of stripe for your workload.
The stripe size needs to be a multiple of the size of the average request. If
you find that there is no increased throughput when scaling to additional disks
in a striped volume, you might be experiencing a bottleneck due to contention
between disks for the disk adapter. You might need to add an adapter to better
distribute the load.
- Place multiple drives on separate I/O buses, particularly if a disk has an
I/O-intensive workload.
- Distribute workload among multiple drives. For example, for database
applications, you might want to put transaction logs on a separate spindle from
data. Notice that writing to a log file is a sequential operation and tends to
be more efficient than the random operations typical of accessing data in a
database. If you are unsure of a suitable distribution for network applications,
track users and the files they work with in order to plan an efficient
distribution by means of the auditing capability of the NTFS file system. This
tells you which disks are getting the most usage and helps you determine whether
you need to redistribute workloads. For more information about auditing, see
Windows 2000 Professional Help.
- Limit your use of file compression or encryption. These features can add some
overhead and you need to use them sparingly if not required by your enterprise
and if performance is critical.
- When obtaining disk systems, use the most intelligent and efficient components
available for your disk system, including controller, I/O bus, cabling, and the
disk. Upgrade to faster-speed or wider-bandwidth components as necessary. These
measures generally decrease transfer time and improve throughput. Use
intelligent drivers that support interrupt moderation or interrupt avoidance to
alleviate the interrupt activity for the processor due to disk I/O.
Some graphs can be used for the disk monitoring page for clarity.
Disable Unused
Services
When Windows is first installed, many services are enabled that may not be
necessary for a particular server. Inexperienced users may also inadvertently
add additional services that are not actually required for a given system. Each
service requires system resources and as a result it is best to disable
non-required services to improve performance. Some recommended services to
disable. Do the update in the Services panel: 1. Right-click My Computer
and select Manage. 2. Expand the Services and Applications icon. 3. Select the
Services icon.
|
Alerter
Application Management
Automatic Updates
Background Intelligent
Clipbook
Computer Browser
DHCP Server
Distributed file system
Distributed link tracking client
Distributed transaction coordinator
DNS Client
Error Reporting Service
Fax Service
File Replication
File Server for Macintosh
Help and Support
HTTP SSL
Infrared Monitor
Intersite messaging
License Logging
Logical Disk Manager
Message Queuing
Messenger
Portable Media Serial Number Service
Shell Hardware Detection
SNMP Service
Windows Audio
Wireless Configuration |
|