This post provides a summary of performance tuning options for a Windows Server 2003 file server. Included is information on NTFS, lanmanserver, NIC, Disk and HBA performance tuning options. None should be used in a production environment without testing. Note that the Microsoft excerpts come from a 2008 performance tuning document, after verifying that the options are supported on 2003. The default is 0. This parameter determines whether NTFS generates a short name Changing this value does not change the contents of a file, but it avoids the short-name attribute Note that when accessing files that go beyond the 260 MAX_PATH length, short filenames can be a very useful method of accessing these files.
General Performance Settings
Disable 8.3 name creation
HKLM\System\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation
Excerpt from Microsoft on this option:
in the 8.3 (MS DOS®) naming convention for long file names and for file names
that contain characters from the extended character set. If the value of this
entry is 0, files can have two names: the name that the user specifies and the
short name that NTFS generates. If the user-specified name conforms to the 8.3
naming convention, NTFS does not generate a short name.
creation for the file, also changing the way NTFS displays and manages the file.
For most file servers, the recommended setting is 1.
Ignore Write Flush Commands from Clients
HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters\TreatHostAsStableStorage
Excerpt from Microsoft on this option: The default is 0. This parameter disables the processing of write flush commands
Network tuning
from clients. If the value of this entry is 1, the server performance and client
latency for power-protected servers can improve. Workloads similar to the
NetBench file server benchmark benefit from this behavior.
NIC Offloading
Newer NICs have offloading capabilities, allowing the Operating System to offload one or more tasks to the network adapter. For example, Broadcom BCM5708S NetXtreme II adapters have the following offload capability enabled:
• IPv4 Checksum offload – Calculation and validation of checksums on TX/RX of TCP and UDP packets
• IPv4 Large Send offload – Offload the segmentation of large packets to the hardware
TcpWindowSize
HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\TcpWindowSize
Windows Server 2003 auto-tunes this setting, and benefits to manually choosing a window size are acknowledged in high-latency networks.
NumTcbTablePartitions
HKLM\system\CurrentControlSet\Services\Tcpip\Parameters\NumTcbTablePartitions
Increasing this number from the default of 1 can decrease contention in the TCP/IP stack. Microsoft warns of modifying this setting without significant testing, with a recommended maximum of the number of processors in the system.
MaxFreeTcbs and MaxHashTableSize
HKLM\system\CurrentControlSet\Services\Tcpip\Parameters\MaxFreeTcbs
HKLM\system\CurrentControlSet\Services\Tcpip\Parameters\MaxHashTableSize
MaxFreeTcbs can be adjusted manually to set the maximum number of TCP control blocks the system creates. This number determines the simultaneous number of connections the server can handle. If MaxFreeTcbs is changed, MaxHashTableSize should also be modified, dictating the size of the hash table that stores the control blocks.
Disk Tuning
LargeSystemCache and LanManServer file system caching
The amount of memory allocated to file system caching can help to increase the disk cache hits for a file server. In Windows Server 2003 this setting is enabled by default, although a casual glance of the system working set and the lanmanserver service working set do not show a large amount of the available physical memory for cache.
Windows 2003 also has logical block caching in addition to caching at the file system level. Further information could not be found on configuring or measuring the performance of logical block level caching.
The file cache is part of the system working set, which is protected from excessive trimming when the LargesystemCache option is usedThe lanmanserver service working set must also be protect in some way, part of services.exe (use tasklist /svc).
CacheSet from sysinternals can be used to modify the system working set size
Excerpt from Microsoft TechNet:The Memory object performance counter System Cache Resident Bytes reports the amount of real memory currently in use by the file cache. As the number of System Cache Resident Bytes increases, we normally expect that the various measures of hit ratio will also increase. Moreover, the cache size can grow simply as a function of the size of the files that are currently in use and their pattern of access.
The Cache Resident Bytes counter reports the amount of real memory the file cache is currently occupying. The Cache Bytes counter, which sounds like it might tell you the size of the cache, actually reports the full system working
Disk Alignment
set, which includes Cache Resident Bytes and several other real memory areas. In a Windows 2000 file server (remembering Windows 2000's heritage as the follow-on to the joint IBM/ Microsoft-developed OS2 LAN Manager), the file cache so dominates the system working set that internal documentation frequently refers to the entire system working set as the cache. This usage carries over to tools like Task Manager, which labels the system working set as the System Cache in the Performance tab, illustrated in Figure 7-2. The Windows NT version of Task Manager called this field File Cache, which is probably just as misleading. Curiously, the number of bytes in the System Cache reported by Task Manager does
not correspond exactly to the Cache Bytes counter in the System Monitor.
Using disk alignment to realign partitions can occasionally decrease the number of disk I/O operations. This occurs because the MBR is on the first 63 sectors of a disk, and the first partition starts on the 64th sector instead of the 65th sector – the beginning of the next boundary. This is vendor and disk specific, and does not apply to every disk.
Excerpt from Microsoft TechNet:Microsoft Windows 2000 Server has an internal structure known as the master boot
Write-caching option on each disk
record (MBR) that limits the maximum number of hidden sectors to 63. This
characteristic of the MBR causes the default starting sector for disks that
report more than 63 sectors per track to be the 64th sector. Therefore, when
programs transfer data to or from disks that have more than 63 sectors per
track, misalignment can occur at the track level, with allocations starting at a
sector other than the starting sector. This misalignment can defeat system
optimizations of I/O operations that are designed to avoid crossing track
boundaries.
Diskpar.exe is a command-line tool from the Windows 2000
Server Resource Kit that can explicitly set the starting offset in the MBR. By
doing this, the track is aligned with the physical disk partition, which results
in an improvement in disk performance. Exchange writes four kilobytes to the
database and up to 32 kilobytes for the streaming data. Therefore, make sure
that you set the starting offset to be a multiple of four kilobytes.
Excerpt from Microsoft on this option:Enabling write caching allows writes to be completed immediately after being
This option is enabled by default on all SAN-attached storage
cached in the storage subsystem. Note that with this action a period of time
passes during which a power failure or other catastrophic event could result in
a loss of the data. However, this period is typically fairly short because write
caches in the storage subsystem are usually flushed during any period of idle
activity. Alternately, you can use time-outs at the cache level to force dirty
data out of the cache even if other active requests exist.
‘Advanced Performance’ option on each disk.
Excerpt from Microsoft on this option:The advanced performance option strips all write-through flags from disk
This option is disabled by default on all SAN-attached storage.
requests and also removes all flush-cache commands. The assumption is that if
you have power protection on your I/O path you don’t need to worry about those
two pieces of functionality; by definition, any written data is safe and
"in-order" after it is copied into power-protected storage subsystem hardware,
just as if it had been written to the physical disk media.
Emulex Lightpulse scatter/gather list elements
"HKLM\System\CurrentControlSet\Services\lp6nds35"
Add (if not already present) the following Keys under lpxnds
Parameters->Device (Parameters apply to ALL LPxxx adapters)
or
->Devicen (Parameters apply to LPxxx adapter number 'n' 0-99)
Under Device or Devicen add a value of "MaximumSGList" Type REG_DWORD,
with a value of from 13 to 255 (decimal). Microsoft specifies to use
this value sparingly, as these request entries come from Non-Page-Pool.
Emulex Lightpulse asynchronous requests
"HKLM\System\CurrentControlSet\Services\lp6nds35"
Add (if not already present) the following Keys under lpxnds
Parameters->Device (Parameters apply to ALL LPxxx adapters)
or
->Devicen (Parameters apply to LPxxx adapter number 'n' 0-99)
Under Device or Devicen add a value of "NumberOfRequests" Type REG_DWORD,
with a value of from 16 to 256 (decimal). Microsoft specifies to use
this value sparingly, as these request entries come from Non-Page-Pool
(this is especially true with the ALPHA systems).
References:
Windows Server 2008 performance tuning
http://download.microsoft.com/download/9/c/5/9c5b2167-8017-4bae-9fde-d599bac8184a/Perf-tun-srv.docx
How To Improve Windows 2003 File Server Performance
http://support.microsoft.com/kb/555041
CacheSet
http://technet.microsoft.com/en-au/sysinternals/bb897561.aspx
How to Configure the Storage Subsystem
http://technet.microsoft.com/en-us/library/bb643100.aspx
Examining and Tuning Disk Performance
http://www.microsoft.com/technet/prodtechnol/Windows2000Pro/reskit/part6/proch30.mspx?mfr=true
Aligning Disk Partitions by Using Diskpar.exe
http://technet.microsoft.com/en-us/library/bb643097.aspx
PagedPoolSize
http://technet2.microsoft.com/windowsserver/en/library/b1bda681-28b0-4339-a4ea-feb0fd9ff0c01033.mspx?mfr=true
Optimizing Your Memory Configuration
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/core/fnec_evl_fhcj.mspx?mfr=true
About Cache Manager in Windows Server 2003
http://support.microsoft.com/kb/837331
MaxPagedMemoryUsage for the server sevice
http://technet2.microsoft.com/WindowsServer/en/Library/357c7af1-7a0b-47a5-8af1-ff44756c498a1033.mspx
MaxPagedMemoryUsage for the server sevice
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/regentry/58636.mspx?mfr=true
LargeSystemCache
http://technet2.microsoft.com/WindowsServer/en/library/efa621bd-a031-4461-9e72-59197a7507b61033.mspx
Optimizing Your Memory Configuration
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/core/fnec_evl_fhcj.mspx?mfr=true
File Cache Performance and Tuning
http://technet.microsoft.com/en-us/library/bb742613.aspx
Cluster resource command-line operation
http://technet2.microsoft.com/windowsserver/en/library/f6b35982-b355-4b55-8d7f-33127ded5d371033.mspx
File Cache Performance and Tuning
http://technet.microsoft.com/en-us/library/bb742613.aspx
About Cache Manager in Windows Server 2003
http://support.microsoft.com/kb/837331
How to Configure the Storage Subsystem
http://technet.microsoft.com/en-us/library/bb643100.aspx
Why should you use Diskpar
http://msexchangeteam.com/archive/2005/08/10/408950.aspx
Emulex Lightpulse HBA device settings
http://contents.driverguide.com/content.php?id=106500&path=README.TXT
Wayne's World of IT (WWoIT), Copyright 2008 Wayne Martin.
Information regarding Windows Infrastructure, centred mostly around commandline automation and other useful bits of information.
1 comment:
Nice Blog Post !
Post a Comment