Performance
Measurement Conditions and Scope¶
The analysis covers arXiv Fast Crawl and Recovery for the 25,000-ID corpus, reference reruns dominated by cache hits, and a 500-ID benchmark with empty caches. Reference-rerun results were reconciled with the exported metrics and crawl records. The notebook generates figures and tables from the analysis data during compilation.
The 500-ID benchmark covers acquisition through export and validation. The reported active time includes API retries and failed lookups. The workload contains 100 IDs from each of the five assigned ranges.
Source
from pathlib import Path
import sys
# Support execution from the project root or the notebook's own directory.
root = next(p for p in (Path.cwd(), *Path.cwd().parents)
if (p / "myst.yml").is_file() and (p / "milestone1" / "reporting.py").is_file())
if str(root) not in sys.path:
sys.path.insert(0, str(root))
from milestone1.reporting import load_results, total, integer, percent, seconds, hms, table
data = load_results()
arxiv = data["arxiv"]["ranges"]
s2 = data["semantic_scholar"]["ranges"]
from milestone1.reporting import analysis, COLORS, chart_style, finish_figure
from matplotlib.ticker import FuncFormatter
plt = chart_style()
labels = [f"Range {r['range']}" for r in arxiv]
positions = list(range(len(labels)))
comma = FuncFormatter(lambda value, _: f"{value:,.0f}")How Much Time Is Spent on Fast Crawl and Recovery?¶
Figure 1. Recorded arXiv phase durations in decimal hours. Each horizontal bar represents a range; phase values are labeled inside and their sum to the right. Bar lengths use the printed phase times and labels are rounded to two decimals.
Source
fig, ax = plt.subplots(figsize=(10.5, 5.6), layout="constrained")
fast = [seconds(r["fast_hms"])/3600 for r in arxiv]
recovery = [seconds(r["recovery_hms"])/3600 for r in arxiv]
ax.barh(positions, fast, height=0.62, color=COLORS["blue"], label="Fast Crawl")
ax.barh(positions, recovery, left=fast, height=0.62,
color=COLORS["orange"], label="Recovery")
for i, (f, r) in enumerate(zip(fast, recovery)):
ax.text(f/2, i, f"{f:.2f}", ha="center", va="center",
color="white", fontweight="bold", fontsize=13)
ax.text(f+r/2, i, f"{r:.2f}", ha="center", va="center",
color="#111827", fontweight="bold", fontsize=13)
ax.text(f+r+0.3, i, f"{f+r:.2f} h", va="center",
color="#111827", fontweight="bold", fontsize=12)
ax.set(yticks=positions, yticklabels=labels, xlim=(0, 22))
ax.set_xticks(range(0, 23, 2))
ax.invert_yaxis()
ax.set_xlabel("Recorded invocation time (hours)", fontsize=13, labelpad=10)
ax.set_title("arXiv: Fast Crawl and Recovery", fontsize=16, pad=16)
ax.tick_params(axis="both", labelsize=12)
ax.spines["left"].set_visible(False)
ax.tick_params(axis="y", length=0, pad=12)
ax.grid(axis="x", alpha=0.16)
fig.legend(*ax.get_legend_handles_labels(), loc="outside lower center",
ncol=2, frameon=False, fontsize=13)
finish_figure(fig, "performance-arxiv-runtime",
"Horizontal stacked bars show recorded Fast Crawl and Recovery hours for each range, with readable phase labels and totals.")
overall = data["arxiv"]["reported_overall"]
reported_time = seconds(overall["total_hms"])
assigned = total(arxiv, "assigned")
longest = max(arxiv, key=lambda r: seconds(r["total_hms"]))
shortest = min(arxiv, key=lambda r: seconds(r["total_hms"]))
analysis(
f"The recorded total is {overall['total_hms']} of invocation time "
f"({reported_time/3600:.2f} hours), equivalent to {reported_time/assigned:.3f} recorded "
f"seconds per assigned ID. Recovery contributes "
f"{percent(seconds(overall['recovery_hms']), reported_time, 1)}. "
f"Range totals run from {shortest['total_hms']} (Range {shortest['range']}) to "
f"{longest['total_hms']} (Range {longest['range']}).",
"Recovery accounts for a substantial share of the recorded arXiv processing. "
"Reporting both phases captures the time spent on initial collection and subsequent retries.",
"These durations describe the reported arXiv invocations. Phase bars use the printed "
"per-range phase values; the overall figure above uses the recorded aggregate."
)
What Do the Semantic Scholar Timers Include?¶
Figure 2. Fetch, crawl-loop and notebook-cell times from the cache-heavy reruns. Each panel uses its own scale. Labels below each range give the number of fresh publication lookups.
Source
fig, axes = plt.subplots(1, 3, figsize=(13, 4.8), layout="constrained")
fresh = [r["input_papers"]-r["cache_hits"]-r["invalid_id"] for r in s2]
tick_labels = [f"Range {r['range']}\n{n} fresh" for r,n in zip(s2,fresh)]
for ax, key, title, color in (
(axes[0], "fetch_seconds", "Accumulated fresh-lookup fetch time", COLORS["blue"]),
(axes[1], "crawl_seconds", "Crawl-loop wall time", COLORS["teal"]),
(axes[2], "cell_seconds", "Notebook-cell wall time", COLORS["purple"]),
):
values = [r[key] for r in s2]
bars = ax.bar(positions, values, color=color)
ax.bar_label(bars, labels=[f"{v:,.2f}" for v in values], padding=4, fontsize=9)
ax.set(xticks=positions, xticklabels=tick_labels, ylim=(0, max(values)*1.2),
ylabel="Time (seconds)", title=title)
ax.grid(axis="y", alpha=0.18)
finish_figure(fig, "performance-semantic-scholar-timing",
"Cache-heavy Semantic Scholar rerun timings with separate scales for fetch and cell time, and fresh lookup counts.")
cached_count = total(s2, "cache_hits")
inputs = total(s2, "input_papers")
fresh_count = inputs-cached_count-total(s2, "invalid_id")
largest_cell = max(s2, key=lambda r: r["cell_seconds"])
analysis(
f"Across the five reruns, {integer(cached_count)} / {integer(inputs)} inputs are cache hits "
f"({percent(cached_count, inputs, 3)}), leaving {integer(fresh_count)} fresh lookups. "
f"Their accumulated fetch time is {total(s2, 'fetch_seconds'):.4f} seconds, or "
f"{total(s2, 'fetch_seconds')/fresh_count:.4f} seconds per fresh publication. "
f"The crawl loops sum to {total(s2, 'crawl_seconds'):.2f} seconds. "
f"Range {largest_cell['range']} has the largest cell time ({largest_cell['cell_seconds']:.2f} seconds).",
"The crawl loop includes cache reads, API requests, normalization and cache writes. "
"The cell timer includes the surrounding cell work up to the metrics/CSV export boundary.",
"Fresh fetch timers include pacing and retries for one publication and stop before "
"normalization/cache writing. The 33 uncached inputs yielded 15 ok and "
"18 not_indexed results. Checkpoint loading and table export/validation lie outside the cell timer."
)
What Memory Was Observed in the Reference Rerun?¶
Figure 3. Average and peak sampled Semantic Scholar notebook-process RSS, converted from bytes to MiB. The two series share a zero-based scale; each label shows the measured value to two decimal places.
Source
fig, ax = plt.subplots(figsize=(10.5, 5.8), layout="constrained")
width = 0.32
averages = [r["average_rss_mib"] for r in s2]
peaks = [r["peak_rss_mib"] for r in s2]
avg_bars = ax.barh([i-width/2 for i in positions], averages, height=width,
color=COLORS["blue"], label="Average sampled RSS")
peak_bars = ax.barh([i+width/2 for i in positions], peaks, height=width,
color=COLORS["orange"], label="Peak sampled RSS")
for bars, values in ((avg_bars, averages), (peak_bars, peaks)):
ax.bar_label(bars, labels=[f"{v:.2f}" for v in values], padding=5, fontsize=10)
ax.set(yticks=positions, yticklabels=labels, xlim=(0, max(peaks)*1.18),
xlabel="Notebook-process RSS (MiB)", title="Semantic Scholar: cache-heavy rerun memory")
ax.invert_yaxis()
ax.tick_params(labelsize=12)
ax.grid(axis="x", alpha=0.16)
fig.legend(*ax.get_legend_handles_labels(), loc="outside lower center", ncol=2, frameon=False)
finish_figure(fig, "performance-semantic-scholar-memory",
"Horizontal bars compare average and peak notebook-process RSS on a shared zero-based MiB axis.")
analysis(
f"Sampled process peaks range from {min(peaks):.2f} to {max(peaks):.2f} MiB. "
f"The largest within-range difference between peak and average RSS is "
f"{max(b-a for a,b in zip(averages,peaks)):.2f} MiB.",
"The process footprint differs across ranges. Range 1 has the smallest peak and Range 5 the largest.",
"RSS is sampled from the current Python process every 0.5 seconds and includes the "
"existing kernel/Colab baseline. The metrics contain the average, peak and sample count "
"for each measured cell; child processes are outside this process-level measure."
)
How Much Persistent Storage Do the arXiv Checkpoints Use?¶
Figure 4. Final compressed arXiv checkpoint sizes, including retained source files and bookkeeping. Values are in MiB and describe persistent checkpoint output.
Source
fig, ax = plt.subplots(figsize=(10.5, 4.4), layout="constrained")
sizes = [r["checkpoint_mib"] for r in arxiv]
bars = ax.bar(positions, sizes, color=COLORS["teal"])
ax.bar_label(bars, labels=[f"{v:,.2f}" for v in sizes], padding=4)
ax.set(xticks=positions, xticklabels=labels, ylim=(0, 350),
ylabel="Compressed checkpoint storage (MiB)", title="arXiv: retained checkpoint storage")
ax.grid(axis="y", alpha=0.18)
finish_figure(fig, "performance-checkpoint-storage",
"Final compressed arXiv checkpoint sizes range from 237.15 to 291.45 MiB.")
size = total(arxiv, "checkpoint_mib")
smallest = min(arxiv, key=lambda r: r["checkpoint_mib"])
largest = max(arxiv, key=lambda r: r["checkpoint_mib"])
analysis(
f"The retained arXiv checkpoints total {size:,.2f} MiB ({size/1024:.2f} GiB). "
f"Range sizes run from {smallest['checkpoint_mib']:.2f} MiB (Range {smallest['range']}) "
f"to {largest['checkpoint_mib']:.2f} MiB (Range {largest['range']}).",
"Equal assigned ID counts produce different checkpoint volumes across the five ranges.",
"This measurement is the compressed arXiv checkpoint footprint, including retained "
"sources and bookkeeping. It describes the files saved by this stage."
)
What Storage Was Measured for Semantic Scholar?¶
Figure 5. The left panel shows final S2 range-directory sizes after table export, estimated from cache metrics and Drive file sizes. The right shows the sampled peak of the reference-cache directory during the crawl cell. Both use MiB and retain their different directory and time scopes.
Source
fig, axes = plt.subplots(1, 2, figsize=(11.5, 4.8), layout="constrained")
for ax, key, title, color in (
(axes[0], "final_output_bytes", "Final S2 range directories", COLORS["teal"]),
(axes[1], "peak_cache_disk_bytes", "Sampled peak: reference cache", COLORS["orange"]),
):
values = [r[key]/1024**2 for r in s2]
bars = ax.barh(positions, values, color=color)
ax.bar_label(bars, labels=[f"{v:.2f}" for v in values], padding=4)
ax.set(yticks=positions, yticklabels=labels, xlim=(0, max(values)*1.23),
xlabel="Storage (MiB)", title=title)
ax.invert_yaxis()
ax.grid(axis="x", alpha=0.18)
finish_figure(fig, "performance-semantic-scholar-storage",
"Final uncompressed Semantic Scholar range directories and sampled cache-directory disk peaks.")
output_bytes = total(s2, "final_output_bytes")
analysis(
f"Final S2 output totals {integer(output_bytes)} bytes ({output_bytes/1024**2:.2f} MiB). "
f"Sampled cache-directory peaks range from {min(r['peak_cache_disk_bytes'] for r in s2)/1024**2:.2f} "
f"to {max(r['peak_cache_disk_bytes'] for r in s2)/1024**2:.2f} MiB.",
"The final directories retain per-publication reference JSON and the exported tables and "
"reports. The normalized full-reference export adds "
f"{total(s2, 'raw_export_bytes')/1024**2:.2f} MiB across five ranges.",
"Final size combines measured cache bytes with the final table files listed on Drive. Cache disk "
"sampling uses a 30-second interval and covers reference/ only. These are uncompressed "
"JSON/CSV stage outputs; arXiv checkpoint archives have their own storage measure."
)
Recorded Measurements by Run¶
Table 1. Run identifiers and measured stage results. RSS is converted directly from the original byte values. Final S2 output size comes from the cache metrics plus post-export table file sizes on Drive.
Source
table(["Range", "Crawl (s)", "Cell (s)", "RSS peak (MiB)", "Final S2 output (bytes)"],
[[f"Range {r['range']}", f"{r['crawl_seconds']:.4f}",
f"{r['cell_seconds']:.4f}", f"{r['peak_rss_mib']:.2f}", integer(r["final_output_bytes"])] for r in s2])HTTP Request Activity¶
Table 2. Publication lookups and HTTP attempts in each rerun. Retries and HTTP 429 responses are counted at request level.
Source
table(["Range", "Fresh publications", "HTTP attempts", "Retries", "HTTP 429"],
[[f"Range {r['range']}", str(r["input_papers"]-r["cache_hits"]),
str(r["http_requests"]), str(r["http_retries"]), str(r["http_429"])] for r in s2])The five reruns recorded 33 fresh publication lookups, 81 HTTP attempts, 48 retries and 48 HTTP 429 responses. Final publication outcomes appear in Statistics.
Full-Corpus Final Storage¶
The compressed arXiv checkpoints and final S2 directory tree have different representations. Their sum measures the saved output footprint of these two stages, including their bookkeeping; it is distinct from uncompressed retained source content or peak working disk.
source_size = data['arxiv']['source_size']
arxiv_bytes = source_size['compressed_checkpoint_bytes']
s2_bytes = total(s2,'final_output_bytes')
table(['Full-corpus output','Bytes','GiB'],
[['arXiv compressed checkpoints',integer(arxiv_bytes),f'{arxiv_bytes/1024**3:.3f}'],
['S2 final range directories',integer(s2_bytes),f'{s2_bytes/1024**3:.3f}'],
['Combined saved footprint',integer(arxiv_bytes+s2_bytes),f'{(arxiv_bytes+s2_bytes)/1024**3:.3f}']])Interpreting Historical Runtime and Request Pacing¶
The historical ledger contains 110 recorded invocations (30 Fast Crawl, 80 Recovery), with 1,380 Recovery checkpoint updates. An update is a batch rewrite and does not mean that every publication was downloaded again.
A theoretical request-count model gives each 50-ID batch one initial
metadata query, one source request per expected version, and
ceil(S / 80) intermediate-date queries, where
S = sum(max(latest_version - 2, 0)) within that batch. It excludes retries
and extra checks. The counts below incorporate the three reconciled source
versions. The calculation N * 3.1 s describes a nominal pacing
budget; with a freely starting first request, an inter-start-only minimum
would instead use (N - 1) * 3.1 s before network/processing costs.
pacing = data['arxiv']['pacing_model']
requests = pacing['minimum_request_counts_by_range']
gap = pacing['minimum_start_gap_seconds']
table(['Range','Model minimum requests','Nominal N x 3.1 s budget (hours)'],
[[f'Range {i+1}',integer(n),f'{n*gap/3600:.2f}'] for i,n in enumerate(requests)]
+ [['Overall',integer(sum(requests)),f'{sum(requests)*gap/3600:.2f}']])
analysis(
f"The model gives {integer(sum(requests))} requests and {sum(requests)*gap/3600:.2f} hours "
f"of nominal pacing budget. In the {pacing['sample_publications']:,}-publication "
f"sample ({pacing['fully_processed_sample_batches']} complete batches), "
f"{pacing['sample_actual_requests']:,} requests are observed against "
f"{pacing['sample_model_requests']:,} modeled requests; the mean is "
f"{pacing['sample_seconds_per_request']:.2f} seconds per request.",
"This sample is consistent with pacing being a major elapsed-time constraint. "
"The ratio 3.1 / 3.33 describes proximity to the spacing constraint; it is not "
"a measured percentage of runtime spent sleeping.",
"Historical corpus runs used multiple workers; request-start spacing does not "
"guarantee one active connection. The recorded Fast Crawl total is lower than the "
"model's nominal budget, so the ledger, model and run conditions should not be "
"treated as a single complete controlled measurement. No missing runtime is imputed."
)Empty-Cache Benchmark on 500 Assigned IDs¶
The benchmark ran on Google Colab in CPU-only mode with 2 vCPU x86_64, Linux 6.6.159+ and Python 3.13.18. It takes the first 100 IDs in each range, for 25 batches of 20 IDs. The stages run sequentially with one worker and initially empty caches. arXiv uses a 3.1-second minimum interval and four retries. S2 uses an API key, a 1-second minimum interval and a 60-second cooldown after a terminal HTTP 429.
Figure 6. Active time by phase and publication outcomes at each crawl stage. Active time includes delay and retries and excludes setup, downtime and packaging.
bench = data['benchmark_500_ids']
phases = bench['phases']
inputs = bench['input_ids']
a = bench['arxiv']
s = bench['semantic_scholar']
fig, axes = plt.subplots(1, 2, figsize=(12, 4.6), layout='constrained',
gridspec_kw={'width_ratios': [1.15, 1]})
minutes = [p['seconds']/60 for p in phases]
bars = axes[0].barh(range(3), minutes, color=[COLORS['blue'], COLORS['orange'], COLORS['teal']])
axes[0].bar_label(bars, labels=[f"{p['seconds']:,.2f} s" for p in phases], padding=5)
axes[0].set(yticks=range(3), yticklabels=[p['name'] for p in phases],
xlim=(0, max(minutes)*1.36), xlabel='Active phase time (minutes)',
title='Time by phase')
axes[0].invert_yaxis()
ax = axes[1]
cumulative = [0, 0]
for values, label, color in [
([a['ok'], s['ok']], 'ok', COLORS['teal']),
([a['no_tex'], 0], 'no_tex', COLORS['gray']),
([a['error'], s['failed']], 'Failed', COLORS['red']),
([0, s['not_indexed']], 'not_indexed', COLORS['purple']),
]:
ax.barh([0, 1], values, left=cumulative, color=color, label=label, height=0.42)
for y, (start, count) in enumerate(zip(cumulative, values)):
if count >= 40:
ax.text(start + count/2, y, str(count), color='white', ha='center', va='center')
cumulative = [start+count for start, count in zip(cumulative, values)]
ax.set(yticks=[0, 1], yticklabels=['arXiv', 'Semantic Scholar'], xlim=(0, inputs),
xlabel='Publication IDs', title='Outcome by crawl stage')
ax.invert_yaxis()
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.14), ncol=2, frameon=False)
for ax in axes:
ax.grid(axis='x', alpha=0.18)
finish_figure(fig, 'performance-benchmark-phases',
'Active phase times and publication outcomes on the 500-ID benchmark.')
elapsed = bench['overall_seconds']
analysis(
f"The active phases total {elapsed:,.2f} seconds ({elapsed/3600:.2f} hours), "
f"or {elapsed/inputs:.2f} seconds per input ID. S2 takes "
f"{percent(phases[1]['seconds'],elapsed)} of the measured time. "
f"arXiv discovery totals {a['discovery_seconds']:.2f} seconds across {bench['batches']} batches.",
f"arXiv records {a['ok']} ok and {a['no_tex']} no_tex. All {inputs} publications reach S2. "
f"S2 records {s['ok']} ok, {s['failed']} terminal HTTP 429 failures and "
f"{s['not_indexed']} not_indexed, with {s['refs_total']:,} reference occurrences.",
f"All {bench['completed_phases']} phases completed without interruption. "
"Phase values are rounded independently. The first 100 IDs per range form a fixed "
"subset covering 2% of the assigned corpus."
)
Table 3. Timings, final statuses and HTTP activity in the benchmark. Per-ID times divide by the 500 original inputs, including unsuccessful lookups.
table(['Measurement','Active time (s)','Seconds / input'],
[[p['name'],f"{p['seconds']:,.2f}",f"{p['seconds']/inputs:.4f}"] for p in phases]
+ [['Complete measured window',f"{elapsed:,.2f}",f"{elapsed/inputs:.4f}"]])
table(['Stage','Inputs','ok','Other outcomes'],
[['arXiv', a['input_ids'], a['ok'], f"{a['no_tex']} no_tex, {a['error']} error"],
['Semantic Scholar', s['input_papers'], s['ok'],
f"{s['failed']} failed, {s['not_indexed']} not_indexed"]])
table(['Stage','HTTP attempts','HTTP 429'],
[['arXiv', a['http_requests'], 'Count unavailable'],
['Semantic Scholar', s['http_requests'], s['http_429']]])
analysis(
f"S2 receives {s['http_429']:,} HTTP 429 responses over {s['http_requests']:,} attempts "
f"({percent(s['http_429'], s['http_requests'])}). Export completes for "
f"{bench['validation']['ranges']} ranges with zero validation issues and zero warnings.",
"Several HTTP attempts can belong to one publication. Export validation checks "
"the produced rows, so a valid export can coexist with failed reference lookups.",
"The corpus reruns processed a separate workload dominated by cache hits. The benchmark's "
"reference phase illustrates performance under throttling with empty caches."
)Sampled Process-Tree RAM¶
Figure 7. Average and peak process-tree RSS by phase and for the full benchmark. The report records 23,784 samples, at a nominal interval of 0.5 seconds. The whole-benchmark average uses all recorded samples.
ram_labels = [p['name'] for p in phases] + ['Complete window']
averages = [p['average_tree_rss_mib'] for p in phases] + [bench['average_tree_rss_mib']]
peaks = [p['peak_tree_rss_mib'] for p in phases] + [bench['peak_tree_rss_mib']]
fig, ax = plt.subplots(figsize=(10.5, 5.5), layout='constrained')
for offset, values, color, label in [
(-0.18, averages, COLORS['blue'], 'Average sampled RSS'),
(0.18, peaks, COLORS['orange'], 'Peak sampled RSS'),
]:
bars = ax.barh([i+offset for i in range(len(ram_labels))], values,
height=0.32, color=color, label=label)
ax.bar_label(bars, labels=[f'{value:.2f}' for value in values], padding=4)
ax.set(yticks=range(len(ram_labels)), yticklabels=ram_labels, xlim=(0, max(peaks)*1.18),
xlabel='Tree RSS (MiB)', title='500-ID benchmark: sampled process-tree RAM')
ax.invert_yaxis()
ax.grid(axis='x', alpha=0.18)
ax.legend(loc='upper center', bbox_to_anchor=(0.5,-0.15), ncol=2)
finish_figure(fig, 'performance-benchmark-ram', 'Reported process-tree RSS by phase and overall.')
analysis(
f"The overall sampled peak is {bench['peak_tree_rss_mib']:.2f} MiB and the mean "
f"is {bench['average_tree_rss_mib']:.2f} MiB.",
"The arXiv phase accounts for the highest reported peak.",
"RSS covers the measured process tree. Sampling can miss short peaks."
)
Sampled Disk and Final Benchmark Output¶
Figure 8. Peak sampled disk and final output across the benchmark range directories on Drive. The report records 2,337 samples at a nominal interval of 5 seconds. The measurements exclude telemetry and source-code files.
fig, ax = plt.subplots(figsize=(10.5, 3.2), layout='constrained')
values = [bench['peak_disk_mib'], bench['final_disk_mib']]
bars = ax.barh([0, 1], values, color=[COLORS['orange'], COLORS['teal']], height=0.48)
ax.bar_label(bars, labels=[f'{value:.2f} MiB' for value in values], padding=5)
ax.set(yticks=[0, 1], yticklabels=['Sampled peak', 'Final output'],
xlim=(0, max(values)*1.25), xlabel='Combined directory size (MiB)',
title='500-ID benchmark: sampled disk and final output')
ax.invert_yaxis()
ax.grid(axis='x', alpha=0.18)
finish_figure(fig, 'performance-benchmark-disk', 'Peak sampled disk and end-of-run output for the benchmark.')
table(['Disk measurement','MiB'],
[['Sampled peak',f'{values[0]:.2f}'], ['Final output',f'{values[1]:.2f}']])
analysis(
f"The sampled disk peak is {values[0]:.2f} MiB, and final output occupies {values[1]:.2f} MiB.",
"The peak describes space occupied during processing. Final output describes the retained files.",
"These values apply to the measured subset. The full corpus has a separate saved-output measurement."
)
Illustrative Extrapolation to 25,000 IDs¶
Table 4. The estimates use measurements from a 20-ID pilot and a 500-ID benchmark. The 25,000-ID column is an extrapolation. Time and disk use linear scaling from the 500-ID measurements by a factor of 50. RAM uses a line fitted to the two reported points against the logarithm of ID count. Disk figures are available for the 500-ID benchmark.
from math import log
projection = bench['extrapolation']
pilot = projection['pilot']
target = projection['target_ids']
scale = target / bench['input_ids']
log_weight = log(scale) / log(bench['input_ids'] / pilot['input_ids'])
peak = bench['peak_tree_rss_mib']
mean = bench['average_tree_rss_mib']
estimated_peak = peak + (peak - pilot['peak_rss_mib']) * log_weight
estimated_mean = mean + (mean - pilot['average_rss_mib']) * log_weight
table(
['Metric', '20 IDs (reported)', '500 IDs (reported)', '25,000 IDs (estimated)'],
[
['Active phase time', f"{pilot['seconds']:.2f} s",
f"{bench['overall_seconds']/3600:.2f} h",
f"{bench['overall_seconds']*scale/3600:.2f} h"],
['Peak RAM', f"{pilot['peak_rss_mib']:.2f} MiB",
f"{peak:.2f} MiB", f"{estimated_peak:.2f} MiB"],
['Average RAM', f"{pilot['average_rss_mib']:.2f} MiB",
f"{mean:.2f} MiB", f"{estimated_mean:.2f} MiB"],
['Sampled peak disk', 'Unavailable', f"{bench['peak_disk_mib']:.2f} MiB",
f"{bench['peak_disk_mib']*scale/1024:.2f} GiB"],
['Final disk', 'Unavailable', f"{bench['final_disk_mib']:.2f} MiB",
f"{bench['final_disk_mib']*scale/1024:.2f} GiB"],
],
)The time estimate assumes the same active time per ID as the 500-ID run, including its observed throttling and retries. Disk scaling assumes the same space per ID. The two-point RAM fit has no independent validation at larger sizes. Use the estimates as a scenario for the sample’s conditions. The historical arXiv ledger and the measured corpus output of about 2.70 GiB describe separately observed results.