2.5 Reading an Experiment Record
An experiment record documents a measurement with its limits and assumptions. The pages in my Experiments section follow this structure. They must be held to this standard. To read them critically, know what each section means and what belongs there.
2.5.1 The structure
An experiment record answers these seven questions in order: What is the question? What do I expect to find? What did I do? What did I find? What does this mean? What did I not measure? What will I measure next?
This maps to: Question, Hypothesis, Setup, Results, Interpretation, Limitations, Next experiment.
2.5.2 Reading the question
The question is the point. “Does fork save memory for R?” is a good question. “Is parallelization fast?” is too vague. The question must be narrow and measurable. If you cannot design an experiment to answer it, the question is not specific enough.
Read the question first. If the question does not match what you want to know, stop reading. The experiment can be excellent but still not relevant to your concern.
2.5.3 Reading the hypothesis
The hypothesis is the author’s prediction. It must be explicit. “I expect forked workers to use at least 5 times less memory in total than separately started ones” is clear. “I expect fork to help” is too weak.
The hypothesis shapes the experimental design. If the hypothesis is wrong, the experiment can still be valuable because it exposes why. But if the hypothesis is vague, no result can contradict it, and the experiment tests nothing.
Compare the stated hypothesis to the actual result. If they differ, read the interpretation to see whether the author explains why.
2.5.4 Reading the setup
The setup describes what the author did. It answers: What code did you run? On what hardware? With what inputs? For how long? How many times?
A setup must be specific enough that you can roughly replicate it. If the setup omits CPU model or RAM, you cannot judge whether your hardware is comparable.
Read the setup carefully. The same experiment on different hardware can yield different results. The same task with different input sizes can scale differently.
2.5.5 Reading the results
Results are numbers with units and variance. “4.8 seconds” is a result. “It was fast” is not. Results should include:
- The point estimate: the main number.
- The spread: how much did it vary, and across how many runs? An interquartile range or a confidence interval is appropriate, taken around the median when the timings are skewed.
- The conditions: what input size? How many workers? What baseline?
If results include variance and conditions, you can begin to judge their relevance to your problem. If results are a single number with no context, they are a sound bite, not a result.
2.5.6 Reading the interpretation
Interpretation is the author’s explanation of why the results came out this way. Good interpretation goes beyond restating the number. It explains the mechanism.
For example: “Memory savings disappeared after the first garbage collection. The collector writes to every reachable object, dirtying shared pages and forcing privatization.” This explains why the garbage collector design caused the result.
Weak interpretation just restates the result: “Forked workers used only a little less memory than separately started ones.” This tells you what but not why.
2.5.7 Reading the limitations
Every experiment has limits. A good experiment states them plainly. Limitations can include:
- The workload was large or small. Different workloads scale differently.
- The hardware was a laptop or a server. Results may not transfer to other machines.
- Only three runs were performed. Variance is uncertain.
- The measurement tool can have overhead that affects the result.
- The implementation was tuned or untuned.
An experiment without limitations is suspicious. Good authors list the dimensions along which their results may not generalize.
If the limitations touch your decision, the result may not carry over to your case. If the limitations are minor, you can trust the results more widely.
2.5.8 Reading the next experiment
The “Next experiment” section describes what the author will measure to answer remaining questions. This section tells you what is still unknown.
A vague list suggests the author has not worked out what the results leave open. A specific one shows which questions the author thinks are still unanswered.
2.5.9 Worked example: reading fork-cow-first-gc
The Fork, Copy-on-Write, and the First GC experiment in my Experiments section is a real example. Let me walk through it using this framework.
Question
“Does fork’s copy-on-write save worker memory for R?” This is narrow and measurable. You can design an experiment to answer it.
Hypothesis
The hypothesis stated: “Workers forked from a prewarmed template would share one physical copy of the loaded packages, so a forked pool would use far less memory than the same number of separately started workers.” It names the plan’s aim of 10 to 25 times less aggregate memory at 32 workers, and a kill criterion of 5 times less than the best incumbent framework.
This is explicit and measurable. You can calculate the ratio and test it against the kill criterion.
Setup and results
The experiment ran sunlight against four incumbent frameworks at two configurations, 8 workers with the core tidyverse preloaded and 32 workers with Seurat, and summed the memory of every worker after it had run a task. sunlight’s aggregate PSS came out 1.28 times below the best incumbent’s aggregate RSS at 8 workers and 1.10 times below at 32, against the 5 times the kill criterion asked for. A second setup measured four forked workers at each stage of their startup, to see where the sharing went.
The setup names the workloads, the worker counts and the measure, and the results tie each figure to its configuration. The record also states the caveats that travel with the pool numbers: sunlight ran last against a warm file cache, which bears on its start-up times, the host was WSL2, and crew is left out of the memory comparison because it did not start all its workers.
Limitations and strength
The experiment states its limitations plainly: “Both preload stacks, tidyverse and Seurat, are heavy. A template with a small heap has less to privatize, and I did not measure one.”
This names the main reason the result might not transfer, which is good practice.
The experiment also states a limitation of the measurement tool: “I read RSS, PSS and private memory from /proc, not page-fault counts, so I know how much was privatized but not the order in which the pages went.”
This acknowledges what the experiment did NOT measure and why that matters.
Interpretation
The explanation goes beyond the number: “The child’s garbage collector is the culprit. […] a full collection (level 2 in memory.c) walks every reachable object and sets a mark bit in its header. Setting a mark bit is a write, and a write to an object header dirties the page that holds the object, so the kernel copies that page from the parent.”
This explains the mechanism, and with it why the design of R’s garbage collector, not fork, set the result.
Strengths
This experiment follows the structure. It states what it measured and what it did not. It explains why the hypothesis was wrong. It proposes specific next experiments to resolve remaining questions.
Weaknesses
By this page’s own standard, the record falls short on repetition. It records the host, but each pool configuration ran once, so there is no spread to report, and its own “Gaps in this record” section says so. It could also try more worker counts than 8 and 32, follow memory over a long run, not only at a few startup stages, and compare against a garbage collector with external mark bitmaps to test whether the mechanism hypothesis is correct.
2.5.10 Holding experiments to this standard
The Experiments section in my work follows this structure. All experiment pages must state their question, hypothesis, setup, results, interpretation, and limitations.
When you read my results, use this structure as a checklist. Does the experiment answer the question I care about? Do the limitations apply to my use case? Is the hardware comparable to mine? Are there other interpretations of the results that the author did not consider?
If an experiment in my corpus is missing a section or if a section is vague, that is a failure on my part. Experiments are most useful when they are complete and explicit.
2.5.11 Common mistakes in reading experiments
One mistake is reading results without reading limitations. A result that is valid in one context is misleading in another. Always read the limitations section.
Another mistake is trusting an experiment that has no limitations section. Every experiment has limits. An author who lists none has either not thought deeply about their work or is hiding something.
A third mistake is assuming an experiment’s mechanism explanation is correct because it sounds plausible. The author can be wrong about why the result occurred. Look for next experiments that test the mechanism. Mechanisms are hypotheses, not facts.
Further reading
- Fisher, R. A. (1935). The Design of Experiments. The classical reference on controls, randomization and replication.
- Hoefler, T. and Belli, R. (2015). “Scientific Benchmarking of Parallel Computing Systems”. SC15. The closest thing to a checklist for the kind of measurement this section is about. https://doi.org/10.1145/2807591.2807644
- Nature’s “Statistics for Biologists” collection, which gathers the Nature Methods “Points of Significance” column on statistical practice, written for working scientists. https://www.nature.com/collections/qghhqm