Vous êtes sur la page 1sur 39

Performance Tuning Guidelines for Windows Server 2003

Microsoft Corporation
Published: October 2003
Abstract
This document describes important tuning parameters and settings that can result in improved performance for
your Microsoft

Windows Server! 2003 system" #ach setting and its potential effect are described to help you
ma$e an informed %udgment about its relevance to the system& wor$load& and performance goals"
Microsoft

Windows Server

2003 White Paper


he infor!ation contained in this docu!ent represents the current view of
Microsoft Corporation on the issues discussed as of the date of
publication" #ecause Microsoft !ust respond to chan$in$ !ar%et
conditions& it should not be interpreted to be a co!!it!ent on the part of
Microsoft& and Microsoft cannot $uarantee the accurac' of an'
infor!ation presented after the date of publication"
his White Paper is for infor!ational purposes onl'" M(C)OSO*
M+,-S .O W+))+.(-S& -/P)-SS& (MP0(-1 O) S+2O)3& +S
O 4- (.*O)M+(O. (. 4(S 1OC2M-."
Co!pl'in$ with all applicable cop'ri$ht laws is the responsibilit' of the
user" Without li!itin$ the ri$hts under cop'ri$ht& no part of this docu!ent
!a' be reproduced& stored in or introduced into a retrieval s'ste!& or
trans!itted in an' for! or b' an' !eans 5electronic& !echanical&
photocop'in$& recordin$& or otherwise6& or for an' purpose& without the
e7press written per!ission of Microsoft Corporation"
Microsoft !a' have patents& patent applications& trade!ar%s& cop'ri$hts&
or other intellectual propert' ri$hts coverin$ sub8ect !atter in this
docu!ent" -7cept as e7pressl' provided in an' written license
a$ree!ent fro! Microsoft& the furnishin$ of this docu!ent does not $ive
'ou an' license to these patents& trade!ar%s& cop'ri$hts& or other
intellectual propert'"
9 2003 Microsoft Corporation" +ll ri$hts reserved"
Microsoft& +ctive 1irector'& Windows& and Windows Server are either
re$istered trade!ar%s or trade!ar%s of Microsoft Corporation in the
2nited States and:or other countries"
he na!es of actual co!panies and products !entioned herein !a' be
the trade!ar%s of their respective owners"
Microsoft

Windows Server

2003 White Paper


Contents
Introduction................................................................................................................................... 1
Performance Tuning for Networking........................................................................................... 2
'hoosing a (etwor$ )dapter""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2
W*+, 'ertification"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2
-ffload 'apabilities"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3
.nterrupt Moderation"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3
/01bit 'apabilities"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3
'opper and 2iber (etwor$ )dapters"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3
3ual or +uad Port (etwor$ )dapters""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3
Tuning the (etwor$ )dapter"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3
#nable -ffload 2eatures"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 3
(etwor$ )dapter 4esources"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 0
.nterrupt Moderation"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 0
T'P Parameters"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 0
Performance Tuning for Storage................................................................................................. 6
'hoosing Storage""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" /
W*+, 'ertification"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" /
#stimate the )mount of 3ata to be Stored""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" /
Storage )rray Selection""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 5
*W 4).3 ,evels"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 5
'hoosing the 4).3 ,evel"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 6
3etermining the 7olume ,ayout""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 80
.nterrupt Moderation"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 80
Storage 4elated Parameters""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 88
'ount-perations"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 88
(umber-f4e9uests""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 88
3ont7erify4andom3rivers""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 82
Performance Tuning for IIS 6.0.................................................................................................. 13
Selecting the 4ight *ardware for Performance""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 83
-perating System Practices"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 83
Microsoft

Windows Server

2003 White Paper


Tuning ..S /"0"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 80
:ernel1mode Tunings"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 8;
'ache Management Settings"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 8;
4e9uest and 'onnection Management Settings"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""8/
<ser1mode Settings""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 85
..S 4egistry Settings"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 85
..S Metabase""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 86
..S Wor$er Process -ptions =..S )dmin <.& )pplication Pool Properties>"""""""""""""""""""""""""""""""86
Secure Soc$ets ,ayer Tuning Parameters""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""20
.S)P.""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 20
Managed 'ode Tuning Parameters""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 20
-ther .ssues )ffecting ..S Performance""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 28
(T2S 2ile System Setting""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 28
Tcpip"sys Performance Settings for ..S""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""28
(etwor$ )dapter Tuning and ?inding for ..S"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 28
Performance Tuning for i!e Ser"ers........................................................................................ 22
General 'onsiderations""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 22
Server Message ?loc$ Server Model"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 23
General Tuning Parameters for 2ile Servers"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""23
PagedPoolSi@e"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 23
(tfs3isable6dot3(ame'reation"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 23
3isablelastaccess"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 20
(umTcbTablePartitions"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 20
Tcp)c$2re9uency"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 20
.nterrupt )ffinity""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 20
General Tuning Parameters for 'lient 'omputers""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""2;
3ormant2ile,imit"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2;
ScavengerTime,imit"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2;
3isable?yte4ange,oc$ing-n4ead-nly2iles""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""2;
Tcp)c$2re9uency"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2;
Performance Tuning for Acti"e #irector$.................................................................................2%
<sing the A3G? Switch in the ?oot"ini file"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 25
Microsoft

Windows Server

2003 White Paper


Turning -ff Signing and Sealing"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 25
&enc'marking (eb (ork!oads )(eb&enc'*...........................................................................2+
&enc'marking i!e Ser"er (ork!oad )Net&enc'*....................................................................30
4egistry Tuning Parameters for (et?ench on Windows Server 2003""""""""""""""""""""""""""""""""""""30
4egistry Tuning Parameters for (et?ench on 'lient 'omputers"""""""""""""""""""""""""""""""""""""""""""30
&enc'marking Acti"e #irector$ (ork!oad )#irector$,ark*....................................................31
)dd .ndeB for 3escription )ttribute =Server>""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""38
Turn -ff )uto 3efragmenter""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 38
.ncrease MaB<serPorts and TcpWindowSi@e in T'PA.P""""""""""""""""""""""""""""""""""""""""""""""""""""""""38
&enc'marking Networking (ork!oads )Ttc-. C'ariot*............................................................32
Tuning for (Tttcp""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 32
(etwor$ )dapter"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 32
T'P""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 32
Tuning for 'hariot"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 33
/e!ated 0inks.............................................................................................................................. 31
Microsoft

Windows Server

2003 White Paper


Introduction
Microsoft

Windows Server! 2003 should perform very well out of the boB for most customer
wor$loads" *owever& it is possible to tune the server settings and see incremental performance gains&
especially when the nature of the wor$load will not vary much over time"
The most effective tunings ta$e into account the hardware& the wor$load& and the performance goals"
This document describes important tuning parameters and settings that can result in improved
performance" #ach setting and its potential effect are described to help you ma$e an informed %udgment
about its relevance to the system& wor$load& and performance goals"
Note2 4egistry settings and tuning parameters may have changed significantly from Microsoft
Windows

2000 Server to Windows Server 2003" Please $eep this in mind as you tune your serverCusing
earlier or out1of1date tuning guidelines may produce uneBpected results"
)s always& care must be ta$en when manipulating the registry directly" .f you must edit the registry& bac$ it
up first"
Performance Tuning Guidelines for Windows Server 2003 8
Microsoft

Windows Server

2003 White Paper


