Three Identical Drives, Three Different Answers

Three identical NVMe drives under etcd gave three different latencies. A month of data, a trim and a reboot later, one drive is still the odd one out.

Share

Introduction

On Wednesday, etcd moved off the eMMC on Bletchley's three control planes and onto their Kingston NV1 NVMe drives. For wear, it worked completely: the eMMC on every control plane now writes effectively nothing. It came with one cost, and I accepted it before moving the last two nodes: etcd got slower.

What I had not expected was the shape of that cost. The three NV1s are the same model, in the same cluster, doing the same job. One of them is as fast as the eMMC was. One pays a moderate, steady penalty. The third is two to four times slower than either, and twice in a month it settled into an even slower state for a day or more.

This is a month of hourly percentiles, a trim, a reboot, and an attempt to explain one drive.


🔬 This is part of the Technical Deep Dives series - going below the surface of the tools that run Bletchley.


This post follows Getting etcd off the eMMC, which covers how /var and etcd were moved to the NVMe on all three control planes.

What It Cost

Two etcd metrics say how fast a member's disk is: WAL fsync (how long it takes to make the write-ahead log durable) and backend commit (how long it takes to commit to the database). Both come from the metrics listener I set up in Getting etcd's Metrics Out of Talos, and both are histograms, so I compared the 99th percentile per hour.

Read every figure below as rough. etcd's histogram buckets double in size (4, 8, 16, 32 ms and so on), so a p99 is an interpolation within a bucket. The shifts are real; the decimals are not.

The pilot: rock1 alone

The previous post gave rock1's before-and-after medians: WAL fsync p99 went from 6.6 to 12.5 ms, and backend commit from 7.1 to 19.7 ms. The hourly graph shows what those medians hide.

Graph of rock1's hourly 99th-percentile etcd WAL fsync and backend commit duration from October 12 to October 22, 2026. Until the evening of October 14 both lines run flat near 7 milliseconds, with two short fsync spikes to about 13 and 17. After the move they jump to about 25 milliseconds, peak at about 55 to 59 milliseconds on the morning of October 15, and then swing from hour to hour, fsync between about 6 and 28 milliseconds and commit between about 8 and 40.
rock1 across its move, hourly p99 in milliseconds. Flat on the eMMC, restless on the NV1, with its highest values on the first full day.

On the eMMC, every day was 6.6–6.9 ms fsync and 7.1–7.2 ms commit. On the NV1, daily medians swung between 7.9 and 20.7 ms. etcd's commonly quoted guidance is a WAL fsync p99 under about 10 ms and a commit p99 under about 25 ms. rock1 was now over the first on most days and close to the second, and that is the cost I accepted on October 23.

The same model, three times

A nine-hour comparison the next morning already showed something I hadn't expected. These are medians of the WAL fsync p99 over the night of October 23 to 24, from just after rock9's move until the next morning, against the same nine hours a week earlier:

WAL fsync p99, 9 h median rock1 rock5 rock9
Night of October 16 to 17 8.0 ms (NV1) 4.0 ms (eMMC) 4.0 ms (eMMC)
Night of October 23 to 24 14.4 ms (NV1) 6.0 ms (NV1) 4.0 ms (NV1)

rock9 showed no measurable difference between its NV1 and the eMMC. rock5 went from 4.0 to 6.0 ms, about 50% slower. rock1 stayed the slowest, and that night it was also the new leader. That was the moment the question changed from "is the NV1 good enough?" to "what is wrong with rock1's?".

The full week's data confirmed it. These are medians of the hourly p99, October 16–23 against October 23–30:

p99, hourly median rock1 rock5 rock9
WAL fsync, before 12.8 ms (already on NV1) 4.2 ms (eMMC) 4.0 ms (eMMC)
WAL fsync, after 19.9 ms 7.2 ms 5.2 ms
Backend commit, before 20.4 ms (already on NV1) 7.3 ms (eMMC) 7.1 ms (eMMC)
Backend commit, after 26.4 ms 12.5 ms 7.6 ms
  • rock9: about the same as on the eMMC, with occasional short spikes.
  • rock5: a moderate, steady penalty, about 1.5 to 2 times its eMMC figures, and inside the guidance.
  • rock1: two to four times slower, every week, whatever its role. Part of the rise from 12.8 to 19.9 ms is leadership: rock1 led that week.

Why the cluster does not mind

These latencies are well below the levels that threaten etcd's stability: it logs slow fdatasync when a sync takes more than a second, and followers start an election if they stop hearing from the leader for an entire election timeout (one second by default, with heartbeats every 100 ms). Tens of milliseconds are nowhere near that. I checked Loki for every etcd warning across the worst three days and found none.

