windows-nt/Source/XPSP1/NT/net/sockets/winsock2/wsp/afdsys/registry.txt
2020-09-26 16:20:57 +08:00

203 lines
8.4 KiB
Plaintext

note: for items where i give three default values, the first is for
small machines (<12.5 MB), the second is medium machines (12.5 to 20
MB) and the third is for large machines (> 20 MB).
**** AFD is the driver which handles winsock. the following values
may be set under Services\Afd\Parameters:
LargeBufferSize, REG_DWORD, default = 3876
the size in bytes of large buffers used by AFD. smaller values use
less memory, larger values can improve performance.
LargBufferListDepth, REG_DWORD, default = 0/2/10
the maximum count of large buffers that AFD keeps in reserve. larger
numbers give better performance at the cost of physical memory.
MediumBufferSize, REG_DWORD, default = 1504
size of medium buffers.
MediumBufferListDepth, REG_DWORD, default = 4/8/16
max count of medium buffers in reserve.
SmallBufferSize, REG_DWORD, default = 128
SmallBufferListDepth, REG_DWORD, default = 8/16/16
FastSendDatagramThreshold, REG_DWORD, default = 1024
datagrams smaller than this get bufferred on send, larger ones are
pended. the default value was found by testing to be the best
overall value for performance. it is unlikely that anyone would want
to change this.
StandardAddressLength, REG_DWORD, default = 24
the length of TDI addresses typically used for the machine. if the
customer has a transport protocol like TP4 which uses very long
addresses, then increasing this value will result in a slight
performance improvement.
DefaultReceiveWindow, REG_DWORD, default = 8192
the number of receive bytes AFD will buffer on a connection before
imposing flow control. for some applications, a larger value here
will give slightly better performance at the expense of increases
resource utilization. note that applications can modify this value
on a per-socket basis with the SO_RCVBUF socket option.
DefaultSendWindow, REG_DWORD, default = 8192
as with DefaultReceiveWindow, but for the send side of connections.
BufferMultiplier, REG_DWORD, default = 512
DefaultReceiveWindow and DefaultSendWindow get divided by this value
to determine how many massages can be sent/received before flow
control is imposed.
PriorityBoost, REG_DWORD, default = 2
the priority boost AFD gives to a thread when it completes I/O for
that thread. if a multithreaded application experiences starvation
of some threads, reducing this value may remedy the problem.
IrpStackSize, REG_DWORD, default = 4
the count of IRP stack locations used by default for AFD. users
shouldn't need to change this.
TransmitIoLength, REG_DWORD, default = PAGE_SIZE,PAGE_SIZE*2,65536
the default size for I/O (reads and sends) performed by TransmitFile().
Note that for the NT workstation product, the default I/O size is
exactly one page.
IgnorePushBitOnReceives, REG_DWORD, default = 0
If this value is zero (the default) and the TCP push bit is set on a
receive indication, then a larger then necessary buffer is passed down
to the TCP stack. This often gives a performance boost on receives.
If this value is non-zero, then the TCP push bit is ignored (this was
the behaviour of NT 3.1).
MaxActiveTransmitFileCount, REG_DWORD, default = 0
This value controls the maximum number of simultaneous TransmitFile
operations allowed. This registry value is only honored in the NT
Server product; NT Workstations always use a hardcoded (not configurable)
value.
MaxFastTransmit, REG_DWORD, default = 65536
This is the threshold count, in bytes, for the TransmitFile fast path to
fail. If the caller requests a send larger than this, it will never
go through the TransmitFile fast path.
MaxFastCopyTransmit, REG_DWORD, default = 3876
If a TransmitFile caller requests a send smaller than this size, the
operation is performed by doing a data copy from the file data to a system
buffer. This is slightly faster than direct I/O for small files, but for
larger files the copy overhead overwhelms the inherent efficiency of the
copy operation.
TransmitWorker, REG_DWORD, default=0x10
Specifies how afd should schedule work items to process long
(more than one send) transmit file request. By default (0x10)
afd uses system worker threads, with 0x20 it will use kernel
APC's in the context of the thread that initiated the request.
0x20 reduces number of context switches and potentially improves
performance, however, if thread that originated TransmitFile
request is used for heavy computation, it may not be interrupted
by the OS scheduler for significant period of time (up to a full
quantum) and APC will not get processed thus starwing request
processing
DisableRawSecurity, REG_DWORD default = 0;
Non-zero value tells afd to not require admin privilege
to open a raw socket.
DisableAddressSharing, REG_DWORD, default = 0
Disallows sharing of ports between processes even if application
specifies SO_REUSEADDR in an attempt to hajack some other
application's port. Setting this flag will tighten security
although at the expense of additional checking for each created
socket as well as possibility of breaking some application which
require socket sharing accross processes
EnableDynamicBacklog, REG_DWORD, default = 0
Enables dynamic backlog algorithm on listening endpoints in
an attempt to thwart off syn attacks: //
If the free connection count has dropped below the configured
minimum, the number of "quasi-free" connections is less than
the configured maximum, and we haven't already queued enough
requests to take us past the maximum, then add new free
connections to the endpoint. "Quasi-free" is defined as the
sum of the free connection count and the count of pending TDI
accepts.
MinimumDynamicBacklog, REG_DWORD, default = 0
MaximumDynamicBacklog, REG_DWORD, default = 0
DynamicBacklogGrowthDelta, REG_DWORD, default = 0
Parameters in the algorithm described above.
*********** THE KEYS BELOW SHOULD NO LONGER BE RELEVANT *********
(however, some code may be still using them)
*********** SEE WINSOCK2 SPECIFICATION **************************
**** the following keys are used by the RNR (service resolution and
registration) apis in winsock. these are all just "pointers" to
other stuff in the registry. users should never need to change
these.
under CurrentControlSet\Control\ServiceProvider\Order, values:
ExcludedProviders: a REG_MULTI_SZ that contains decimal values
corresponding to name space providers that should be excluded.
default is an empty set. some name space provider decimal values
include:
#define NS_SAP (1)
#define NS_NDS (2)
#define NS_TCPIP_LOCAL (10)
#define NS_TCPIP_HOSTS (11)
#define NS_DNS (12)
#define NS_NETBT (13)
#define NS_WINS (14)
#define NS_NBP (20)
#define NS_MS (30)
#define NS_STDA (31)
#define NS_NTDS (32)
#define NS_X500 (40)
#define NS_NIS (41)
for example, setting ExcludedProviders to "1" "12" means that
GetAddressByName() will not attempt to use SAP or DNS when doing
typical name resolution operations.
ProviderOrder: a REG_MULTI_SZ that contains strings corresponding to
keys under CurrentControlSet\Services. these keys must have a
ServiceProvider subkey which provides information about the name
space provider, especially Class and ProviderPath values.
**** the following values are relevent to TCP/IP name resolution
(gethostbyname()) and the GetAddressByName() API. under
Services\Tcpip\ServiceProvider:
Class, REG_DWORD, default = 8. should never change--this indicates
that TCPIP is a name service provider.
DnsPriority, REG_DWORD, default = 0x7D0
HostsPriority, REG_DWORD, default = 0x1F4
LocalPriority, REG_DWORD, default = 0x1F3
NetbtPriority, REG_DWORD, default = 0x7D1
these priority values are used to determine the order of name
resolutions. low priority mechanisms are used first, so the default
order is local, hosts, dns, netbt. if someone wants a different name
resolution order, readjust the priority values as needed. note that
values under 1000 decimal are considered "fast" name resolution
providers, so putting network-based resolution mechanisms like dns
and netbt at values under 1000 may have weird effects.
Name, REG_SZ, default = "TCP/IP"
no need to change.
ProviderPath, REG_SZ, default = "%SystemRoot%\System32\wsock32.dll"
points to the dll that does tcpip name resolution. there is no need
to change this.
**** there are other keys associated with netware name resolution.
chuck chan will comment on their names and meaning.