Microsoft iSCSI Software Initiator and iSNS Server timers quick reference
Below is a quick reference of Microsoft iSCSI Initiator and iSNS timers. You should only consider changing these values if one or more of the following statements apply:
1) You are an advanced user and have a specific issue and have experience with optimizing fibre iSCSI SAN environments
2) You were directed to change the settings by your storage array vendor
3) You were directed to change the settings by support staff
Microsoft iSCSI Initiator Service Timers
Key: HKLM\Software\Microsoft\Windows NT\CurrentVersion\ISCSI\Discovery
Values
1. DefaultInitiatorName REG_SZ
This has the initiator node name to use for all logins. If blank or missing then an iqn name is generated from the computer name. The value can be updated using the iscsicli NodeName command
2. GroupKey REG_BINARY
Group key to use for ipsec, the value is encrypted. The value can be updated using the iscsicli GroupKey command.
3. iSNSServerList REG_MULTI_SZ
List of SNS server addresses the initiator service will use to obtain targets. The servers addresses can be added and removed using the iscsicli AddiSNSServer and RemoveiSNSServer commands.
4. ServiceLogFileName REG_SZ
On checked builds all debug spew will also be logged into this file.
5. DefaultSecurityBitmap REG_DWORD
Default value for security bitmap and assigned to targets that are not assigned security bitmaps via iSNS. Default value is 0. This can be useful in cases where IPSEC to a target portal is needed, but the target doesn't support iSNS and the user doesn't want to add the information manually. Really the user should use the iscsicli PSKey command to setup the security bitmap to the specific portal, but if there are many many portals and all have the same security bitmap then it may make sense to set this to the security bitmap. In this scenario a group key would also make sense.
6. DebugSpewLevel REG_DWORD
Bitmask that specifies the level of debug spew to the debugger or log file. For general troubleshooting use SPEW_ALL. For specific troubleshooting use appropriate flags. Note spew only generated on checked builds.
#define SPEW_ALL 0xffffffff
#define SPEW_FATAL 0x00000001
#define SPEW_ERROR 0x00000002
#define SPEW_WARNING 0x00000004
#define SPEW_INFORMATION 0x00000008
#define SPEW_RECURRING 0x00000010
#define SPEW_DRIVER_PROBLEM 0x00010000
#define SPEW_WMI_API 0x00020000
#define SPEW_MEMORY 0x00040000
#define SPEW_TCP 0x00080000
#define SPEW_REFCOUNT 0x00100000
#define SPEW_PROCTHREADIDS 0x00200000
#define SPEW_TIMESTAMP 0x00400000
7. InitiatorCHAPSecret REG_BINARY
CHAP shared secret used by the initiator to validate the response from the target when target is challenged. This value is encrypted
8. VolumeList REG_MULTI_SZ
This is the list of volumes that the service will wait for at startup. The service will not complete its service startup until all of the volumes listed show up or it retries until a timeout.
9. VolumeRetryCount REG_DWORD
This is the number of times that the service will retry its checking to see if all of the volumes specified in PersistentVolumeList show up. The default Value is 120.
10. VolumeRetryTimer REG_DWORD
This is the number of milliseconds to wait between checking to see if all of the volumes specified in PersistentVolumeList show up. The default value is 1000.
11. VolumePostDiscoveryTimer REG_DWORD
This is the number of milliseconds to wait after all of the volumes are discovered before completing service inititialization. This is needed because although the volume notification has been given, the volume is not ready for use. The default value is 30000.
12. InitiatorArrivalTimer REG_DWORD
This is the number of milliseconds to wait between attempts to resolve a pnp device interface arrival to the WMI interface for it. The pnp notification arrives before the wmi interface is ready and so we need to wait a period of time after the notification is received.
Default value is 500.
Subkeys
1. Static Targets
List of statically defined targets. The values are encrypted.
2. Send Targets
List of statically defined target portals.
3. Persistent Targets
List of targets that are reconnected to each time the service is started. The values are encrypted.
4. Tunnel Address
Tunnel outer mode addresses.
5. Authentication Cache
Authentication information for IKE. The values are encrypted.
Key: HKLM\SYSTEM\CurrentControlSet\Services\EventLog\System\MSiSCSI
Values
1. EventMessageFile REG_EXPAND_SZ
The path to the executable registered as an Application Event Log message resource
2. TypesSupported DWORD
Bitmap of flags indicating the supported event types
Microsoft iSNS Timers
Key: HKLM\Software\Microsoft\Windows NT\CurrentVersion\MSiSNS
1. ServiceLogFileName REG_SZ
On checked builds all debug spew will also be logged into this file. Note that since the iSNS server runs in the LocalService account, the log file is restricted as to the directory that is can be created. Typically the log file is created in "c:\Documents and Settings\LocalService.NT AUTHORITY" however this may be different on your machine. To discover the correct directory you can start the iSNS server with a debugger attached and observe the location of the database files in the debug spew.
2. DebugSpewLevel REG_DWORD
Bitmask that specifies the level of debug spew to the debugger or log file. For general troubleshooting use 0x000000ff. For specific troubleshooting use appropriate flags. Note spew only generated on checked builds.
#define SPEW_ALL 0xffffffff
#define SPEW_FATAL 0x00000001
#define SPEW_ERROR 0x00000002
#define SPEW_WARNING 0x00000004
#define SPEW_INFORMATION 0x00000008
#define SPEW_RECURRING 0x00000010
#define SPEW_DRIVER_PROBLEM 0x00010000
#define SPEW_WMI_API 0x00020000
#define SPEW_MEMORY 0x00040000
#define SPEW_TCP 0x00080000
#define SPEW_REFCOUNT 0x00100000
#define SPEW_PROCTHREADIDS 0x00200000
#define SPEW_TIMESTAMP 0x00400000
The following two are used by the iSNS DHCP client. This code exists in a library and is used by several components; among them are iscsiexe.exe, isnssrv.exe, srvsetup.exe, isnsins.exe, and a standalone test program, isnsdhcp.exe. Changing these two registry values will change the behavior for all of the components which use this code.
3. DHCPRetries REG_DWORD
Specifies the number of times that the iSNS DHCP client will attempt to discover a DHCP server on a particular interface. If this value is not present in the registry, then the code uses the current default value of 2.
4. DHCPTimeout REG_DWORD
Specifies the number of seconds that the iSNS DHCP client will wait for a response to a DHCP DISCOVER or INFORM message from a DHCP server. If this value is not present in the registry, then the code uses the current default value of 1.
Microsoft iSCSI Initiator Driver Timers
Key: HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\<Instance Number>\Parameters
(Pnp Driver Key)
1. TCPConnectTime
Timeout given to TCP when a Connect request is sent.
The default value is 15 seconds.
2. TCPDisconnectTime
Timeout given to TCP when a Disconnect request is sent.
The default value is 15 seconds.
3. WMIRequestTimeout
Timeout value set for WMI requests such as LoginToTarget, LogoutFromTarget, SendTargets, etc.
The default value is 30 seconds.
4. DelayBetweenReconnect
If a connection is dropped while it is in FullFeature phase, the driver will attempt to relogin. This parameter sets the delay between each re-login attempts.
The default value is 1 second.
5. MaxConnectionRetries
Maximum number of times a lost TCP connection will be retried.
The default value is -1, which means the driver will retry
indefinitely
6. MaxRequestHoldTime
Maximum time (in seconds) for which requests will be queued if connection to the target is lost and the connection is being retried. After this hold period, requests will be failed with "error no device" and device (disk) will be removed from the system.
The default value is 60 seconds
7. MaxPendingRequests
Maximum number of outstanding requests allowed by the initiator. At most this many requests will be sent to the target before receiving response for any of the requests.
The default value is 255
8. EnableNOPOut
If set to non-zero value, the initiator will send NOP OUT PDUs to target if there is no activity for 2 minutes.
The default value is 0
9. MaxTransferLength
This is maximum data size of an I/O request.
The default value is 262144 (256KB)
10. MaxBurstLength
This is the negotiated Max Burst Length.
The default value is 262144 (256KB)
11. FirstBurstLength
This is the negotiated First Burst Length.
The default value is 65536 (64KB)
12. MaxRecvDataSegmentLength
This is the negotiated MaxRecvDataSegmentLength.
The default value is 65536 (64KB)
13. IPSecConfigTimeout
Timeout value used when the driver calls the discovery service to configure\release ipsec for an iscsi connection.
The default value for this is 15 seconds.
14. InitialR2T
If set to Non-Zero value, initiator will request InitialR2T (InitialR2T=Yes). Else initiator will not request InitialR2T (InitialR2T=No).
The default value for this is 0 (InitialR2T=No)
15. ImmediateData
If set to Non-Zero value, initiator will request ImmediateData (ImmediateData=Yes). Else initiator will not request ImmediateData (ImmediateData=No).
The default value for this is 1 (ImmediateData=Yes)
16. LinkDownTime
This value determines how long requests will be held in the device queue and retried if the connection to the target is lost. If MPIO is installed this value is used. If MPIO is not installed MaxRequestHoldTime is used instead.
The default value for this is 15 seconds.
17. PortalRetryCount
This value is used to determine how many times a connect request to a target portal should be retried if the portal is down.
The default value for this is 1
18. NetworkReadyRetryCount
This value is used to detemine how many times initiator should retry getting the IP address of NIC corresponding to the PortNumber specified in the login request.
The default value for this is 10.
19. ErrorRecoveryLevel
Error recovery level that the initiator will request.
The default value for this is 2.
20. SRBTimeoutDelta
The timeout set by class drivers (such as disk.sys, etc) for various requests does not take into account network delays. This value is used to increment the timeout set by class drivers.
SrbTimeoutDelta can be as low as 5 seconds. If it is lower than that, initiator will use 15 instead.
SrbTimeoutDelta gets added to the timeout set by the class driver.
The default value is 15 seconds.
21. AsyncLogoutPauseTimeout
This is the number of seconds that the initiator will pause the I/O queue after receiving an async logout.
The default value is 10 seconds.
If one needs to change the above values, a reboot is required for the change to take effect.
Alternatively, one can also unload and reload the initiator driver for the change to
take effect. In "Device Manager" GUI, look under "SCSI and RAID Controllers". Right click
on "Microsoft iSCSI Initiator" and select "Disable" to unload the driver. Then select
"Enable" to reload the driver.
Other Timers
Key: HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\<Instance Number>\PersistentTargets
(Pnp Driver Key)
Information about Persistent targets is stored under this key. Each entry is based
on the target name. Note that there can be more than one persistent login to the same target.
The key name for each login is TargetName#<Number> where Number is a numeric value.
Key: HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\<Instance Number>\PersistentTargetSecrets
(Pnp Driver Key)
Information about the CHAP secret for Persistent logins is stored under this key. The format of the key is same as that for PersistentTargets key.
Microsoft iSCSI DSM (msiscsdsm)
Key: HKLM\SYSTEM\CurrentControlSet\Services\MSiSCDSM\PersistentReservation
1. UsePersistentReservation -> REG_DWORD -> Value
2. PersistentReservationKey -> REG_BINARY -> 8 byte PRKey
If UsePersistentReservation is set to 0, Persistent Reservation will not be performed.
If UsePersistentReservation is set to 1, Persistent Reservation will be performed using the key given in PersistentReservationKey. This key will be copied to the OUT parameter PersistentReservationKey.
For more details on configuring iSCSI settings, please see our user's guide