What latency does change is how long each write waits. A write is committed once the leader and at least one follower have it on disk. The leader's own disk is always on the critical path; among the followers, the first one to acknowledge is enough. During the pilot, that kept rock1 out of the way: rock9 led, and rock5, still on the eMMC, consistently answered first. Since October 23 every quorum includes an NV1, and the cluster's write latency depends on which NV1 leads and which follower answers first. Which member leads matters too: with rock1 leading, its slow disk is on every write's critical path. On November 1 I moved leadership to rock9, the fastest of the three.


The Drive With a Mind of Its Own

A month of hourly p99 values makes rock1's behaviour easier to see than any single week.

Prometheus graph of hourly 99th-percentile etcd WAL fsync duration from October 16 to November 15, 2026, for rock1, rock5 and rock9. rock5 and rock9 run flat near 4 milliseconds until the evening of October 23. Afterwards rock5 runs near 7 milliseconds with spikes to about 15, and rock9 near 4 with short spikes up to about 29. rock1 swings between about 5 and 30 milliseconds throughout, with two long plateaus near 53 milliseconds: about 19 hours on October 27 to 28 and about two and a half days from November 6 to November 9.
WAL fsync p99 per hour in milliseconds, one month. Two drives settle in; rock1 never does, and twice it parks at the top of the scale for a day or more.

The pattern has two parts. Most of the time, rock1 flips between a fast state, about 7 ms fsync and the same as rock5, and a slow state around 20–25 ms, staying in each for one to several hours. And twice it went into a third state and stayed there:

  • October 27–28: about 19 hours at 50–55 ms fsync and 57–58 ms commit.
  • November 6–9: about two and a half days at the same level.
Prometheus graph of hourly 99th-percentile etcd backend commit duration from October 16 to November 15, 2026, for rock1, rock5 and rock9. rock5 and rock9 run flat near 7 milliseconds until the evening of October 23. Afterwards rock5 runs between about 7 and 15 milliseconds with spikes to about 22, and rock9 near 6 with frequent spikes to 30 to 45. rock1 swings between about 8 and 45 milliseconds, with the same two plateaus near 58 milliseconds on October 27 to 28 and November 6 to 9.
Backend commit p99 per hour in milliseconds, over the same month. The plateaus are rock1 only; rock5 and rock9 never follow.

Both plateaus sit in the 32–64 ms bucket. The graph interpolates within that bucket, so the 50–55 ms line it draws is not a precise measurement. The honest reading is that rock1's p99 landed in the 32–64 ms bucket every hour of both plateaus. And both plateaus are rock1 only. The obvious explanations didn't hold up. A router firmware upgrade had lost VLAN tagging the day before the first plateau. But the plateau started 16 hours later, scrapes never had a gap, and a network problem would not explain a sustained plateau in fsync latency, which measures the local disk. rock1's NVMe wrote its usual 0.66 GB an hour straight through it: same work, slower drive. And the temperatures did not move:

Graph of smartprom_temperature for the NVMe drives on rock1, rock5 and rock9 from October 16 to November 15, 2026, averaged over 4-hour steps. Until the evening of October 23, rock1 runs between about 45 and 47.5 degrees while the idle rock5 holds 43 and rock9 sits between about 41 and 43. Once all three carry etcd they share a band of about 43 to 48 degrees. From about November 7 all three cool a little, and rock1 drops below the other two, to between about 41.5 and 45. No line rises during October 27 to 28 or November 6 to 9.
NVMe temperatures over the same month. rock5 and rock9 warm up a few degrees once they start working on October 23; nothing rises during either plateau, and during the second one rock1 is, if anything, the coolest of the three.

That leaves the drive itself as the leading suspect. A DRAM-less drive has to manage its mapping table and background work with very limited resources, and garbage collection or cache handling could explain latency that switches state for hours or days. I can't see what the controller is doing internally, though. Two more experiments helped narrow things down.

Trim did not fix it

The first theory I liked was trim. A drive that does not know which blocks are free has less room to work with, and a drive with no DRAM is more sensitive to that than most. The kernel keeps count of every discard sent to a disk, and node-exporter publishes the counts, so this was easy to check:

node_disk_discarded_sectors_total{device="nvme0n1", node=~"rock1|rock5|rock9"}

The counters reset at every boot. At the time I checked, the only discards recorded since each node's last boot were from Talos formatting EPHEMERAL. After that, the counters were flat: nothing on my Talos 1.13 control planes trims /var, and the Longhorn trim job I already run only covers Longhorn volumes, which live on the workers.

The counters also cannot tell me whether each controller knows that the 143 GB I left unpartitioned is free. That depends on whether the whole drive was ever discarded after its Longhorn days, and the counters only go back to the last boot. On rock9 they show no whole-drive discard at all since its October 10 boot, and rock9 is the fastest of the three. Whatever separates these drives, spare room seems an unlikely explanation.

