Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add an example for the timeouts of spdk bdev_nvme_attach_controller #172

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,38 @@ const (
ShallowCopyStateComplete = "complete"
ShallowCopyStateError = "error"

ExecuteTimeout = 60 * time.Second
)

const (
// Sequence of Events:
// 1. Issuing I/O Command: The system sends a read command to the NVMe SSD.
// 2. Waiting for ACK: The system waits for an acknowledgment from the NVMe SSD.
// 3. Timeout: If no ACK is received within 2^transport_ack_timeout milliseconds,
// the system considers the I/O operation as a failure and attempts to resend it.
// 4. Fast I/O Failure: If multiple retries fail consecutively and the total elapsed
// time exceeds fast_io_fail_timeout_sec seconds, the system determines that the I/O
// operation is stuck and takes further actions, such as raising an alarm or switching
// to a backup path.
// 5. Controller Loss: If the NVMe SSD does not respond at all for more than
// ctrlr_loss_timeout_sec seconds, the system considers the controller as lost.
// 6. Reconnect Attempt: The system attempts to reconnect to the NVMe SSD every
// 2Reconnect_Delay_Sec seconds.

DefaultCtrlrLossTimeoutSec = 15
// DefaultReconnectDelaySec can't be more than DefaultFastIOFailTimeoutSec.
DefaultReconnectDelaySec = 2
DefaultFastIOFailTimeoutSec = 10

// DefaultTransportAckTimeout value is not the timeout second.
// The timeout formula is 2^(transport_ack_timeout) msec.
// DefaultTransportAckTimeout is 14, so the default timeout is 2^14 = 16384 msec = 16.384 sec.
// DefaultTransportAckTimeout is set to 10, so the default timeout is 2^10 = 1024 msec = 1.024 sec.
// By default, error detection on a qpair is very slow for TCP transports. For fast error
// detection, transport_ack_timeout should be set.
DefaultTransportAckTimeout = 14
DefaultTransportAckTimeout = 10

DefaultKeepAliveTimeoutMs = 10000
DefaultMultipath = "disable"

ExecuteTimeout = 60 * time.Second
)

func GetNQN(name string) string {
Expand Down
Loading