Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

252 lines
11 KiB

  1. note: for items where i give three default values, the first is for
  2. small machines (<12.5 MB), the second is medium machines (12.5 to 20
  3. MB) and the third is for large machines (> 20 MB).
  4. **** AFD is the driver which handles winsock. the following values
  5. may be set under Services\Afd\Parameters:
  6. BufferAlignment, REG_DWORD - must be power of 2 and less then
  7. PAGE_SIZE, default = provided by kernel(actually hal)
  8. via KeGetRecommendedSharedDataAlignment.
  9. Afd aligns all of its buffers allocated from non-page pool
  10. to this value to avoid DMA's of misaligned buffers by the NIC.
  11. IrpStackSize, REG_DWORD, default = 4
  12. The count of IRP stack locations used by default for AFD. Users
  13. shouldn't need to change this.
  14. PriorityBoost, REG_DWORD - 0-16, default = 2
  15. The priority boost AFD gives to a thread when it completes I/O for
  16. that thread. If a multithreaded application experiences starvation
  17. of some threads, reducing this value may remedy the problem.
  18. IgnorePushBitOnReceives, REG_DWORD, default = 0
  19. If this value is zero (the default) and the TCP push bit is set on a
  20. receive indication, then a larger then necessary buffer is passed down
  21. to the TCP stack. This often gives a performance boost on receives.
  22. If this value is non-zero, then the TCP push bit is ignored (this was
  23. the behaviour of NT 3.1).
  24. DisableRawSecurity, REG_DWORD default = 0;
  25. Non-zero value tells afd to not require admin privilege
  26. to open a raw socket. This only has effect for TDI transports that do
  27. not do their own security checking (don't have TDI_SERVICE_FORCE_ACCESS_CHECK
  28. flag set in their provider information structure).
  29. DisableAddressSharing, REG_DWORD, default = 0
  30. Disallows sharing of ports between processes even if application
  31. specifies SO_REUSEADDR in an attempt to hajack some other
  32. application's port. Setting this flag will tighten security
  33. although at the expense of additional checking for each created
  34. socket as well as possibility of breaking some application which
  35. require socket sharing across processes
  36. DisableDirectAcceptEx, REG_DWORD, default = 0
  37. If non-0, disables using IO subsystem IRPs to accept transport indicated
  38. connection requests. Some transport do not handle cancel semantics
  39. correctly, this setting might solve the problem if transport hangs
  40. the application and eventually bugchecks the system when processing
  41. accept IRP.
  42. DisableChainedReceive, REG_DWORD, default = 0
  43. If non-0, disable registering ChainedReceive indication handler with transport.
  44. Can be used to avoid problems with NIC/transport drivers that
  45. incorrectly implement NDIS full packet/TDI chained receive indication.
  46. UseTdiSendInDisconnect, REG_DWORD, default = 0
  47. If non-0, disables using TDI_SEND_AND_DISCONNECT flag when submitting
  48. last buffer in TransmitFile/TransmitPackets API. Can be used to avoid
  49. problems with transport drivers that do not implement this correctly
  50. (e.g. TDI filters).
  51. StandardAddressLength, REG_DWORD, default = 24
  52. The length of TDI addresses typically used for the machine (geared
  53. towards IPv4). If the customer has a transport protocol like TP4
  54. or IPv6 which uses very long addresses, then increasing this value will
  55. result in a slight performance improvement.
  56. DefaultReceiveWindow, REG_DWORD, default = 8192
  57. The number of receive bytes AFD will buffer on a connection before
  58. imposing flow control. For some applications, a larger value here
  59. will give slightly better performance at the expense of increases
  60. resource utilization. Note that applications can modify this value
  61. on a per-socket basis with the SO_RCVBUF socket option.
  62. DefaultSendWindow, REG_DWORD, default = 8192
  63. As with DefaultReceiveWindow, but for the send side of connections.
  64. LargeBufferSize, REG_DWORD, default = 3876
  65. The size in bytes of large buffers used by AFD. smaller values use
  66. less memory, larger values can improve performance.
  67. LargBufferListDepth, REG_DWORD, default = 0/2/10
  68. The initial maximum count of large buffers that AFD keeps in reserve. larger
  69. numbers give better performance at the cost of physical memory.
  70. Kernel adjust this value using algorithm that sample allocation and
  71. reuse frequencies, so initial value has very little if any effect.
  72. MediumBufferSize, REG_DWORD, default = 1504
  73. Size of medium buffers.
  74. MediumBufferListDepth, REG_DWORD, default = 4/8/16
  75. Initial max count of medium buffers in reserve.
  76. SmallBufferSize, REG_DWORD, default = 128
  77. Size of small buffers.
  78. SmallBufferListDepth, REG_DWORD, default = 8/16/16
  79. Initial max count of medium buffers in reserve
  80. MaxActiveTransmitFileCount, REG_DWORD, default = 0
  81. This value controls the maximum number of simultaneous TransmitFile
  82. operations allowed. This registry value is only honored in the NT
  83. Server product; NT Workstations always use a hardcoded (not configurable)
  84. value.
  85. DefaultPacketElementCount, REG_DWORD, default = 3.
  86. Default number of packets allocated for TransmitPackets request.
  87. The default of 3 is targetted for optimal support TransmitFile
  88. which has header, body, and trailer.
  89. TransmitWorker, REG_DWORD, default=0x10
  90. Specifies how afd should schedule work items to process long
  91. (more than one send) transmit file request. By default (0x10)
  92. afd uses system worker threads, with 0x20 it will use kernel
  93. APC's in the context of the thread that initiated the request.
  94. 0x20 reduces number of context switches and potentially improves
  95. performance, however, if thread that originated TransmitFile
  96. request is used for heavy computation, it may not be interrupted
  97. by the OS scheduler for significant period of time (up to a full
  98. quantum) and APC will not get processed thus starwing request
  99. processing
  100. EnableDynamicBacklog, REG_DWORD, default = 0
  101. Enables dynamic backlog algorithm on listening endpoints in
  102. an attempt to thwart off syn attacks: //
  103. If the free connection count has dropped below the configured
  104. minimum, the number of "quasi-free" connections is less than
  105. the configured maximum, and we haven't already queued enough
  106. requests to take us past the maximum, then add new free
  107. connections to the endpoint. "Quasi-free" is defined as the
  108. sum of the free connection count and the count of pending TDI
  109. accepts.
  110. MinimumDynamicBacklog, REG_DWORD, default = 0
  111. MaximumDynamicBacklog, REG_DWORD, default = 0
  112. DynamicBacklogGrowthDelta, REG_DWORD, default = 0
  113. Parameters in the algorithm described above.
  114. VolatileParameters, REG_DWORD, default = 0
  115. Non-0 value makes AFD watch its parameter key for any changes and
  116. dynamically re-read them without need to restart the AFD (via
  117. system reboot). Only the Threshold values listed below are affected
  118. by this (changes in other values are ignored until AFD is restarted).
  119. BlockingSendCopyThreshold, REG_DWORD, default = 64k
  120. Blocking and overlapped sends with length above double this value
  121. will be split in two, with first part sent directly from application
  122. buffers and second part with the length of this threshold copied and
  123. sent out of the non-paged pool. This is used to avoid allocating
  124. huge amount of non-paged pool for applications that do large sends
  125. without disabling send buffering.
  126. FastSendDatagramThreshold, REG_DWORD, default = 1024
  127. Datagrams smaller than this get bufferred on send, larger ones are
  128. pended. The default value was found by testing to be the best
  129. overall value for performance.
  130. PacketFragmentCopyThreshold, REG_DWORD, default = 1504
  131. TransmitPacket elements smaller than this get bufferred on send,
  132. larger ones are sent directly from the application buffer. The default
  133. value was found by testing to be the best overall value for performance.
  134. TransmitIoLength, REG_DWORD, default = PAGE_SIZE,PAGE_SIZE*2,65536
  135. the default size for I/O (reads and sends) performed by TransmitFile().
  136. Note that for the NT workstation product, the default I/O size is
  137. exactly one page.
  138. MaxFastTransmit, REG_DWORD, default = 65536
  139. This is the threshold count, in bytes, for the TransmitFile fast path to
  140. fail. If the caller requests a send larger than this, it will never
  141. go through the TransmitFile fast path.
  142. MaxFastCopyTransmit, REG_DWORD, default = 3876
  143. If a TransmitFile caller requests a send smaller than this size, the
  144. operation is performed by doing a data copy from the file data to a system
  145. buffer. This is slightly faster than direct I/O for small files, but for
  146. larger files the copy overhead overwhelms the inherent efficiency of the
  147. copy operation.
  148. *********** THE KEYS BELOW SHOULD NO LONGER BE RELEVANT *********
  149. (however, some code may be still using them)
  150. *********** SEE WINSOCK2 SPECIFICATION **************************
  151. **** the following keys are used by the RNR (service resolution and
  152. registration) apis in winsock. these are all just "pointers" to
  153. other stuff in the registry. users should never need to change
  154. these.
  155. under CurrentControlSet\Control\ServiceProvider\Order, values:
  156. ExcludedProviders: a REG_MULTI_SZ that contains decimal values
  157. corresponding to name space providers that should be excluded.
  158. default is an empty set. some name space provider decimal values
  159. include:
  160. #define NS_SAP (1)
  161. #define NS_NDS (2)
  162. #define NS_TCPIP_LOCAL (10)
  163. #define NS_TCPIP_HOSTS (11)
  164. #define NS_DNS (12)
  165. #define NS_NETBT (13)
  166. #define NS_WINS (14)
  167. #define NS_NBP (20)
  168. #define NS_MS (30)
  169. #define NS_STDA (31)
  170. #define NS_NTDS (32)
  171. #define NS_X500 (40)
  172. #define NS_NIS (41)
  173. for example, setting ExcludedProviders to "1" "12" means that
  174. GetAddressByName() will not attempt to use SAP or DNS when doing
  175. typical name resolution operations.
  176. ProviderOrder: a REG_MULTI_SZ that contains strings corresponding to
  177. keys under CurrentControlSet\Services. these keys must have a
  178. ServiceProvider subkey which provides information about the name
  179. space provider, especially Class and ProviderPath values.
  180. **** the following values are relevent to TCP/IP name resolution
  181. (gethostbyname()) and the GetAddressByName() API. under
  182. Services\Tcpip\ServiceProvider:
  183. Class, REG_DWORD, default = 8. should never change--this indicates
  184. that TCPIP is a name service provider.
  185. DnsPriority, REG_DWORD, default = 0x7D0
  186. HostsPriority, REG_DWORD, default = 0x1F4
  187. LocalPriority, REG_DWORD, default = 0x1F3
  188. NetbtPriority, REG_DWORD, default = 0x7D1
  189. these priority values are used to determine the order of name
  190. resolutions. low priority mechanisms are used first, so the default
  191. order is local, hosts, dns, netbt. if someone wants a different name
  192. resolution order, readjust the priority values as needed. note that
  193. values under 1000 decimal are considered "fast" name resolution
  194. providers, so putting network-based resolution mechanisms like dns
  195. and netbt at values under 1000 may have weird effects.
  196. Name, REG_SZ, default = "TCP/IP"
  197. no need to change.
  198. ProviderPath, REG_SZ, default = "%SystemRoot%\System32\wsock32.dll"
  199. points to the dll that does tcpip name resolution. there is no need
  200. to change this.
  201. **** there are other keys associated with netware name resolution.
  202. chuck chan will comment on their names and meaning.