So on November 1 I trimmed rock1's /var once, by hand, from a privileged debug pod. The first attempt, in the default namespace, was refused: Talos configures the API server's Pod Security admission to enforce the baseline level in any namespace that does not say otherwise, and a node debug pod is about as far from baseline as a pod gets. A throwaway namespace labelled privileged did it:

kubectl create namespace node-debug
kubectl label namespace node-debug pod-security.kubernetes.io/enforce=privileged
kubectl -n node-debug debug node/rock1 -it --image=alpine:3.22 --profile=sysadmin -- \
  sh -c 'apk add -q util-linux && fstrim -v /host/var'
kubectl delete namespace node-debug
/host/var: 100 GiB (107374182400 bytes) trimmed

On XFS that figure is just the size of the range handed to the drive. The discard counter is more honest: it jumped by 201,769,144 sectors, 96.2 GiB, which is all the free space in /var. The discard requests reached the drive.

It made no lasting difference. The fast stretch around it had started two hours before the trim. The next day rock1 spent more time in its fast state, 29% of hours against 12% before, but one day is not evidence, and leadership had moved in the same minute. And the second, longer plateau started five days after the trim.

A reboot did not fix it either

The Talos 1.13.12 update rebooted all three control planes on the evening of November 7, rock1 first at 19:10 UTC. That was about a day into the second plateau. rock1 came back, rejoined, and stayed slow for another day and a half. Whatever state the drive was in, a warm reboot did not reset it.

The reboots had one more side effect: when rock9 went down for its turn, leadership moved to rock1, in the middle of its slowest stretch. At the time of writing, it is still the leader.

Which drive is it?

If trim didn't fix it, and a reboot didn't reset it, perhaps these three drives aren't as identical as their labels suggest.

The three NV1s are the same model, but for the NV1 that says less than it seems. Kingston ships it with either a Silicon Motion SM2263XT or a Phison E13T controller, and with TLC or QLC flash, under the same name, as TechPowerUp found out when it peeled the label off a review drive. The firmware gives the controller away: Phison builds carry EDFK versions, and all three of mine run S8 versions, which turn up on SM2263XT drives. So the controller is very likely the same. The flash may not be. rock1 and rock5 run S8H40103, rock9 runs S8J41100, and a different firmware branch may well mean different NAND. That could be why rock9 is the fastest.

It cannot explain rock1, because rock5 runs the same firmware and is much faster. For that pair, drive history is my leading hypothesis. rock1's drive spent the longest in the Longhorn pool before October, it is the most-written of the three (1.85 TB, against 1.43 TB for rock5 and 1.62 TB for rock9), and it is the one whose percentage_used reached 100 on September 27. That last number is a clock rather than an odometer, as The Wear That Wasn't showed, but it does mark this drive as the one that has been worked the hardest.

I cannot prove that history is the cause. I can say that three drives sold as the same model behave very differently, and that rock1's is the one I would replace first.


Lessons Learned

  1. "Same model" is not "same drive". Three identical NV1s gave three different results. Export every member, every time: the others are the control group.
  2. Watch steadiness, not just the average. The eMMC was slower than a good NVMe but perfectly steady. These DRAM-less NV1s can be faster on a good hour, and are much less predictable.
  3. In etcd, the leader is part of the latency. A write waits for the leader's own disk and for the first follower to acknowledge, so the leader is on every write's path. Put leadership on the fastest disk, and check where it ended up after every reboot.
  4. Get the measurement windows right. Set Grafana to UTC before exporting, and keep the N in [Nd] equal to the real window. My first export did neither, and the window-wide numbers reached back a day before the window began.
  5. Discard counters answer "has this been trimmed since boot?" node_disk_discarded_sectors_total was already in Prometheus. I just had never looked at it. It starts again at every boot, though, so it cannot tell you what happened before.

What's Working Now

  • ✅ etcd on the NV1s for a month with no warnings and no unplanned elections
  • ✅ rock9 at eMMC speed, rock5 inside the usual etcd guidance
  • ⚠️ Known limitation: rock1's drive is two to four times slower than the others, with multi-day slow plateaus
  • ⚠️ /var on the control planes is still not trimmed on a schedule

What's Next

Immediate:

  • Move leadership off rock1 again (the November 7 reboots put it back), and add an alert for leader changes and for slow fdatasync, the two conditions that would make me revisit the whole move.

Future:

  • A scheduled trim for /var on the control planes, as a step of its own: one control plane first, with before-and-after numbers. If any trim helps these drives, that is where it will show.
  • talosctl get volumestatus already lists etcd's data as a volume of its own, ETCD. If that becomes configurable, moving only etcd comes back as a supported option, and it is worth comparing against moving all of /var.
  • If rock1 stays the outlier, its NV1 is the one to replace, ideally with a drive that has its own DRAM cache, tested on that one node first with rock5 and rock9 as the control group.

← Previous: Getting etcd off the eMMC


Questions or suggestions? Leave a comment below or reach out at igor@vluwte.nl.