Skip to content

Leave a cell alone once it has had its four tries - #81

Merged
tamnd merged 1 commit into
mainfrom
leave-spent-cells
Sep 10, 2026
Merged

tamnd merged 1 commit into
mainfrom
leave-spent-cells

Conversation

@tamnd

@tamnd tamnd commented Sep 10, 2026

Copy link
Copy Markdown
Owner

failures.json has counted attempts per cell since it was written, the doc on the field says a cell that has failed four times is a cell where something is actually wrong, and nothing read the count. So a cell this box cannot measure was attempted again on every sweep, at the cost of a full run each time, because a cell fails after memtier has finished rather than before it starts.

The wasted run is the smaller half. The five runs of one cell sit next to each other in the order the matrix goes in, so a shape a box cannot measure is three failures in a row, and three in a row is what puts the whole engine down for the rest of the session. A sweep of one engine stops there and every remaining cell is left with it. A wrapper that restarts the sweep then stops at the same place every time, so the matrix never gets past the first bad shape.

That is what is happening on the 32 core box right now. Sixteen load generator threads on a WSL2 VM finish wildly apart on the deeper pipelines, the parser refuses the rate because memtier divides the whole operation count by the first thread to finish, and one cell there has been attempted fourteen times. It is not particular to one engine: the published wsl32coarse failure file has 40 cells of rugo, 33 of yo and 10 of garnet refused for exactly that reason.

What changes

Four attempts and the cell is left alone. It is counted apart from the cells already on disk, in the line the sweep prints when it starts and in the summary it prints when it finishes, because a cell nobody is going to measure and a cell that is already measured are different kinds of absent.

The failure the sweep exits with says how many of the missing cells have had their tries, so a script that restarts it can tell a sweep worth running again from one that would do nothing. --retry-failed throws the counts away, which is what to pass on a machine that has changed.

Nothing about which cells are measured changes on a box where cells do not fail, and nothing about the numbers changes anywhere.

What checks it

a_cell_is_worth_another_run_until_it_has_had_its_tries walks a cell up to the limit and past it, and checks that another cell in the same file is its own question. the_matrix_comes_apart_into_measured_spent_and_left_to_do puts one cell on the disk and one over the limit and checks the three counts add up to the matrix, and that the cell with a file stops being a failure. the_way_out_says_whether_another_sweep_would_help checks the message a restarting script reads. a_cell_that_has_never_failed_has_been_attempted_no_times and throwing_the_counts_away_makes_every_cell_worth_trying_again cover the two new methods on Failures.

Part of M8 (#10), because a sweep that cannot reach the end of the matrix on the 32 core box is the thing standing between that milestone and two published results directories.

failures.json has counted attempts per cell since it was written and nothing read the count, so a cell the box cannot measure was attempted again on every sweep. Worse than the wasted run: the five runs of one cell sit next to each other in the order the matrix goes in, so a shape a box cannot measure is three failures in a row, which is what puts a whole engine down. A sweep of one engine on a busy box therefore stopped at the first bad shape, and a wrapper that restarts it stopped at the same place every time and never reached the end of the matrix.

Four attempts and the cell is left alone, counted apart from the ones already on disk in both the progress line and the summary. The failure the sweep exits with now says how many of the missing cells have had their tries, so a script restarting it can tell a sweep worth running again from one that would do nothing. --retry-failed throws the counts away, which is what to pass on a machine that has changed.
@tamnd tamnd added core Types, the JSON model, config and hardware profiles cli The cache-bench binary and its subcommands host Hardware profiles, host setup, machine specific problems labels Sep 10, 2026
@tamnd
tamnd merged commit 9eb849a into main Sep 10, 2026
14 checks passed
@tamnd
tamnd deleted the leave-spent-cells branch September 10, 2026 09:55
tamnd added a commit that referenced this pull request Sep 10, 2026
Three failures in a row put a whole engine down for the session, which is right for an engine the machine cannot run and wrong for an engine that runs fine and has one shape this machine cannot measure. The five runs of a shape sit next to each other in the matrix order, so a bad shape reads as three in a row and takes the other nine hundred cells with it.

A cell on the disk, or one measured in this session, is proof the engine runs here. With that proof the sweep walks past the bad shape and pays one run for each of its cells, once, because the attempt count added in #81 leaves them alone on the next sweep.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli The cache-bench binary and its subcommands core Types, the JSON model, config and hardware profiles host Hardware profiles, host setup, machine specific problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant