Repository navigation
Description
What #19 was for, a large manifest streamed through a pipe while the
volume is written, isn't benchmarked. We deferred that in its review
(cf. 1).
Currently, three workloads of bench/compare.sh read a manifest
(cf. 2):
- assemble/esp-stream, the manifest of the ESP with its contents on
standard input, a few dozen records; - varlink/Assemble-esp-stream, the same through Varlink;
- plan/wide-manifest, assemble --plan on the manifest of the wide tree,
10000 records, which writes nothing.
None of them reads a pipe either. measure opens --stdin and every --fd
as a file (cf. 3, 4), so ufat gets regular files.
What we want:
(1) assemble/wide-manifest-stream: the wide tree's manifest and its
contents through pipes. Through Varlink both can be pipes
(cf. 5). The CLI takes a streamed manifest only as --manifest -,
and then standard input can't carry the contents as well (cf. 6,
7), so there the contents come from the tree. measure has to hand
ufat a pipe for that, from a FIFO the script fills or from a pipe
measure fills itself.
(2) A check that runs it at two sizes, FILES=10000 and FILES=100000,
and fails when the peak RSS grows with the number of records. At
10000 records memory that grows per record doesn't show. This holds
a binary against itself, so it's a verdict of its own next to
compare.py, which holds the head against the base. It needs neither
cachegrind nor strace.
A few things get in the way at 100000 records:
- The wide tree puts every file into one directory (cf. 8). An
entry-NNNNN.conf takes three slots, two for its long name and one for
its short entry, and a directory has at most 65536 (cf. 9). So the
wide tree stops fitting at about 21800 files, and at 100000 the files
have to be spread over directories. - The image is 64 MiB (cf. 10), which doesn't hold 100000 files of
1 KiB. Empty files keep the records and drop the data. - The directory cache grows with the directories it holds until it
reaches its bound, and the bound counts the bytes of the cached
directories but not their index (cf. 11). Measured on Add a uapi16 crate and stream manifests through it #19 before
the merge, release build: an assembly from a manifest with its files
in directories of 1000 peaked at 10.3 MiB at 10000 records, at
63.2 MiB at 100000, and between 81.7 and 85.2 MiB from 200000 to
1.6 million. So at these two sizes the check would flag the cache.
Either both sizes go past where the cache levels off, or the check
waits for a bound that counts what the cache holds (fat: rework the directory index and the directory cache #37).
Activity