Skip to content

Add the load cases A and B - #12

Merged
tamnd merged 1 commit into
mainfrom
load-cases
Oct 7, 2026
Merged

tamnd merged 1 commit into
mainfrom
load-cases

Conversation

@tamnd

@tamnd tamnd commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Part of #1.

What changes

  • src/load.rs has the steps of spec/20 section 20.3.1. Case A runs sync and drop_caches, checks with fincore that the source has 0 resident pages, times cat <source> > /dev/null as R, drops the caches and checks again. Case B reads the source twice with cat, and fincore must report at least 99 percent of the pages resident. Below 99 percent, the run does the steps of case A and records case A with a note.
  • A few pages can stay resident after one drop of the caches. The first try on server3 left 20 pages of a file that had just been downloaded. The check therefore drops the caches up to 5 times until fincore reports 0, and the result records how many drops each check needed. If pages stay after 5 drops, the run fails, because then another process holds the file or the file is on tmpfs.
  • rupg-bench load --case a|b --source FILE (--name N | --attach PATH | --unit UNIT) [--du PATH] [--json] -- COMMAND runs the steps and then times the load command in the cgroup runner of Add the cgroup v2 runner and the measure command #11, so the resources of spec/20 section 20.3.4 are measured over the load. The result has L, R, L / R, every fincore line and the case that was asked for.
  • src/cgroup.rs gets run, which starts a command in the cgroup (or outside it, for a client) and measures the interval. measure and load share it.
  • The README describes rupg-bench load.

Test

All runs are on server3 (8 cores, Linux 6.8.0-106-generic) on 7 October 2026, with DuckDB 1.5.6 from machines/install/duckdb.sh. The source is the first file of the partitioned ClickBench data, hits_0.parquet (122446530 bytes, sha256 fa134fe101e68324e0de851146fda69624f5cbb707d387141d1c2a88a219a16d), from https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_0.parquet. These are smoke runs that show the steps work. They are not baselines: the machine is shared, its load average was near 75, and the file is a 1 percent sample.

Case A:

rupg-bench load --case a --source /root/work/data/hits_0.parquet --name duckdb-load --du /root/work/m/h.db -- \
  /root/work/rupg-bench-opt/bin/duckdb /root/work/m/h.db -c "CREATE TABLE hits AS SELECT * FROM read_parquet('/root/work/data/hits_0.parquet'); CHECKPOINT;"
case            A (asked for A)
fincore         0.00 percent resident, case A, before the read: 0 0 122446530 /root/work/data/hits_0.parquet
fincore         0.00 percent resident, case A, before the load: 0 0 122446530 /root/work/data/hits_0.parquet
drops           1, 1 (drops of the caches before each check)
R (cat)         6.946 s
L (load)        73.977 s
L / R           10.650
memory.peak     1634.73 MiB (1714135040 bytes) (since the cgroup was created)
io read         141.44 MiB (148312064 bytes)
io write        180.66 MiB (189440000 bytes)
du /root/work/m/h.db  180.51 MiB (189280256 bytes)

Case B, with --json. fincore found all 29895 pages resident after the two reads, and the load read only 13451264 bytes from the device, so the source came from the page cache:

"run": { "wall_s": 121.894304608, "rbytes": 13451264, "wbytes": 188915712, "memory_peak_bytes": 1576206336, ... },
"load_case": { "case_wanted": "B", "case": "B", "note": null, "read_s": null,
  "fincore": [ { "resident_pages": 29895, "size_bytes": 122446530, "resident_share": 1, "step": "case B, after two reads" } ] }

The case B load took longer than the case A load because other jobs on the machine took the CPU. This is why these numbers are not baselines.

srvtest passed on server3: fmt, clippy with -D warnings, and 23 tests, with new tests for the fincore parser, the resident share, L / R and the case names.

rupg-bench load runs the steps of spec/20 section 20.3.1 on the source file: drop_caches, fincore and the timed cat for case A, two reads and the 99 percent check for case B. Then it times the load command in the cgroup runner and records L, R and L / R.
@tamnd tamnd added kind/feature It does not do something that it must do. area/loaders Load each data set into each engine and time it. labels Oct 7, 2026
@tamnd tamnd self-assigned this Oct 7, 2026
@tamnd
tamnd merged commit 236a8e1 into main Oct 7, 2026
2 checks passed
@tamnd
tamnd deleted the load-cases branch October 7, 2026 06:49
@tamnd tamnd mentioned this pull request Oct 7, 2026
5 of 17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/loaders Load each data set into each engine and time it. kind/feature It does not do something that it must do.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant