A transcode writes a third more bytes than upstream's for the same request #190
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Four video shapes were gated and measured against the reference instance, and
ours wrote a larger file every time — the transcoding scenario's whole request
set, taken from
var/bench-tc/*/manifest.json:Both servers were given the same request and the same file, so the difference
is in what each asked ffmpeg for. The encoding corpus covers none of this
regime — it checks the argument list a request builds, and these four requests
build lists both servers accept, so a size difference of a third is invisible
to it.
The last row is the interesting one: a stream copy with an mp3 audio track
should be nearly the same bytes on both sides, and is half again as large
here.
Nothing about this is diagnosed. The numbers above are the whole evidence
base, and the first thing to do is put the two argument lists side by side for
one of the four.
How to know it is done
The four requests produce files within a percent of upstream's, or each
difference that remains is explained by an argument the port deliberately
spells differently — recorded here, and covered by a corpus case so that it
cannot drift back.
House rules
Tests run under
cargo nextest; upstream's source is the checkout inupstream/at the pin.Diagnosed and fixed in
a764076. It was not the arg builders — it was thequery binder.
Four parameters of the streaming routes were spelled in a way the binder could
never reach. Keys are respelled to
snake_casebefore serde binds them, sovideoBitRatearrives asvideo_bit_rateand the field was calledvideo_bitrate: no match, no value, silently.So a request asking for 200 kbps of video and 64 kbps of audio was transcoded
with no rate cap at all, and its audio was stream-copied because nothing
told the copy check a lower bitrate had been asked for. Both make a bigger
file, which is exactly what the byte counts said.
The two command lines for the first of the four, side by side:
Measured
cargo xtask bench --fixture default --workload transcoding, the wholecommitted request set, before → after:
Bytes per response now run 1.00–1.09 of upstream's at low concurrency and
1.00 from c=32 up, which is a response cut off at a different point rather than
a different file.
What it uncovered. With the gate passing, the workload is timed for the
first time, and the number is bad: ours sustains ~2.9 transcode requests a
second against upstream's ~240, with a p99 approaching a minute. That is #191's
question, answered — recorded there.