Performance Tuning for Networking
The networ$ architecture covers many components& interfaces& and protocolsD 2igure 8 illustrates some
of them" The sections below discuss tuning guidelines for some of the components for server
wor$loads"
*i$ure ; .etwor% Stac% Co!ponents
The networ$ architecture is layered& and the layers can be broadly divided intoE
T'e network dri"er and N#IS. These are the lowest layers" (3.S eBposes interfaces for the driver
below it and for the layers above itD for eBample& T'PA.P"
T'e -rotoco! stack. This implements protocols such as T'PA.P and <3PA.P" These layers eBpose the
T3. interface for layers above them"
S$stem #ri"ers. These are typically T3. clients and eBpose interfaces to user1mode applications" The
WinSoc$ interface is eBposed by )fd"sys"
3ser4mode a--!ications.
Tuning for networ$1intensive wor$loads can involve tuning for each of the layers" Some of the tunings
are described below"
C'oosing a Network Ada-ter
(etwor$1intensive applications need high1performance networ$ adapters" This section covers some
considerations for choosing networ$ adapters"
(560 Certification
'hoose a networ$ adapter with Microsoft Windows *ardware +uality ,abs (W*+,> certification"
7ff!oad Ca-abi!ities
-ffloading tas$s can help lower 'P< usage on the server& improving overall system performance" The
Microsoft T'PA.P transport can offload one or more of the following tas$s to a networ$ adapter that has
the appropriate tas$1offload capabilitiesE
Performance Tuning Guidelines for Windows Server 2003 2
(3.S
(3.S
WMS
WMS
*TTP"SFS
*TTP"SFS
T'PA.P
T'PA.P
<3PA.P
<3PA.P
7P(
7P(
3(S
3(S
..S
..S
)23"SFS
)23"SFS
(.' 3river
(.' 3river
<ser1mode
)pplications
System
3rivers
Protocol
Stac$
(3.S
(etwor$
.nterface
Microsoft

Windows Server

2003 White Paper


C'ecksum tasks. The T'PA.P transport can offload the calculation and validation of .P and T'P
chec$sums for sends and receives"
IP securit$ tasks. The T'PA.P transport can offload the calculation and validation of encrypted
chec$sums for authentication headers =)*> and encapsulating security payloads =#SP>" The
T'PA.P transport can also offload the encryption and decryption of #SP payloads"
Segmentation of !arge TCP -ackets. The T'PA.P transport supports large send offload =,S->"
With ,S-& the T'PA.P transport can offload the segmentation of large T'P pac$ets"
Stack off!oad. The entire networ$ stac$ can be offloaded to a networ$ adapter that has the
appropriate capabilities"
Interru-t ,oderation
Some networ$ adapters are capable of moderating how fre9uently they interrupt the host processors to
indicate networ$ activity =or its completion>" Some networ$ adapters are also capable of ma$ing such
decisions in an adaptive manner& ta$ing into account networ$ and host1processor load" Moderating
interrupts can often result in reduction in 'P< load on the host& but unless interrupt moderation is
performed intelligently and adaptively& the 'P< savings may come at the cost of increases in latency"
614bit Ca-abi!ities
(etwor$ adapters that are /01bit capable can perform direct memory access =3M)> operations to and
from high physical memory locations =above 0 G?>"
Co--er and iber Network Ada-ters
'opper networ$ adapters have the same performance as their fiber counterparts& but may be less
eBpensive to purchase" The cost of the transceiver on copper networ$ adapters is lower"
#ua! or 6uad Port Network Ada-ters
These networ$ adapters are good for failover scenarios but share a single interrupt among all the ports
on the networ$ adapter" <sing two single1port networ$ adapters usually yields better performance than
using one dual1port networ$ adapter for the same wor$load"
Tuning t'e Network Ada-ter
Fou can optimi@e networ$ throughput and resource usage by using networ$ adapter tunings =when
available and eBposed by the networ$ adapter>" :eep in mind that the correct set of tunings depends on
the networ$ adapter& wor$load& host1computer resources& and performance goals"
8nab!e 7ff!oad eatures
.t is almost always beneficial to turn on networ$ adapter offload features" .n some instances& however&
the networ$ adapter may not be powerful enough to handle the offload capabilities at high throughput"
2or eBample& enabling ,S- can lower the maBimum sustainable throughput on some networ$ adapters"
*owever& if the reduced throughput is not eBpected to be a limitation& offload capabilities should be
enabled even for such networ$ adapters" (ote that some networ$ adapters re9uire offload features to
be enabled for send and receive paths independently"
Performance Tuning Guidelines for Windows Server 2003 3
Microsoft

Windows Server

2003 White Paper


Network Ada-ter /esources
Several networ$ adapters allow the configuration of resources by the administrator" 4eceive buffers and
send buffers are among the parameters that may be set" Some networ$ adapters actively manage their
resources& and there is no need to set such parameters for these networ$ adapters"
Interru-t ,oderation
Some networ$ adapters eBpose buffer coalescin$ parameters =sometimes separately for send and
receive buffers> for control over interrupt moderation" .t is important to consider buffer coalescing when
the networ$ adapter does not perform adaptive interrupt moderation"
TCP Parameters
T'P parameters that can be ad%usted for high throughput scenarios are listed in Table 8"
Tab!e 1. TCP Parameters
Parameter #escri-tion
TCP(indowSi9e This value determines the maBimum amount of data =in bytes> that can be outstanding on the
networ$ at any given time" .t can be set to any value from 8 to /;&;3; bytes by using the
following registry entryE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip
\Prmeters\Tcp!in"o#Si$e (&E'_(!O&()
The default for a gigabit interface is set to approBimately /;&;3; =rounded down to the nearest
multiple of full T'P pac$ets>& 8/&360 for a 800 Mbps lin$& and 6&8G2 for all interfaces of lower
speeds =for eBample& modems>& again rounded down" .deally& this value should be set to the
product of end1to1end networ$ bandwidth =in bytesAs> and the round1trip delay =in seconds>&
also referred to as the bandwidth1delay product" This value should be set according to the
amount of T'P data eBpected to be received by the computer"
(indow Sca!ing -n a lin$ with high bandwidth1delay product =for eBample& satellite lin$s>& there may be a need
to increase the window si@e to above /0 :" 2or that& you need to enable T'P -ptions as
specified in 42' 8&323 by appropriately setting the following registry entryE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Prmeters
\Tcp*+,+Opts (&E'_(!O&()
To enable window si@es of greater than /;&;3;& this registry entry should be set to 8 =one>"
)fter this change has been made& the registry entry controlling T'PWindowSi@e can be set to
values larger than /0: =up to 8G?>"
,a:5as'Tab!eSi9e This value determines the si@e of the hash table holding the state of T'P connections" The
default value is 826 multiplied by the s9uare of the number of processors in the system" When
a large concurrent connection load is eBpected on the system& set the following registry entry
to a high value to improve the performance of the hash tableE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip
\Prmeters\M-Hs.T/leSi$e (&E'_(!O&()
The maBimum value is 0B80000 =/;&;3/>" .t is recommended that you consider using the
maBimum value for large servers which you eBpect to carry high connection load" :eep in
mind that the table uses nonpaged pool& so do not set too high a value for the parameter if the
server does not have much available nonpaged pool or if you do not anticipate a high1
connection load"
NumTcbTab!ePartitions ?y default& the table holding T'P connection states has as many partitions as the s9uare of
the number of processors" .n most cases& the setting is appropriate and results in lowered
contention on the tables" *owever& the default may be too high for 8/ or more processors&
Performance Tuning Guidelines for Windows Server 2003 0
Microsoft

Windows Server

2003 White Paper


and may result in too much 'P< usage" .n that case& set the following registry entry to a value
lower than the s9uare of the number of processorsE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip
\Prmeters\NumTc/T/lePrtitions (&E'_(!O&()
,a:3serPort ) port is used whenever an active connection is used from a computer" Given the default
value of available user mode ports =;&000 for each .P address> and T'P time1wait
re9uirements& it may be necessary to ma$e more ports available on the system" Fou can set
the following registry entry to as high as 0Bfffe =/;;30>E
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip
\Prmeters\M-0serPort
Performance Tuning Guidelines for Windows Server 2003 ;
Microsoft

Windows Server

2003 White Paper


Performance Tuning for Storage
The storage architecture covers many components in the driver stac$ as 2igure 2 shows" The sections
below discuss tuning guidelines for storage wor$loads"
*i$ure 2 Stora$e 1river Stac%
C'oosing Storage
The most important considerations in choosing storage systems areE
Providing necessary storage space& bandwidth& and latency characteristics for current and future
needs"
Selecting an *W 4).3 type and bac$up procedure that provide the re9uired performance and data
recovery capabilities"
(560 Certification
'hoose a storage adapter with W*+, certification"
8stimate t'e Amount of #ata to be Stored
When you estimate the amount of data to be stored on a new file server& you need to consider these
issuesE
The amount of data currently stored on any file servers that will be consolidated onto the new file
server"
.f the file server will be a replica member& the amount of replicated data that will be stored on the
new file server"
The amount of data that you will need to store on the file server in the future"
Performance Tuning Guidelines for Windows Server 2003 /
S'S.P-4T
S'S.P-4T
(T2S
(T2S
2T3.S:
2T3.S:
PartMgr
PartMgr
2)ST2)T
2)ST2)T
3M.-
3M.-
Miniport 3river
Miniport 3river
2ile System
3rivers
7olume Snapshot
and Management
3rivers
Partition and
'lass 3rivers
Port 3river
)dapter
.nterface
ST-4P-4T
ST-4P-4T
'lassP(P
'lassP(P
7olSnap
7olSnap
Microsoft

Windows Server

2003 White Paper


) general guideline is to plan for faster growth in the future than you eBperienced in the past"
.nvestigate whether your organi@ation plans to hire a large number of people& whether any groups in
your organi@ation are planning large pro%ects that will re9uire eBtra storage& and so on"
Fou must also ta$e into account the amount of space used by operating system files& applications&
4).3 redundancy& log files& and other factors" Table describes some factors that affect file server
capacity"
Tab!e 2. actors T'at Affect i!e Ser"er Ca-acit$
actor Storage Ca-acit$ /e;uired
-perating
system files
)t least 8"; G?" To allow space for optional components& future service pac$s& and other
items& plan to allow an additional 3 G? to ; G? for the operating system volume"
Paging file 8"; times the amount of 4)M by default"
Memory dump 3epending on the memory dump file option that you have chosen& the amount of dis$ space
re9uired can be as large as the amount of physical memory plus 8 M?"
)pplications 7aries according to the application& which can include antivirus& bac$up& and dis$ 9uota
software& database applications& and optional components such as 4ecovery 'onsole&
Services for <niB& and Services for (etWare"
,og files 7aries according to the application that creates the log file" Some applications allow you to
configure a maBimum log file si@e" Fou must ensure that you have ade9uate free space to
store the log files"
4).3 solution 7ariesD see 'hoosing the 4aid ,evel later in this document for more information"
Shadow copies Ten percent of the volume by default& although increasing this si@e is recommended"
Storage Arra$ Se!ection
There are many considerations in choosing a storage array and adapters" The choices include the type
of storage arrays being used& including the following options"
Tab!e 3. 7-tions for Storage Arra$ Se!ection
7-tion #escri-toin
2ibre 'hannel
or S'S.
2ibre 'hannel allows long glass or copper cables to connect the storage array to the
system while providing high bandwidth"
S'S. provides very high bandwidth but has cable length restrictions"
*W 4).3
capabilities
.t is important for the storage controllers to offer *W 4).3 capabilities" 4).3 levels 0& 8& and
; are described in Table 0"
MaBimum
storage
capacity
Total storage area"
?andwidth at which storage can be accessed which is determined by the number of
physical dis$s in the array& speed of controllers& type of dis$ =for eBample& S'S. or 2ibre
'hannel>& *W 4).3& and adapters used to connect the storage array to system"
5( /AI# 0e"e!s
Most storage arrays provide some *W 4).3 capabilities& including the following 4).3 options"
Performance Tuning Guidelines for Windows Server 2003 5
Microsoft

Windows Server

2003 White Paper


Tab!e 1. 5( /AI# 7-tions
7-tion #escri-toin
4).3 0 4).3 0 presents a logical dis$ that stripe dis$ accesses over a set of physical dis$s"
-verall this is the fastest *W 4).3 configuration"
This is the least eBpensive 4).3 configuration& because data is not duplicated"
4).3 0 does not provide additional data recovery mechanisms as does 4).3 8 and 4).3 ;"
4).3 8 4).3 8 presents a logical dis$ that is mirrored to another dis$"
4).3 8 is slower than 4).3 0 for write operations& because the data needs to be written to two
or more physical dis$s& and the latency is the slowest of the write operations"
.n some cases& 4).3 8 can provide faster read operations than 4).3 0 because it can read
from the least busy physical dis$"
4).3 8 is the most eBpensive in terms of physical dis$s& because two or more complete
copies of the data are stored"
4).3 8 is the fastest in terms of recovery time after a physical dis$ failure& because the
second physical dis$ is available for immediate use" ) new mirror physical dis$ can be installed
while full data access is permitted"
4).3 ; 4).3 ; presents a logical dis$ that has parity information written to other dis$s as 2.gure 3 shows"
4).3 ; uses independent data dis$s with distributed parity bloc$s"
4).3 ; is slower then 4).3 0& because each logical dis$ write .A- results in data being written
to multiple dis$s" *owever& 4).3 ; provides additional data recovery capabilities over 4).3 0&
because data can be reconstructed from the parity"
4).3 ; re9uires additional time =compared to 4).3 8> to recovery from a lost physical dis$&
because the data on the dis$ needs to be rebuilt from parity information stored on other dis$s"
4).3 ; is less eBpensive than 4).3 8& because a full copy of the data is not stored on dis$"
-ther -ther combinations of 4).3 eBist including 4).3 0H8& 4aid 80 and 4aid ;0"
The following figure illustrates 4).3 ;"
*i$ure 3 )+(1< Overview
C'oosing t'e /AI# 0e"e!
#ach 4).3 level is trade1off between the following factorsE
'ost
Performance
Performance Tuning Guidelines for Windows Server 2003 6
Microsoft

Windows Server

2003 White Paper


)vailability and reliability
Fou can determine the best 4).3 level for your file servers by evaluating the read and write loads of the
various data types and then deciding how much you are willing to spend to achieve the performance
and availabilityAreliability that your organi@ation re9uires" Table describes four common 4).3 levels&
their relative costs& performance& availability and reliability& and their recommended uses"
Tab!e <. /AI# Trade47ffs
/AI#40
Stri-ed
/AI#41
,irrored
/AI#4<
Stri-ed wit'
Parit$
/AI#40=1
Stri-ed ,irrors
Minimum number
of dis$s
2 2 3 0
<sable storage
capacity
800I ;0I (18A(
where ( is the
number of dis$s
;0I
2ault tolerance (one" ,osing a
single dis$ causes
all data on the
volume to be lost"
'an lose multiple
dis$s as long as a
mirrored pair isnJt
lost"
'an tolerate the
loss of one dis$"
'an lose multiple
dis$s as long as a
mirrored pair is not
lost" 7aries
according to the
number of mirrored
pairs in the array"
8
4ead performance Generally
improved by
increasing
concurrency"
Good read
performance
Generally
improved by
increasing
concurrency"
.mprovement from
increasing
concurrency and
dual sources for
each re9uest"
Write performance Generally
improved by
increasing
concurrency"
Worse than K?-3
=between 20I and
00I for most
wor$loads>
Poor unless full1
stripe writes =large
re9uests> 'an be
as low as L2;I of
K?-3 =0E8
re9uests>"
'an be better or
worse depending
on re9uest si@e&
hot spots =static or
dynamic>& and so
on"
?est uses Temporary data
only
-perating system
log files
-perating
system
<ser and
shared data
)pplication
files
-perating
system
<ser and
shared data
)pplication
files
,og files
8
.f a dis$ fails& failure of its mirrored partner prior to replacement will cause data loss" *owever& the failure of any other
member dis$ does not cause data loss"
.f you use more than two dis$s& 4).3 0H8 is almost always a better solution than 4).3 8"
When determining the number of dis$s that should be included in 4).3 0& 4).3 ;& and 4).3 0H8 virtual
dis$s& consider the following informationE
Performance Tuning Guidelines for Windows Server 2003 G
Microsoft

Windows Server

2003 White Paper


Performance increases as you add dis$s"
4eliability& in terms of mean time To failure =MTT2 > of two dis$s& decreases as you add dis$s for
4).3 ; or a single dis$ for 4).3 0"
<sable storage capacity increases as you add dis$s& but so does cost"
Stripe unit si@e" Software solution is fiBed at /0 :?" *ardware solutions may range from 0 :? to
8 M?" .deal stripe unit si@e maBimi@es the dis$ activity without unnecessarily brea$ing up re9uests
=so that multiple dis$s are re9uired to service a single re9uest>" 2or eBampleE
-ne stream of se9uential re9uests =large> on K?-3 would $eep only one dis$ busy at a time"
To $eep all dis$s busy& the stripe unit needs to be e9ual to 8A( where ( is the re9uest si@e"
2or ( streams of small random re9uests& if ( is greater than the number of dis$s& and if there
are no hotspots& striping will not increase performance" *owever& if there are hotspots& the
stripe unit si@e needs to maBimi@e the chance that a re9uest will not be split& while minimi@ing
the chance of a hotspot falling entirely within one or two stripe units" Fou might pic$ a low
multiple of the re9uest si@e& li$e ;M or 80M& especially if the re9uests are on some boundary
=for eBample& 0 :? or 6 :?>"
2or fewer streams than dis$s& tou need to split the streams so that all dis$s are $ept busy"
.nterpolate from the previous two eBamples" 2or eBample& if you have 80 dis$s and ; streams&
split each re9uest in half =use a stripe unit si@e e9ual to half the re9uest si@e>"
#etermining t'e >o!ume 0a$out
Whenever possible use separate volumes for each data type" 2or eBample& use one volume for the
operating system and paging space& and one or more volumes for shared user data& applications& and
log files"
Place different data types in separate volumes on different virtual dis$s" <sing separate virtual dis$s is
especially important for any data types that create heavy write loads& such as log files& so that a single
set of dis$s =that compose the virtual dis$> can be dedicated to handling the dis$ .A- created by the
updates to the log files" Placing the paging file on a separate virtual dis$ can provide some minor
improvements in performance& but typically not enough to ma$e it worth the eBtra cost"
To gain some performance benefits while minimi@ing cost& it is often useful to combine different data
types in one or more volumes on the same virtual dis$s" ) common method is to store the operating
system and paging space on one virtual dis$ and the user data& applications& and log files in one or
more volumes on the remaining virtual dis$"
Interru-t ,oderation
Some storage adapters are capable of moderating how fre9uently they interrupt the host processors to
indicate dis$ activity =or its completion>" Moderating interrupts can often result in reduction in 'P< load
on the host& but unless interrupt moderation is performed intelligentlyD the 'P< savings may come at
the cost of increases in latency"
Tab!e 6. 7-tions for Interru-t ,oderation
#e"ice #escri-tion
Performance Tuning Guidelines for Windows Server 2003 80
Microsoft

Windows Server

2003 White Paper


/01bit capabilities )dapters that are /01bit1capable can perform 3M) operations to and
from high physical memory locations =above 0 G?>"
'opper and fiber =glass> adapters 'opper adapters generally have the same performance as their fiber
counterparts& and both copper and fiber are available on some fibre
channel adapters" Some environments are better suited for either
copper or glass adapters"
3ual or 9uad port S'S. adapters Some S'S. adapters provide 2 or 0 S'S. buses on a single adapter
card" This is often necessary due to S'S. limitations on the number
of dis$s that can be connected to a S'S. bus" 2ibre channel dis$s
generally do not have limits on the number of dis$s connected to an
adapter"
Storage /e!ated Parameters
Fou can ad%ust the following registry parameters for high throughput scenarios"
Count7-erations
This parameter allows you to turn off system and process level .A- counters" This counter affects
system and dis$ counting of dis$ and networ$ .A- re9uests" Physical and logical dis$ countersCin
addition to networ$ interface& .P and T'P countersCare not affected by this parameter" .t is useful to
turn off the process and system counters by using this registry parameter on systems where there is a
measurable cost associated with counting .A- at the process and system level but where .A- rates can
still be analy@ed at the physical& logical& networ$ interface& .P and T'P levels" To turn off the process
and system .A- counters& you need to create a registry value =and .A- System $ey if one doesnJt already
eBist> and set the value to 0 =4#GN3W-43> in the following registry entryE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Session Mn1er\I2O System\CountOpertions3
) reboot is re9uired for this setting to ta$e effect" Process and system counters can be turned on again
either by setting 'ount-perations to 8 or by removing the 'ount-perations registry entry"
Number7f/e;uests
This parameter allows you to specify the number of S4?s created for a given adapter" This improves
performance and allows Windows to give more dis$ re9uests to a logical dis$& which is most useful for
*W 4).3 adapters that have concurrency capabilities since each logical dis$ consists of multiple
physical dis$s" *owever& the default setting is often less than optimal for many high1speed *W 4).3
dis$ arrays" -verall dis$ array performance can be improved by setting (umber-f4e9uests to a value
in the range of 32 to G/ =decimal>" Set the following registry entryE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MINIPO&T_A(APTE&\Prmeters
\(eviceN\Num/erO4&e5uests (&E'_(!O&()
4eplace M.(.P-4TN)3)PT#4 with the specific adapter name" Ma$e an entry for each device& and in each
entry replace 1evice. with 3evice8& 3evice2& and so forth& depending on the number of devices you
are adding" ) reboot is re9uired for this setting to ta$e effect" 2or eBample& for two #muleB ,PG000
miniport adapters whose miniport driver name is lp/nds3;& you would create the following registry
entries set to G/E
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lp6n"s+7\Prmeters\(evice8\Num/erO4&e5uests
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\lp6n"s+7\Prmeters\(evice*\Num/erO4&e5uests
Performance Tuning Guidelines for Windows Server 2003 88
Microsoft

Windows Server

2003 White Paper


#ont>erif$/andom#ri"ers
This parameter prevents the driver verifier from randomly verifying drivers for debugging" To disable the
driver verifier set a value of 8 =4#GN3W-43> for the following registry entryE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Session Mn1er\Memory Mn1ement\(ont9eri4y&n"om(rivers3
Performance Tuning Guidelines for Windows Server 2003 82
Microsoft

Windows Server

2003 White Paper


Performance Tuning for IIS 6.0
Se!ecting t'e /ig't 5ardware for Performance
.t is important to select the right hardware to satisfy the eBpected Web load =$eeping in mind average
load& pea$ load& capacity& growth plans& and response times>" *ardware bottlenec$s limit the
effectiveness of software tuning" 'onsider the issues in Table 5 when selecting hardware"
Tab!e %. 5ardware Considerations for IIS 6.0
Issue Considerations
(umber& type& and speed of
processors
Scripts =)SP or )SP"(#T> and encryption =SS,> are 'P< intensive"
'oncurrent client load also drives up 'P< usage" 'onsider this when
selecting processor speeds and the number of processors in the system"
,arger ,2 processor caches provide better performance"
Two 'P<s are rarely as effective as one 'P< that is twice as fast =as
the slower 'P<s>"
)mount of physical memory =4)M> )dded memory will help as you add more sites& more dynamic content
scripts =in particular )SP"(#T scripts>& and more application pools =or
wor$er processes>"
(umber& type& and speed of
networ$ adapters
The networ$ adapter should not be a bottlenec$" (ewer networ$ cards
can offload some server functions and help performance" 2or details& see
Performance Tuning for (etwor$ing earlier in this document"
Type of dis$ controller& number and
capacity of physical dis$ platters
..S caches fre9uently accessed files in memory" *owever& files that
are not accessed fre9uently =the Ocold setP> must be retrieved from the
dis$ when needed" *andling large sites with a high number of re9uests
from the cold set re9uires good dis$ performance =a 4).3 controller
connected to a large number of dis$ platters>"
..S log file si@es and estimated growth under load should be ta$en
into consideration"
-ther servers on which the ..S
server might depend
) slow S+, Server may limit the response rate of the ..S server
connected to it& even if the ..S server has good hardware components"
Putting both ..S server and S+, Server =or any other 'P<1intensive
component> on the same computer limits the resources available to each
component and affects overall performance"
7-erating S$stem Practices
.f possible& do a clean install of the operating system software" <pgrading could leave outdated&
unwanted& or sub1optimal registry settings as well as previously installed services and applications that
consume resources if automatically started" .f another operating system is installed and needs to be $ept&
install the new operating system on a different partition& otherwise the new installation will overwrite the
settings under Program 2ilesQ'ommon 2iles"
To reduce dis$1access interference& $eep the system pagefile& operating system& Web data& )SP
template cache& and ..S log on separate physical dis$s if possible"
)void installing unnecessary services and applications"
Performance Tuning Guidelines for Windows Server 2003 83
Microsoft

Windows Server

2003 White Paper


Tuning IIS 6.0
..S /"0 employs a new process model" ) $ernel mode *TTP listener =*ttp"sys> receives and routes
*TTP re9uests =and can even satisfy re9uests from its response cache>" Wor$er processes register for
<4, subspaces& and *ttp"sys routes the re9uest to the appropriate process =or set of processes& in the
case of application pools>"
2igure 0 shows the difference between the ..S ;"0 and ..S /"0 process models" ..S ;"0 uses WinSoc$ to
accept connections on port 60" 4e9uests are received by the inetinfo process& which then either
eBecutes the re9uest in1process& or hands it to a dllhost process for out1of1process handling =to provide
isolation>" The response is sent bac$ by the inetinfo process"
*i$ure = Process Models for ((S <"0 and ((S >"0
The ..S /"0 process relies on the $ernel1mode Web driver& *ttp"sys" .n the new model& *ttp"sys is
responsible for connection management and re9uest handling" The re9uest may either be served from
the *ttp"sys cache or handed to a wor$er process for further handling =see 2igure ;>" Multiple wor$er
processes may be configured& providing isolation at lower cost"
*ttp"sys includes a response cache" When a re9uest matches an entry in the response cache& *ttp"sys
sends the cache response directly from $ernel1mode" 2igure ; shows the re9uest flow from the networ$
through *ttp"sys =and possibly up to a wor$er1process>"
Performance Tuning Guidelines for Windows Server 2003 80
INETIN:O3E;E
Metabase
DLLHos
t
ISAPI
Extensio
ns
<ernel
user
!inSoc< ,38
HTTP3SY
S
Worke
r
Proces
s
ISAPI
IIS
Core
DLLs
DLLHos
t
ISAPI
Extensio
ns
Worke
r
Proces
s
ISAPI
IIS
Core
DLLs
Metabase
W
A
S
IIS 5.0 IIS 6.0
INETINF.E!E
TCP2IP
A:(3SYS
TCP2IP
Microsoft

Windows Server

2003 White Paper


*i$ure < )e?uest 4andlin$ in ((S >"0
?ecause a Web server has a $ernel1mode as well as a user1mode component& both must be tuned for
optimal performance" Therefore& tuning ..S /"0 for a specific wor$load includes configuringE
*ttp"sys =the $ernel mode driver> and the associated $ernel1mode cache"
Wor$er processes and user1mode ..S& including application pool configuration"
)dditionally& some tuning parameters that affect performance are discussed in the following sections "
?erne!4mode Tunings
Performance1related *ttp"sys settings fall into two broad categoriesE cache management& and
connection and re9uest management" )ll registry settings are stored under the following entryE
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Http\Prmeters
.f it is already running& the *TTP service must be stopped and restarted for the changes to ta$e effect"
Cac'e ,anagement Settings
-ne of the benefits that *ttp"sys provides is a $ernel1mode cache" .f the response is in the $ernel1
cache& it is possible to satisfy an *TTP re9uest entirely from $ernel1mode& which significantly lowers the
'P< cost of handling the re9uest" *owever& the $ernel1mode cache of ..S /"0 is a physical1memory
based cache& and the cost of an entry is the memory it occupies"
)n entry in the cache is of benefit only when used" *owever& the entry uses physical memory at all
times& whether the entry is in use or not" The usefulness of an item in the cache =the difference being
able to serve it from the cache ma$es> and its cost =physical memory occupied> over the lifetime of the
entry need to be evaluated ta$ing into account the resources available ='P<& physical memory> and the
wor$load re9uirements" *ttp"sys attempts to $eep only useful =actively accessed> items in the cache&
but it is possible to increase the performance of the web server by tuning the *ttp"sys cache for
particular wor$loads"
Performance Tuning Guidelines for Windows Server 2003 8;
(orker Process
(orker Process
/es-onse
Cac'e
5TTP
8ngine
Names-ace
,a--er
/
e
;
u
e
s
t
;
u
e
u
e
/
e
;
u
e
s
t
;
u
e
u
e
Send
/es-onse
/8638ST
5tt-.s$s
/
e
;
u
e
s
t
;
u
e
u
e
/8SP7NS8
(orker Process
Microsoft

Windows Server

2003 White Paper


?elow are some useful settings for the *ttp"sys $ernel1mode cacheE
3ri8nab!eCac'e. 3efault 7alueE 8" ) non1@ero value enables the $ernel1mode response and
fragment cache" 2or most wor$loads& the cache should remain enabled" 'onsider disabling the
cache if you eBpect very low response and fragment cache utili@ation"
3ri,a:Cac'e,egab$teCount. 3efault 7alueE 0" ) non1@ero value specifies the maBimum memory
available to the $ernel cache" The default value& 0& allows the system to automatically ad%ust the
amount of memory available to the cache" (ote that specifying the si@e only sets the maBimum& and
the system may not allow the cache to grow to the specified si@e"
3ri,a:3ri&$tes. 3efault 7alueE 2/2800 bytes =2;/ :?>" This is the maBimum si@e of an entry in
the $ernel cache" 4esponses or fragments larger than this will not be cached" .f you have enough
memory& consider increasing this limit" .f memory is limited& and large entries are crowding out
smaller ones& it may be help to lower this limit"
3riSca"engerPeriod. 3efault 7alueE 820 seconds" The *ttp"sys cache is scanned by a scavenger
periodically and entries not accessed between scavenger scans are removed" Setting the
scavenger period to a high value reduces the number of scavenger scans" *owever& the cache
memory usage may grow as older& less fre9uently accessed entries are allowed to stay in the
cache" Setting this period to too low a value causes more fre9uent scavenger scans& and may
result in eBcessive flushes and cache churn"
/e;uest and Connection ,anagement Settings
*ttp"sys also manages inbound *TTPA*TTPS connections and is the first layer to handle re9uests on
these connections" .t uses internal data structures to $eep information about connections and re9uests"
)lthough such data structures can be created =and freed> on demand& it is more 'P<1efficient to $eep
some in reserve in loo$1aside lists" :eeping such reserves help *ttp"sys handle fluctuations in load with
less 'P< usage" (ote that load fluctuations are not necessarily the result of fluctuations in eBternally
applied load" .nternal optimi@ations to promote batch processing& and even interrupt moderation may
result in load fluctuations and spi$es"
The reserves help reduce 'P< usage and latency& and increase Web server capacity but increase
memory usage" When tuning the re9uest and connection management behavior of *ttp"sys& it is
important to $eep in mind the resources available to the server& performance goals& and the
characteristics of the wor$load" <se the following re9uest and connection management settingsE
,a:Connections. This value controls the number of concurrent connections *ttp"sys will allow" #ach
connection consumes non1paged1pool& a precious and limited resource" The default is determined 9uite
conservatively to limit the amount of non1paged1pool used for connections" -n a dedicated web server with
ample memory& the value should be set higher if a significant concurrent connection load is eBpected" ) high
value may result in increased non1paged1pool usage& so care should be ta$en to use a value appropriate for
the system"
Id!eConnections5ig',ark. Id!eConnections0ow,ark. and Id!e0istTrimmerPeriod. These values
control the handling of connection structures not currently in useE how many must be available at any time
=to handle spi$es in connection load>& the low and high watermar$s for the free list& and the fre9uency of
connection structure trimming and replenishment"
Performance Tuning Guidelines for Windows Server 2003 8/
Microsoft

Windows Server

2003 White Paper


/e;uest&uffer0ookaside#e-t' and Interna!/e;uest0ookaside#e-t' These values control the
handling of data structures related to buffer management& and how many are $ept in reserve to handle load
fluctuations"
3ser4mode Settings
IIS /egistr$ Settings
The following registry settings are found under this entryE
HKLM\System\CurrentControlSet\Services\Inetin4o\Prmeters\
,a:Cac'edi!eSi9e =4#GN3W-43> in bytes" )llows file si@es up to the specified si@e to be cached
=default 2;/ :?>" The actual value depends on the number and si@e of the largest files in the dataset versus
the available 4)M" 'aching large& fre9uently re9uested files can reduce 'P< usage& dis$ access& and
associated latencies"
,emCac'eSi9e =4#GN3W-43> in M?" ,imits the ..S user1mode cache si@e to the specified si@e
=default is ad%usted by ..S depending on available memory>" 'hoose the value carefully based on the si@e of
the hot set =set of fre9uently accessed files> versus the amount of 4)M or the ..S process address space&
which is normally limited to 2 G?"
#isab!e,emor$Cac'e =4#GN3W-43>" 3isables the user1mode ..S cache when set to 8 =default is 0>"
When the cache hit rate is very small you can disable the cache altogether to avoid the overhead
associated with the cache code path"
,a:Poo!T'reads =4#GN3W-43>" Sets the maBimum number of pool threads that can be created per
processor =default 0& range unlimited>" #ach pool thread watches for networ$ re9uests and then processes
them" The MaBPoolThreads count does not include threads that are currently processing .S)P.
applications" This parameter should be increased if the 'P< shows sub1optimal average usage because all
eBisting threads are busy and there is no available thread to process new re9uests"
Poo!T'read0imit =4#GN3W-43>" Sets the maBimum number of pool threads that can be created in
the system =default is four times the number of processors& range unlimited>" PoolThread,imit must be
greater than or e9ual to MaBPoolThreads" (ormally PoolThread,imit R MaBPoolThreads number of
processors" Setting only one of these parameters is sufficient" .f both MaBPoolThreads and PoolThread,imit
are specified& the more stringent limit is used"
7b@ectCac'eTT0 =4#GN3W-43> in seconds" 'ontrols the length of time that ob%ects are allowed to
stay in the ..S user1mode cache without being accessed =default 30 seconds& 0B22222222 disables the
ob%ect cache scavenger thread>" This parameter can be increased if there is no memory pressure on the
system and if the content being served does not change fre9uently" ,ower the parameter if the system is
under memory pressure and the user1mode cache is growing" See also )ctivityPeriod later in this section"
Acti"it$Period =4#GN3W-43> in seconds" )llows a file to be cached only if it was hit repeatedly
within the activity period =default 80 seconds& a value of @ero will disable this chec$>" This parameter
reduces caching overhead caused by caching files that are not accessed fre9uently Fou can increase the
activity period if the cache is not under heavy churn and there is enough free memory& or you can decrease
the activity period if there is a heavy re9uest load on the cache"
#ataSetCac'eSi9e =4#GN3W-43> default ;0" Sets the maBimum number of virtual directory entries
in the metabase dataset cache" .ncrease if the number of installed virtual directories eBceeds the default"
Performance Tuning Guidelines for Windows Server 2003 85
Microsoft

Windows Server

2003 White Paper


The impact of an under1si@ed dataset cache is increased latency =accompanied by reduced throughput and
low 'P< usage> when serving static content"
IIS ,etabase
The following settings are found under W3S7'A"
As-,a:#iskTem-!ateCac'ei!es" )llows dis$ caching of )SP script templates" 'ompiling the )SP
templates is a processor1intensive tas$" Memory constraints limit the number of templates that can be
cached in1memory" 2etching compiled templates from the dis$ template cache incurs less cost than
compiling templates that do not fit into the )SP memory cache" See also )spScript#ngine'acheMaB later in
this section"
As-#iskTem-!ateCac'e#irector$" .f possible& set to a platter not in heavy use =for instance& not
shared with the operating system& pagefile& ..S log or other fre9uently1accessed content>" The default
directory is OIwindirIQsystem32QinetsrvQTemplate 3is$ cacheQ)SP 'ompiled TemplatesP"
As-Scri-t8ngineCac'e,a:" Set to as many script engines as memory limits allow =default 82;>"
As-Scri-ti!eCac'eSi9e" Set to as many )SP templates as memory limits allow =default 2;0>" See
also )spMaB3is$Template'ache2iles earlier in this section"
As-8:ecuteIn,TA" Set to 8 =enable> if errors or failures are detected while serving some of the )SP
content" This can happen& for eBample& when hosting multiple isolated sites where each site runs under its
own wor$er process" #rrors are typically reported from '-MH in the event viewer" This setting enables the
multithreaded apartment model in )SP =the default 0 means disable>"
As-ProcessorT'read,a:" .ncrease if the current setting =default 2;> is not sufficient to handle the
load =possibly resulting in errors serving some re9uests>
Centra!&inar$0ogging8nab!ed" #nable central binary logging by setting this parameter to T4<#"
?inary ..S logging reduces 'P< usage& dis$ .A- and dis$ space usage" 'entral binary logging is directed to
a single file& in binary format& regardless of the number of hosted sites" Parsing binary1format logs re9uires
a post1processing tool"
IIS (orker Process 7-tions )IIS Admin 3I. A--!ication Poo! Pro-erties*
The options for recycling ..S wor$er processes under the ..S )dmin <. provide practical solutions to
acute situations or events without the need for administrator intervention& service reset& or even
computer reset" Such situations and events include memory lea$s& increasing memory load or non1
responsive or idle wor$er processes" <nder normal conditions& recycling options may not be needed
and can be turned off =or the system can be configured to recycle very infre9uently>" .n the following
sections& bold names are per1app1pool variables" When using scripts to set these variables& use the
path A,MAW3S7'A)ppPoolsAn& where n is the application pool indeB"
There are three options& as the following tables describeE
/ec$c!ing o-tions. These are found on the /ec$c!ing tab"
Performance o-tions. These are found on the Performance tab"
(orker -rocess 'ea!t' monitoring o-tions. These are found on the 5ea!t' tab"
Performance Tuning Guidelines for Windows Server 2003 86
Microsoft

Windows Server

2003 White Paper


Tab!e +. /ec$c!ing 7-tions
Parameter #escri-tion
Periodic/estart/e;uests& 3W-43&
option disabled by default& default
value 3;000
Periodic recycling based on time
Periodic/estart/e;uests& 3W-43&
option disabled by default& default
value 3;000
Periodic recycling based on the =cumulative> number of re9uests
Periodic/estartSc'edu!e&
M<,T.SS& disabled by default& empty
string value
4ecycling at given time settings
=Periodic/estart,emor$.
3W-43& default value ;82 M?
Periodic/estartPri"ate,emor$&
3W-43& default value 8G2 M?
Memory1based recycling =disabled by default> allows recycling of a
wor$er process if it has reached eitherE
) maBimum amount of virtual memory
) maBimum amount of used memory
<nder continuously growing memory pressure it could be helpful to
allow fre9uent recycling of wor$er processes based on a tight1memory
criterion& using either or both of these parameters"
Tab!e A. Performance 7-tions
Parameter #escri-tion
Id!eTimeout& 3W-43& in minutes&
default 20
Shut down a wor$er process after being idle for more than a specified
amount of time" This can save some resources on limited1memory
systems but it is not recommended in situations that will re9uire
fre9uent spawning of new wor$er processes under heavy 'P< load&
because of the overhead associated with process creation"
A--Poo!6ueue0engt'& 3W-43&
default 2000
,imit the $ernel re9uest 9ueue length per )pp1Pool" 4e9uests consume
paged1pool& and this limit should be lowered under high demand for
paged1pool" #Bceeding the designated length will cause the server to
re%ect the re9uest with a non1customi@able error ;03"
C-uAccounting& ?--,#)(&
disabled =0> by default& 8 for enabled
Monitor 'P< usage" Fou can set the maBimum 'P< use by percentage
='pu,imit& 3W-43& default 0> and the refresh period to monitor it in
minutes ='pu4eset.nterval& 3W-43& default 0>" The options upon
reaching the 'P< usage limit are to ta$e no action =but write an event
to the event log> or to shut down the wor$er process ='P<)ction&
3W-43& default 0 for O(o actionP& maBimum 8 for OShutdown Wor$er
ProcessP>"
,a:Processes& defaultE 8 wor$er
process to handle all re9uests
Fou can control the total number of wor$er processes in Web Garden
mode of operation" .n Web Garden mode& several wor$er processes
handle the re9uest load under a single application pool" There is no
pre1assignment of wor$er processes to Web sites via different app1
pools" .n some cases one wor$er process is not enough to handle the
load =indicated by poor 'P< usage and long response times> and
increasing the number of wor$er processes may improve throughput
and 'P< usage" -ne case where Web Garden mode may be
considered is with hosting multiple sites" Multiple wor$er processes can
also offer more reliability in case of an incidental crash of one of them&
with little chance of total service disruption" Web garden mode is easier
Performance Tuning Guidelines for Windows Server 2003 8G
Microsoft

Windows Server

2003 White Paper


to set up and control than multiple pre1assigned application pools"
Tab!e 10. 5ea!t' 7-tions
Parameter #escri-tion
Pinging8nab!ed& ?--,#)(& default
8
PingInter"a!& 3W-43& default 30
seconds
Pinging wor$er processes =Pinging#nabled> periodically =Ping.nterval>"
.f not responding& the wor$er process is considered to be in a bad state
and ..S will attempt to terminate it and spawn another"
/a-idai!Protection& ?--,#)(&
default
/a-idai!Protection,a:Cras'es&
3W-43& default ; failures
/a-idai!ProtectionInter"a!&
3W-43& default ; minutes
'ontrol a rapid failure rate situation =4apid2ailProtection> by setting the
maBimum number of failures allowed =4apid2ailProtectionMaB'rashes>
within a given time span =4apid2ailProtection.nterval>" .f such a rate of
failures is recorded the application pool will be disabled& and will write
related event log messages"
Startu-Time0imit& 3W-43& default
G0 seconds
'ontrol the wor$er process startup limit period before considering it a
failure
S'utdownTime0imit& 3W-43&
default G0 seconds
'ontrol the wor$er process shutdown limit period before considering it
nonresponsive"
Secure Sockets 0a$er Tuning Parameters
Secure Soc$ets ,ayer =SS,> use imposes eBtra 'P< cost" The most eBpensive component of SS, is
the session establishment cost =involving a full handsha$e>& then reconnection cost and
encryptionAdecryption cost" 2or better SS, performance& do the followingE
#nable $eep1alives for SS, sessions" This eliminates the session establishment costs"
4euse sessions when appropriate =especially with non1$eep1alive traffic>"
(ote that larger $eys provide more security but also use more 'P< time"
(ote that not all components of your page may need to be encrypted" *owever& miBing plain *TTP
and *TTPS may result in a pop1up warning on the client1browser that not all content on the page is
secure"
ISAPI
(o special tuning parameters are needed for .S)P." .f writing a private .S)P. eBtension& ma$e sure to
code it efficiently for performance and resource use" See also -ther .ssues )ffecting ..S Performance
later in this document"
,anaged Code Tuning Parameters
Ma$e sure to precompile all scripts" This can be accomplished by calling one "(#T script in each
directory" 4eset ..S after compilation is complete" 4ecompile after changes to Machine"config&
Web"config or any "aspB script"
.f session state is not needed& ma$e sure to turn it off in each page"
When running multiple hosts containing )SP"(#T scripts in isolated mode =one application pool per
site> monitor the memory usage" Ma$e sure the ..S server has enough 4)M for the eBpected
Performance Tuning Guidelines for Windows Server 2003 20
Microsoft

Windows Server

2003 White Paper


number of concurrently running application pools" 'onsider using multiple app1domains in place of
multiple isolated processes"
7t'er Issues Affecting IIS Performance
Insta!!ing Non Cac'e4Aware i!ters. The installation of a filter that is non1*TTP1cache1aware will
cause ..S to disable caching altogether& resulting in a poor performance" -ld .S)P. filters =written
before ..S /"0> can cause this behavior" 2ilters that can operate with the *TTP cache can be
mar$ed cache1aware in the metabase"
CBI /e;uests. <se of 'G. applications for serving re9uests is not recommended under ..S for
performance reasons" 2re9uent creation =and deletion> of 'G. processes involves significant
overhead" ?etter alternatives include use of .S)P. application and )SP or )SP"(#T scripts"
.solation is available for each of these options"
NTS i!e S$stem Setting
<nder HKLM\System\CurrentControlSet\Control\:ileSystem\ is Ntfs#isab!e0astAccess3-date
=4#GN3W-43> 8"
This system1global switch reduces dis$ .A- load and latencies by disabling the updating of the date and
time stamp for the last file or directory access" This $ey needs to be addedD it does not eBist by default"
3isabling the updates is effective when used with large data sets =or a large number of hosts>
containing thousands of directories" .t is recommended that you use ..S logging instead if you maintain
this information for Web administration only"
(arning2 Some applications such as incremental bac$up utilities rely on this update information and cease
to function properly without it"
Tc-i-.s$s Performance Settings for IIS
See Performance Tuning for (etwor$ing earlier in this document"
Network Ada-ter Tuning and &inding for IIS
Ma$e sure all networ$ adapter settings are optimal"
?ind each networ$ adapter to a 'P< =the method to use depends on the number of networ$
adapters& the number of 'P<s and the number of ports per networ$ adapter>"
See also Performance Tuning for (etwor$ing earlier in this document"
Performance Tuning Guidelines for Windows Server 2003 28
Microsoft

Windows Server

2003 White Paper


Performance Tuning for i!e Ser"ers
Benera! Considerations
.t is important to select the right hardware to satisfy the eBpected file server load& $eeping in mind
average load& pea$ load& capacity& growth plans& and response times" *ardware bottlenec$s will limit
the effectiveness of software tuning"
'onsider the following issues when selecting hardware and setting up the operating system"
Tab!e 11. Se!ecting t'e /ig't 5ardware for Performance
Issue /ecommendation
(umber& type& and speed of
processors
,arger ,2 processor caches will provide better performance"
Two 'P<s will not be as fast as one 'P< that is twice as fast"
)mount of physical memory
=4)M>
When your computer is running low on memory and more is needed
immediately& Windows Server 2003 uses hard drive space to simulate
system 4)M" This is $nown as virtual memory& and is often called the
paging file"
Try to avoid having a pagefile on the same drive as the operating
system files"
)void putting a pagefile on a fault1tolerant drive& such as a mirrored
volume or a 4).31; volume" Pagefiles donTt need fault1tolerance& and some
fault1tolerant systems suffer from slow data writes because they write data
to multiple locations"
3onTt place multiple pagefiles on different partitions on the same
physical dis$ drive"
(umber& type& and speed of
networ$ adapters
The networ$ adapter should not be a bottlenec$" (ewer networ$
adapters can offload some server functions and help performance"
Ma$e sure all networ$ adapter settings are optimal"
?ind each networ$ adapter to a 'P< =the method depends on the
number of networ$ adapters& the number of 'P<Js and the number of ports
per networ$ adapter>"
2or details& see Performance Tuning for (etwor$ing earlier in this
document"
Type of dis$ controller& number of
physical dis$s and their overall
capacity
2ile Servers cache fre9uently accessed files in memory" *owever& files
that are not accessed fre9uently must come from dis$" *andling large
amounts of data with a high number of re9uests to a high number of files
re9uire good dis$ performance =4).3 controller connected to a large
number of dis$s>"
:eep the system page file& the operating system and the data on
separate physical dis$s if possible"
Ma$e sure the allocation unit si@e is appropriate for the si@e of the
volume"
Performance Tuning Guidelines for Windows Server 2003 22
Microsoft

Windows Server

2003 White Paper


Ser"er ,essage &!ock Ser"er ,ode!
The Server Message ?loc$ =SM?> model consists of two entities& the client and the server"
The client receives re9uests through the redirector =4dbss"sys and SM? mini1redirector MrBsmb"sys>
for files located on the server" .t uses the SM? protocol to send its re9uest through T'PA.P"
The server receives multiple re9uests from the clients through T'PA.P and routes the re9uests to the
local file system =(tfs"sys>& which accesses the storage stac$"
*i$ure > he SM# Model for Client@Server Co!!unication
Benera! Tuning Parameters for i!e Ser"ers
The following registry tuning parameters could affect performance of file servers"
PagedPoo!Si9e
HKLM\System\CurrentControlSet\Control\SessionMn1er\MemoryMn1ement\ (&E'_(!O&()
2ile cache space and paged pool space share a common area in system virtual address " ,imiting the
paged pool allows for a larger system cache& which causes more content to be cached and allows
faster serving of files"
Ntfs#isab!e+dot3NameCreation
HKLM\System\CurrentControlSet\Control\:ileSystem\ (&E'_(!O&()
3efault is 0" This parameter determines whether (T2S generates a short name in the 6"3 =3-S>
naming convention for long file names and for file names that contain characters from the eBtended
character set" .f the value of this entry is 0& files can potentially have two namesE the name that the user
specifies and the short name that (T2S generates" .f the name the user specifies conforms to the 6"3
naming convention& (T2S does not generate a short name"
Performance Tuning Guidelines for Windows Server 2003 23
tcpip"sys tcpip"sys
'lients
netbt"sys
srv"sys
ntfs"sys
dis$"sys
Server
)pplication
4dbss
"sys
MrBSmb"sy
s
Microsoft

Windows Server

2003 White Paper


'hanging this value does not change the contents of a file& but it avoids the short1name attribute
creation for the file& also changing the way (T2S displays and manages the file"
#isab!e!astaccess
HKLM\System\CurrentControlSet\Control\:ileSystem\3 (&E'_(!O&()
?y default& this registry $ey is not created"
.f you have an (T2S volume with a high number of folders or files& and a program is running that briefly
accesses each of these in turn& the .A- bandwidth used to generate the ,ast )ccess Time updates can
be a significant percentage of the overall .A- bandwidth" To increase the speed of access to a folder or
file& you can set disablelastaccess to disable updating the ,ast )ccess Time" )fter you use this
command and restart the computer& the ,ast )ccess Time is no longer updated" .f you create a new file&
the ,ast )ccess Time remains the same as the 2ile 'reation Time"
NumTcbTab!ePartitions
HKLM\system\CurrentControlSet\Services\Tcpip\Prmeters\3 (&E'_(!O&()
?y default this $ey is not created"
This parameter controls the number of T'? table partitions" The T'? table can be partitioned to
improve scalability on multiprocessor systems by reducing contention on the T'? table"
Tc-Ackre;uenc$
Note2 Tcp)c$2re9uency applies only to Windows Server 2003" The recommended setting for
Tcp)c$2re9uency is between one1third and one1half of TcpWindowSi@e"
2or Gigabit cardsE
HKLM\system\CurrentControlSet\Services\Tcpip\Prmeters\Inter4ces
2or each Gigabit adapter& addE
TcpAc<:re5uency (&E'_(!O&() = *+ ("eciml)
?y default this entry is not in the registry" .f only ac$ing data and not any control pac$ets& ac$ once
every 83 pac$ets& instead of the default of two" This helps reducing pac$et processing costs for the
(etwor$ Stac$& in the case of large writes =uploads> from the client into the server"
2or 2ast#thernet cardsE
HKLM\system\CurrentControlSet\Services\Tcpip\Prmeters\Inter4ces
2or each 2ast#thernet adapter& addE
TcpAc<:re5uency (&E'_(!O&() = 7 ("eciml)
?y default this entry is not in the registry" .f only ac$ing data and not any control pac$ets& ac$ once
every five pac$ets& instead of the default of two" This helps reducing pac$et processing costs for the
(etwor$ Stac$& in the case of large writes =uploads> from the client into the server"
Interru-t Affinit$
.nterrupt affinity means binding of interrupts from a specific device to specific processor=s> in a
multiprocessor server" This enforces running the .S4 and 3P' routines on the said processor=s>"
Performance Tuning Guidelines for Windows Server 2003 20
Microsoft

Windows Server

2003 White Paper


?ecause networ$ connections and file server sessions all stay on the same networ$ adapter& binding
interrupts from the networ$ adapter to a processor allows for processing incoming pac$ets =SM?
re9uests& data> on a specific set of processors& improving locality and scalability" Fou cannot configure
affinity on single1processor computers"
The .nterrupt1)ffinity 2ilter =.nt2iltr> tool allows you to change the 'P<1affinity of the interrupts in a
system"
<sing this utility& you can direct any deviceTs interrupts to a specific processor or set of processors =as
opposed to always sending interrupts to any of the 'P<s in the system>" (ote that different devices can
have different interrupt1affinity settings" This utility will wor$ on any server running Windows Server
2003& regardless of what processor or interrupt controller is used"
Benera! Tuning Parameters for C!ient Com-uters
#ormanti!e0imit
HKLM\system\CurrentControlSet\Services\lnmn#or<sttion\prmeters\ (&E'_(!O&()
?y default this registry $ey is not created" =Windows MP client computers only">
Specifies the maBimum number of files that should be left open on a share after the application has
closed the file"
Sca"engerTime0imit
HKLM\system\CurrentControlSet\Services\lnmn#or<sttion\prmeters\ (&E'_(!O&()
Windows MP client computers only"
The amount of time in seconds the redirector waits before it starts scavenging dormant file handles
=cached file handles that are not currently used by any application>"
#isab!e&$te/ange0ocking7n/ead7n!$i!es
HKLM\System\CurrentControlSet\Services\Lnmn!or<Sttion\Prmeters\ (&E'_(!O&()
Windows MP client computers only"
Some distributed applications that loc$ portions of a read1only file as synchroni@ation across clients
re9uire that file1handle caching and collapsing behavior be off for all read1only files" This parameter can
be set if such applications will not be run on the system and collapsing behavior can be enabled on the
client computer"
Tc-Ackre;uenc$
Note2 Tcp)c$2re9uency applies only to "MP 'lients " The recommended setting for Tcp)c$2re9uency is
between one1third and one1half of TcpWindowSi@e"
2or Gigabit cardsE
HKLM\system\CurrentControlSet\Services\Tcpip\Prmeters\Inter4ces
2or each Gigabit adapter& addE
TcpAc<:re5uency (&E'_(!O&() = *+ ("eciml)
Performance Tuning Guidelines for Windows Server 2003 2;
Microsoft

Windows Server

2003 White Paper


?y default this entry is not in the registry"
.f only ac$ing data and not any control pac$ets& ac$ once every 83 pac$ets& instead of the default of 2"
This helps reducing pac$et processing costs for the networ$ stac$ in the case of large writes =uploads>
from the client into the server"
2or 2ast#thernet cardsE
HKLM\system\CurrentControlSet\Services\Tcpip\Prmeters\Inter4ces
2or each 2ast#thernet adapter& addE
TcpAc<:re5uency (&E'_(!O&() = 7 ("eciml)
?y default this entry is not in the registry" .f only ac$ing data and not any control pac$ets& ac$ once
every ; pac$ets& instead of the default of 2" This helps reducing pac$et processing costs for the networ$
stac$ in the case of large writes =uploads> from the client into the server"
Performance Tuning Guidelines for Windows Server 2003 2/
Microsoft

Windows Server

2003 White Paper


Performance Tuning for Acti"e #irector$
,arge )ctive 3irectory

environments have a few special tuning re9uirements"


3sing t'e C3B& Switc' in t'e &oot.ini fi!e
-n server computers& a large 9uantity of memory is helpful in reducing dis$ .A- activity" <se of the A3G?
switch gives B6/ servers more user mode virtual space and allows )ctive 3irectory to improve its
caching"
Windows 2000 includes two settingsE
<sing the A3G? switch allows the main )ctive 3irectory cache a maBimum of 8020 M?"
Without the A3G? switch& the main )ctive 3irectory cache is limited to ;82 M?"
2or Windows Server 2003& the )ctive 3irectory cache is allowed to grow more freely but remains limited
by virtual address space"
Turning 7ff Signing and Sea!ing
'lient computers running Windows MP with Service Pac$ 8 =SP8> and higher& and servers running
Windows Server 2003 are capable of signing and sealing for improved security& and this is enabled by
default" Windows 2000 clients do not enable signing and sealing by default& although Windows 2000
with Service Pac$ 3 =SP3> has the option to turn it on" Production environments with a secured networ$
do not re9uire this setting to be enabled" The Windows Server 2003 family of operating systems
provides an option for disabling signing and sealing" Fou can find this setting atE
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\l"p\ l"pclientinte1rity = &E'_(!O&( 8-8
Performance Tuning Guidelines for Windows Server 2003 25
Microsoft

Windows Server

2003 White Paper


&enc'marking (eb (ork!oads )(eb&enc'*
'onsider using the following guidelines for benchmar$ing Web wor$loads
.solate the ..S server and other related computers from corporate networ$ traffic"
)llow sufficient warm1up time to get to a steady state"
Synchroni@e client cloc$s with the ..S server cloc$ to ensure proper benchmar$ing of time1
dependent re9uests"
2or best performance& turn all recycling& performance& and power options off in the ..S )dmin <.&
unless you encounter an acute situation where these options may help" 2or more information& see
Performance Tuning for ..S /"0 earlier in this document"
.f using SS,& select a reasonable and consistent $ey si@e"
Web?ench 0"8 provides a way to measure the performance of Web servers" Web?ench uses client
computers to simulate Web browsers" *owever& unli$e actual browsers& the clients donTt display the files
that the server sends in response to their re9uests" .nstead& when a client receives a response from the
server& it records the information associated with the response and then immediately sends another
re9uest to the server"
The following three tables list high1end and low1end server settings and client computer tuning
parameters"
Tab!e 12. 5ig'48nd Ser"er Settings
T$-e Setting
..S settings /egistr$ =under *:,MQSystemQ'urrent'ontrolSetAServicesQ.netinfoQParametersQ>
,a:Cac'edi!eSi9e =4#GN3W-43> 8006;5/
IIS ,etabase =under W3S7'A>
<se central binary logging by setting Centra!&inar$0ogging8nab!ed R T4<#
SS, tuning parametersE :ey si@e 8020 bytes" 2or competitive benchmar$ing&
use the same $ey si@e for all servers"
*ttp"sys settings /egistr$ =under *:,MQSystemQ'urrent'ontrolSetAServicesQ*TTPQParametersQ>
3ri,a:3ri&$tes =4#GN3W-43> 8006;5/ =largest file in the set>"
(T2S 2ile System
setting
/egistr$ =under *:,MQSystemQ'urrent'ontrolSetQ'ontrolQ2ileSystemQ>
(tfs3isable,ast)ccess<pdate =4#GN3W-43> 8
T'P.P"SFS
performance settings
for ..S
/egistr$ =under *:,MQSystemQ'urrent'ontrolSetQServicesQtcpipQparametersQ>
,a:5as'Tab!eSi9e =4#GN3W-43> 0Bffff
See also Performance Tuning for (etwor$ing earlier in this document"
(etwor$ adapter tuning
and binding for ..S
#ach networ$ adapter bounded to a 'P<"
See also Performance Tuning for (etwor$ing earlier in this document"
'haracteristics of low1end server settings include the followingE
Single processor& single networ$ adapter"
,imited physical memoryCat least 2;/ M?D typically ;82 M? 4)M"
Performance Tuning Guidelines for Windows Server 2003 26
Microsoft

Windows Server

2003 White Paper


Paging activity eBpected"
(ot recommended in the case of large number of )SP files or for memory1heavy dynamic content"
Tab!e 13. 0ow48nd Ser"er Settings
T$-e Setting
..S settings /egistr$ =under *:,MQSystemQ'urrent'ontrolSetAServicesQ.netinfoQParametersQ
>
,a:Cac'edi!eSi9e =4#GN3W-43> 8006;5/
,emCac'eSi9e =4#GN3W-43> 80
IIS ,etabase =under W3S7'A>
<se central binary logging by setting
Centra!&inar$0ogging8nab!ed R T4<#
*ttp"sys settings /egistr$ =under *:,MQSystemQ'urrent'ontrolSetQServicesQhttpQparametersQ>
3ri,a:3ri&$tes =4#GN3W-43> 8006;5/
/e;uest&uffer0ookaside#e-t' =4#GN3W-43> 2;/
Interna!/e;uest0ookaside#e-t' =4#GN3W-43> 2;/
0arge,em,egab$tes =4#GN3W-43> 8;0
(T2S file system
setting
/egistr$ =under *:,MQSystemQ'urrent'ontrolSetQ'ontrolQ2ileSystemQ>
Ntfs#isab!e0astAccess3-date =4#GN3W-43> 8
Tab!e 11. C!ient Com-uter Tuning Parameters
T$-e Setting
My 'omputer
Performance Settings
Processor scheduling optimi@ed for Programs
Memory usage optimi@ed for Programs
T'P.P"SFS
performance settings
for ..S
/egistr$ =under *:,MQSystemQ'urrent'ontrolSetQServicesQtcpipQparametersQ>
,a:3serPort =4#GN3W-43> 0Bfffe
,a:5as'Tab!eSi9e =4#GN3W-43> 0Bffff
Tc-(indowSi9e =4#GN3W-43> /;;3/ =ma$e the registry change on clients
e9uipped with 800 ?aseT #thernet networ$ adapters>
See also Performance Tuning for (etwor$ing in this document"
Performance Tuning Guidelines for Windows Server 2003 2G
Microsoft

Windows Server

2003 White Paper


&enc'marking i!e Ser"er (ork!oad )Net&enc'*
(et?ench 5"02 is a eTesting ,abs benchmar$ program that lets you measure the performance of file
servers as they handle networ$ file re9uests from clients" (et?ench provides you with an overall .A-
throughput score and average response time for your server and individual scores for the client
computers" Fou can use these scores to measure& analy@e& and predict how well your server can
handle file re9uests from clients" The data volumes are always formatted between tests to flush and
clean up the wor$ing set to ensure a fresh start" 2or improved performance and scalability& it is
recommended that client data be partitioned over multiple data volumes"
/egistr$ Tuning Parameters for Net&enc' on (indows Ser"er 2003
?e$ Setting
*:,MQSystemQ'urrent'ontrolSetQ'ontrolQSessionManagerQ
MemoryManagementQ
PagedPoo!Si9e R 8G2000000 =decimal> =defaultR0>
*:,MQSystemQ'urrent'ontrolSetQ'ontrolQ2ileSystemQ Ntfs#isab!e+dot3NameCreation R 8 =default is 0>
)dd 3isablelastaccess R 8
?y default this registry $ey is not created"
*:,MQSystemQ'urrent'ontrolSetQServicesQTcpipQParametersQ )dd NumTcbTab!ePartitions R 6
?y default this registry $ey is not created"
*:,MQSystemQ'urrent'ontrolSetQServicesQTcpipQParametersQ
.nterfacesQ
)dd Tc-Ackre;uenc$ =4#GN3W-43> R 83
=decimal> for each Gigabit networ$ adapter"
?y default this registry $ey is not created" 2or
2ast#thernet adapters set this parameter to ;"
/egistr$ Tuning Parameters for Net&enc' on C!ient Com-uters
?e$ Setting
*:,MQSystemQ'urrent'ontrolSetQServicesQ
,anmanWor$StationQParametersQ
#isab!e&$te/ange0ocking7n/ead7n!$i!es R 8D
Windows MP client computers
*:,MQsystemQ'urrent'ontrolSetQServicesQTcpipQParametersQ
.nterfacesQ
Add Tc-Ackre;uenc$ R 83 =decimal> for each
Gigabit networ$ adapter"
?y default this registry $ey is not created" 2or
2ast#thernet adapters set this parameter to ;"
*:,MQsystemQ'urrent'ontrolSetQServicesQlanmanwor$stationQ
parametersQ
)dd #ormanti!e0imit R 800 =decimal>"
?y default this registry $ey is not createdD Windows
MP client computers"
*:,MQSystemQ'urrent'ontrolSetQServicesQlanmanwor$stationQ
parametersQ
Sca"engerTime0imit R 800 =decimal>D Windows
MP client computers"
Performance Tuning Guidelines for Windows Server 2003 30
Microsoft

Windows Server

2003 White Paper


&enc'marking Acti"e #irector$ (ork!oad )#irector$,ark*
The following tunings are useful for benchmar$ing the 3irectoryMar$ Wor$load" 3irectoryMar$ tests are
best run from a powerful client to a big server" This allows the operator to start large numbers of
threads& and still receive central data reports" This setup re9uires a Gigabit networ$ adaptor&
approBimately e9ual1powered clients and servers& and a server with at least 2 G? of memory"
Add Inde: for #escri-tion Attribute )Ser"er*
<se schema editor to add an indeB for the description attribute& which is used in the 3irectoryMar$
)ddressing and Messaging Search MiBes"
Turn 7ff Auto #efragmenter
-n a server& )uto 3efragmenter starts 8; minutes after startup& runs for an hour& and then restarts
every 82 hours" ?enchmar$ing environments re9uire reproducible results& so it is recommended that
)uto 3efragmenter be turned off to avoid any possible interference with a running benchmar$" The
defragmenter pass can be seen in the event logs if the )uto 3efragmenter remains enabled"
The following registry parameter is used for turning off )uto 3efragmenterE
HKLM\SYSTEM\CurrentControlSet\Services\NT(S\Prmeters\(SA Heuristics = &E'_S> 88888*
Increase ,a:3serPorts and Tc-(indowSi9e in TCPCIP
*eavy use of ,3)P ?inds re9uires eBtensive use of dynamic ports" T'P is re9uired on server and client
computers to hold these ports open for a few minutes& thus re9uiring more MaB<serPorts available than
are actually used"
Fou can ad%ust the following registry parametersE
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Prmeters\M-0serPort = &E'_(!O&( 8-?4e
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Prmeters\Tcp!in"o#Si$e = &E'_(!O&( 8-??
Performance Tuning Guidelines for Windows Server 2003 38
Microsoft

Windows Server

2003 White Paper


&enc'marking Networking (ork!oads )Ttc-. C'ariot*
Tuning for NTttc-
(Tttcp is a Winsoc$Ubased port of ttcp to Windows" .t helps measure networ$ driver performance and
throughput on different networ$ topologies and hardware setups" .t provides the customer with a
multithreaded& asynchronous performance benchmar$ for measuring achievable data transfer rate on
an eBisting networ$ setup"
-ptionsE
) single thread should suffice for optimal throughput"
Multiple threads are needed only in the case of single to many clients"
Posting enough user receive buffers =using the O1aP option> alleviates T'P copying"
Fou should not eBcessively post user receive buffers& because the first ones posted would return
before you have the need to use other buffers"
.tJs best to bind each set of threads to a processor =second delimited parameter in O1mP option>"
#ach thread creates a soc$et that connects =listens> on a different port"
Tab!e 1<. 8:am-!e S$nta: for NTttc-Sender and /ecei"er
S$nta: #etai!s
8:am-!e S$nta: for a Sender
(Tttcps Um 8&0&80"8"2"3 Ua 2
Single thread
?ound to 'P< 0
'onnecting to computer with .P 80"8"2"3
Posting two send overlapped buffers
3efault buffer si@eE /0 :?
3efault buffer numberE 20 :?
8:am-!e S$nta: for a /ecei"er
(Tttcpr Um 8&0&80"8"2"3 Ua / Ut 8000
Single thread
?ound to 'P< 0
'onnecting to computer with .P 80"8"2"3
Posting two send overlapped buffers
3efault buffer si@eE /0 :?
3efault buffer numberE 20 :?
Network Ada-ter
Ma$e sure you enable all offloading features"
TCP
Set Tc-(indowSi9e to something larger than the default value for Gigabit #thernet =/0 :?> only if you
have a large bandwidth1delay product"
2or eBample& using the .ntel MT Gigabit card on a ,)(& you would leave all networ$ adapter and T'P
settings at their default values for (Tttcp"
Performance Tuning Guidelines for Windows Server 2003 32
Microsoft

Windows Server

2003 White Paper


The .ntel MT networ$ adapter offloads ,S- and chec$sum =send as well as receive> by default"
The .ntel MT networ$ adapter adaptively manages its resources and you will not need to change
any networ$ adapter resource values"
Coalesce #uffers is not eBposed& but the default interrupt moderation scheme wor$s well"
Tuning for C'ariot
'hariot is a networ$ing wor$load generator from (et.+" .t stresses the networ$ to help predict
networ$ed application performance"
The *ighNPerformanceNThroughput script wor$load of 'hariot may be used to simulate the (Tttcp
wor$load" The tuning considerations for this wor$load would the same as those for (Tttcp"
Performance Tuning Guidelines for Windows Server 2003 33
Microsoft

Windows Server

2003 White Paper


/e!ated 0inks
See the following resources for further informationE
Transaction Processing Performance 'ouncil Web site at www"tpc"org"
,ab 4eportE Windows Server 2003 -utperforms Predecessors at
httpEAAwww"microsoft"comAwindowsserver2003AevaluationAperformanceAetest"mspB"
Performance and Scalability on the Windows Server 2003 Web site at
httpEAAwww"microsoft"comAwindowsserver2003AevaluationAperformanceAdefault"mspB"
2or the latest information about Windows Server 2003& see the Windows Server 2003 Web site at
httpEAAwww"microsoft"comAwindowsserver2003"
Performance Tuning Guidelines for Windows Server 2003 30

Vous aimerez peut-être aussi