Source code of Windows XP (NT5)
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.

202 lines
8.4 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. LargeBufferSize, REG_DWORD, default = 3876
  7. the size in bytes of large buffers used by AFD. smaller values use
  8. less memory, larger values can improve performance.
  9. LargBufferListDepth, REG_DWORD, default = 0/2/10
  10. the maximum count of large buffers that AFD keeps in reserve. larger
  11. numbers give better performance at the cost of physical memory.
  12. MediumBufferSize, REG_DWORD, default = 1504
  13. size of medium buffers.
  14. MediumBufferListDepth, REG_DWORD, default = 4/8/16
  15. max count of medium buffers in reserve.
  16. SmallBufferSize, REG_DWORD, default = 128
  17. SmallBufferListDepth, REG_DWORD, default = 8/16/16
  18. FastSendDatagramThreshold, REG_DWORD, default = 1024
  19. datagrams smaller than this get bufferred on send, larger ones are
  20. pended. the default value was found by testing to be the best
  21. overall value for performance. it is unlikely that anyone would want
  22. to change this.
  23. StandardAddressLength, REG_DWORD, default = 24
  24. the length of TDI addresses typically used for the machine. if the
  25. customer has a transport protocol like TP4 which uses very long
  26. addresses, then increasing this value will result in a slight
  27. performance improvement.
  28. DefaultReceiveWindow, REG_DWORD, default = 8192
  29. the number of receive bytes AFD will buffer on a connection before
  30. imposing flow control. for some applications, a larger value here
  31. will give slightly better performance at the expense of increases
  32. resource utilization. note that applications can modify this value
  33. on a per-socket basis with the SO_RCVBUF socket option.
  34. DefaultSendWindow, REG_DWORD, default = 8192
  35. as with DefaultReceiveWindow, but for the send side of connections.
  36. BufferMultiplier, REG_DWORD, default = 512
  37. DefaultReceiveWindow and DefaultSendWindow get divided by this value
  38. to determine how many massages can be sent/received before flow
  39. control is imposed.
  40. PriorityBoost, REG_DWORD, default = 2
  41. the priority boost AFD gives to a thread when it completes I/O for
  42. that thread. if a multithreaded application experiences starvation
  43. of some threads, reducing this value may remedy the problem.
  44. IrpStackSize, REG_DWORD, default = 4
  45. the count of IRP stack locations used by default for AFD. users
  46. shouldn't need to change this.
  47. TransmitIoLength, REG_DWORD, default = PAGE_SIZE,PAGE_SIZE*2,65536
  48. the default size for I/O (reads and sends) performed by TransmitFile().
  49. Note that for the NT workstation product, the default I/O size is
  50. exactly one page.
  51. IgnorePushBitOnReceives, REG_DWORD, default = 0
  52. If this value is zero (the default) and the TCP push bit is set on a
  53. receive indication, then a larger then necessary buffer is passed down
  54. to the TCP stack. This often gives a performance boost on receives.
  55. If this value is non-zero, then the TCP push bit is ignored (this was
  56. the behaviour of NT 3.1).
  57. MaxActiveTransmitFileCount, REG_DWORD, default = 0
  58. This value controls the maximum number of simultaneous TransmitFile
  59. operations allowed. This registry value is only honored in the NT
  60. Server product; NT Workstations always use a hardcoded (not configurable)
  61. value.
  62. MaxFastTransmit, REG_DWORD, default = 65536
  63. This is the threshold count, in bytes, for the TransmitFile fast path to
  64. fail. If the caller requests a send larger than this, it will never
  65. go through the TransmitFile fast path.
  66. MaxFastCopyTransmit, REG_DWORD, default = 3876
  67. If a TransmitFile caller requests a send smaller than this size, the
  68. operation is performed by doing a data copy from the file data to a system
  69. buffer. This is slightly faster than direct I/O for small files, but for
  70. larger files the copy overhead overwhelms the inherent efficiency of the
  71. copy operation.
  72. TransmitWorker, REG_DWORD, default=0x10
  73. Specifies how afd should schedule work items to process long
  74. (more than one send) transmit file request. By default (0x10)
  75. afd uses system worker threads, with 0x20 it will use kernel
  76. APC's in the context of the thread that initiated the request.
  77. 0x20 reduces number of context switches and potentially improves
  78. performance, however, if thread that originated TransmitFile
  79. request is used for heavy computation, it may not be interrupted
  80. by the OS scheduler for significant period of time (up to a full
  81. quantum) and APC will not get processed thus starwing request
  82. processing
  83. DisableRawSecurity, REG_DWORD default = 0;
  84. Non-zero value tells afd to not require admin privilege
  85. to open a raw socket.
  86. DisableAddressSharing, REG_DWORD, default = 0
  87. Disallows sharing of ports between processes even if application
  88. specifies SO_REUSEADDR in an attempt to hajack some other
  89. application's port. Setting this flag will tighten security
  90. although at the expense of additional checking for each created
  91. socket as well as possibility of breaking some application which
  92. require socket sharing accross processes
  93. EnableDynamicBacklog, REG_DWORD, default = 0
  94. Enables dynamic backlog algorithm on listening endpoints in
  95. an attempt to thwart off syn attacks: //
  96. If the free connection count has dropped below the configured
  97. minimum, the number of "quasi-free" connections is less than
  98. the configured maximum, and we haven't already queued enough
  99. requests to take us past the maximum, then add new free
  100. connections to the endpoint. "Quasi-free" is defined as the
  101. sum of the free connection count and the count of pending TDI
  102. accepts.
  103. MinimumDynamicBacklog, REG_DWORD, default = 0
  104. MaximumDynamicBacklog, REG_DWORD, default = 0
  105. DynamicBacklogGrowthDelta, REG_DWORD, default = 0
  106. Parameters in the algorithm described above.
  107. *********** THE KEYS BELOW SHOULD NO LONGER BE RELEVANT *********
  108. (however, some code may be still using them)
  109. *********** SEE WINSOCK2 SPECIFICATION **************************
  110. **** the following keys are used by the RNR (service resolution and
  111. registration) apis in winsock. these are all just "pointers" to
  112. other stuff in the registry. users should never need to change
  113. these.
  114. under CurrentControlSet\Control\ServiceProvider\Order, values:
  115. ExcludedProviders: a REG_MULTI_SZ that contains decimal values
  116. corresponding to name space providers that should be excluded.
  117. default is an empty set. some name space provider decimal values
  118. include:
  119. #define NS_SAP (1)
  120. #define NS_NDS (2)
  121. #define NS_TCPIP_LOCAL (10)
  122. #define NS_TCPIP_HOSTS (11)
  123. #define NS_DNS (12)
  124. #define NS_NETBT (13)
  125. #define NS_WINS (14)
  126. #define NS_NBP (20)
  127. #define NS_MS (30)
  128. #define NS_STDA (31)
  129. #define NS_NTDS (32)
  130. #define NS_X500 (40)
  131. #define NS_NIS (41)
  132. for example, setting ExcludedProviders to "1" "12" means that
  133. GetAddressByName() will not attempt to use SAP or DNS when doing
  134. typical name resolution operations.
  135. ProviderOrder: a REG_MULTI_SZ that contains strings corresponding to
  136. keys under CurrentControlSet\Services. these keys must have a
  137. ServiceProvider subkey which provides information about the name
  138. space provider, especially Class and ProviderPath values.
  139. **** the following values are relevent to TCP/IP name resolution
  140. (gethostbyname()) and the GetAddressByName() API. under
  141. Services\Tcpip\ServiceProvider:
  142. Class, REG_DWORD, default = 8. should never change--this indicates
  143. that TCPIP is a name service provider.
  144. DnsPriority, REG_DWORD, default = 0x7D0
  145. HostsPriority, REG_DWORD, default = 0x1F4
  146. LocalPriority, REG_DWORD, default = 0x1F3
  147. NetbtPriority, REG_DWORD, default = 0x7D1
  148. these priority values are used to determine the order of name
  149. resolutions. low priority mechanisms are used first, so the default
  150. order is local, hosts, dns, netbt. if someone wants a different name
  151. resolution order, readjust the priority values as needed. note that
  152. values under 1000 decimal are considered "fast" name resolution
  153. providers, so putting network-based resolution mechanisms like dns
  154. and netbt at values under 1000 may have weird effects.
  155. Name, REG_SZ, default = "TCP/IP"
  156. no need to change.
  157. ProviderPath, REG_SZ, default = "%SystemRoot%\System32\wsock32.dll"
  158. points to the dll that does tcpip name resolution. there is no need
  159. to change this.
  160. **** there are other keys associated with netware name resolution.
  161. chuck chan will comment on their names and meaning.