- Download and extract the latest
preflight
binary from GitHub’s releases page. - Save the following YAML to
host-preflight.yaml
apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
name: kurl-builtin
spec:
collectors:
- filesystemPerformance:
collectorName: Filesystem Latency Two Minute Benchmark
timeout: 2m
directory: /var/lib/etcd
fileSize: 22Mi
operationSizeBytes: 2300
datasync: true
enableBackgroundIOPS: true
backgroundIOPSWarmupSeconds: 10
backgroundWriteIOPS: 300
backgroundWriteIOPSJobs: 6
backgroundReadIOPS: 50
backgroundReadIOPSJobs: 1
analyzers:
- filesystemPerformance:
collectorName: Filesystem Latency Two Minute Benchmark
outcomes:
- pass:
when: "p99 < 10ms"
message: "Write latency is ok (p99 target < 10ms, actual: {{ .P99 }})"
- warn:
when: "p99 < 20ms"
message: "Write latency is high. p99 target < 10ms, actual:{{ .String }}"
- fail:
when: "p99 >= 20ms"
message: "Write latency is too high. p99 target < 10ms, actual:{{ .String }}"
- Run the following command as root:
./preflight --interactive=false host-preflight.yaml
Example output:
[Filesystem Latency Two Minute Benchmark] Running collector...
[CPU Info] Running collector...
[Amount of Memory] Running collector...
--- FAIL: Filesystem Performance
--- Write latency is too high. p99 target < 10ms, actual:
Min: 1.06734ms
Max: 980.047944ms
Avg: 6.745206ms
p1: 1.219405ms
p5: 1.306124ms
p10: 1.357343ms
p20: 1.434213ms
p30: 1.504088ms
p40: 1.595145ms
p50: 1.841983ms
p60: 3.206616ms
p70: 3.321259ms
p80: 3.437754ms
p90: 5.868105ms
p95: 56.351534ms
p99: 62.237159ms
p99.5: 65.849002ms
p99.9: 74.431154ms
p99.95: 120.162862ms
p99.99: 917.47506ms
--- FAIL kurl-builtin
FAILED