Stress-ZrStore
Runs a randomized 50/50 read/write stress workload against a Zaris store and reports total operations, failures, error rate, and the last error type.
Syntax
Stress-ZrStore -StoreName <string> -DurationSec <int> -Concurrency <int> [-ObjectSizeBytes <int>] [-ExpirationSec <int>] [-ConnectionString <string>] [-Endpoints <string[]>] [-TimeoutSec <int>]
Description
Stress-ZrStore drives a randomized mix of reads and writes (roughly 50/50) against the named Zaris store for a fixed duration using the requested concurrency, then reports the total operations, failures, error rate, and last observed error type. Use it to exercise a store under sustained load and surface stability or error-handling issues over long runs.
The cmdlet requires an active connection (Connect-ZrStore) or a one-shot independent connection supplied through -Endpoints. The run stops when -DurationSec elapses or on Ctrl+C; no result is written on cancellation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-StoreName | String | Yes | The name of the store to stress. |
-DurationSec | Int32 | Yes | How long, in seconds, to run the stress workload. Range 1–20000000. |
-Concurrency | Int32 | Yes | The number of concurrent workers issuing operations. Range 1–2048. |
-ObjectSizeBytes | Int32 | No | The size, in bytes, of the objects written during the workload. Range 32–1048576. Default 100. |
-ExpirationSec | Int32 | No | Optional time-to-live, in seconds, applied to written items. Range 0–2147483647. Default 0 disables expiration. |
-ConnectionString | String | No | Connect via a Zaris connection string, e.g. zaris://host:7861/store; an alternative to -StoreName + -Endpoints for a one-shot connection. Ignored when a Connect-ZrStore session is active. |
-Endpoints | String[] | No | One or more store node endpoints (host:port) for a one-shot independent connection. Only the first endpoint is used as the seed. Ignored when a Connect-ZrStore session is active. |
-TimeoutSec | Int32 | No | Connection timeout, in seconds, for an independent connection. Range 1–120. Default 5. |
Returns an object with StoreName, DurationSec, Concurrency, ObjectSizeBytes, ExpirationSec, TotalOperations, Failures, ErrorRatePct, and LastError.
Examples
Run a 60-second mixed workload using 32 concurrent workers:
Stress-ZrStore -StoreName "orders" -DurationSec 60 -Concurrency 32
Run a longer stress test with higher concurrency:
Stress-ZrStore -StoreName "orders" -DurationSec 1800 -Concurrency 256
Stress the store while expiring written items after 5 minutes:
Stress-ZrStore -StoreName "orders" -DurationSec 600 -Concurrency 64 -ExpirationSec 300