Skip to content

perf(competitor): add dataset-specific ALEX load-factor probes - #4

Open
l05k wants to merge 8 commits into
refactorfrom
perf/alex-256slot-load-factor
Open

l05k wants to merge 8 commits into
refactorfrom
perf/alex-256slot-load-factor

Conversation

@l05k

@l05k l05k commented Jun 1, 2026

Copy link
Copy Markdown
Owner

Task Description

Find ALEX-256slot load-factor settings for covid, fb-1, and osm such that each dataset has a parameter version whose memory is within 10% of ART, then compare performance with three benchmark repeats.

What Changed

Added three separate ALEX-256slot variants, each copied from alex-256slot and registered as an explicit benchmark index:

Variant kMaxDensity_ kInitDensity_ kMinDensity_ Intended dataset
alex-256slot-lf024 0.6 0.5 0.24 covid
alex-256slot-lf020 0.6 0.5 0.20 fb-1
alex-256slot-lf019 0.6 0.5 0.19 osm

The original alex and alex-256slot implementations are unchanged. The earlier single alex-256slot-lowlf probe was replaced because the intended experiment is dataset-specific matching, not one global setting.

Benchmark artifacts added:

  • result/motivation/alex_256slot_dataset_load_factor_raw.csv
  • result/motivation/alex_256slot_dataset_load_factor_summary.csv
  • result/motivation/alex_256slot_dataset_load_factor.md
  • reports/benchmark/20260602-alex-256slot-dataset-load-factor.md

Key Design Decisions

  • Encode each load-factor setting as a separate index name so benchmark rows remain self-describing.
  • Keep kMaxDensity_=0.6 and kInitDensity_=0.5 fixed after quick probes; tune kMinDensity_ per dataset.
  • Preserve dataset handling, workload composition, random seed, output schema, and original ALEX/ALEX-256slot parameters.
  • Exclude linear per the clarified scope.

Alternatives Considered

  • One global low-load-factor variant: rejected after clarification; the requirement is one tuned parameter version per dataset.
  • Runtime density flags: rejected because explicit index names make the experimental variable visible in CSV rows and avoid broad benchmark configurability.
  • More aggressive kInitDensity_=0.45, kMinDensity_=0.35: rejected because full-size bulk-load probes crashed.

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated: registered and exercised the new competitors through microbench
  • Manual testing performed:
    • Build:
      cmake --build build --target microbench -j
    • Correctness sanity for alex-256slot-lf019, alex-256slot-lf020, and alex-256slot-lf024:
      ./build/microbench --keys_file=datasets/linear-500.txt --keys_file_type=text --read=0.0 --insert=0.0 --update=0.0 --scan=0.0 --delete=0.0 --test_suite=21 --operations_num=0 --table_size=500 --init_table_ratio=0.5 --del_table_ratio=0.0 --thread_num=1 --index=<variant> --preload_suite=0 --memory
      Observed for each variant: success_insert: 250, success_read: 500.
    • Acceptance benchmark: three repeats, single-thread, test_suite=22, 100M bulkload / 100M shuffled inserts, datasets from /root/workspace/datasets/{covid,fb-1,osm}.

Known Limitations / Follow-up Tasks

These are dataset-specific experimental controls for memory-matched comparisons. They are not throughput improvements over ART.

Acceptance summary:

Dataset Index Repeats Insert Mops/s avg Read Mops/s avg Memory GiB Memory / ART Target
covid art 3 1.729 2.043 7.829 1.000 baseline
covid alex-256slot 3 0.909 1.410 4.649 0.594 no
covid alex-256slot-lf024 3 0.834 1.222 7.975 1.019 yes
fb-1 art 3 1.404 1.243 9.794 1.000 baseline
fb-1 alex-256slot 3 0.599 0.845 4.968 0.507 no
fb-1 alex-256slot-lf020 3 0.565 0.800 9.869 1.008 yes
osm art 3 1.575 1.826 9.518 1.000 baseline
osm alex-256slot 3 0.636 0.947 4.700 0.494 no
osm alex-256slot-lf019 3 0.600 0.854 10.034 1.054 yes

Review Guidance

Focus on whether the dataset-specific variants and naming are acceptable for controlled memory-matched benchmark comparisons, and whether the benchmark artifacts/report provide enough evidence for the next analysis step.

l05k added 2 commits June 2, 2026 00:50
Add an isolated alex-256slot-lowlf competitor copied from alex-256slot, preserving the original variants while lowering copied data-node density thresholds for space/performance experiments.

Agent-Task: Tune ALEX-256slot occupancy/load-factor constants toward ART-relative memory and measure performance.

Agent-Decision: Keep the change as a separate benchmark index so baseline alex and alex-256slot remain comparable; only adjust copied density constants to kMax=0.6, kInit=0.5, kMin=0.4 after rejecting a lower 0.4/0.35/0.3 probe that crashed full-size bulk load.

Agent-Limitation: Single global density tuning did not meet the ART-relative memory target across datasets; benchmark artifacts document the miss.
Replace the single low-load-factor probe with three explicit ALEX-256slot variants tuned for covid, fb-1, and osm memory matching against ART. Keep the original alex and alex-256slot baselines unchanged.

Agent-Task: Find dataset-specific ALEX-256slot load-factor settings whose memory is within 10% of ART on covid, fb-1, and osm, then measure performance with three repeats.

Agent-Decision: Encode kMinDensity in separate index names alex-256slot-lf024, alex-256slot-lf020, and alex-256slot-lf019; retain kMaxDensity=0.6 and kInitDensity=0.5 across variants; remove the earlier alex-256slot-lowlf negative-result artifact.

Agent-Limitation: These variants are dataset-specific experimental controls for memory-matched comparisons, not throughput improvements over ART.
@l05k l05k changed the title perf(competitor): add ALEX 256-slot low-load-factor probe perf(competitor): add dataset-specific ALEX load-factor probes Jun 1, 2026
Add a seaborn notebook under result/motivation that plots space versus insert/read throughput for ART, ALEX, LIPP, LIPP-256slot, and the dataset-specific memory-matched ALEX-256slot variants across covid, fb-1, and osm.

Agent-Task: Provide a Jupyter notebook plotting space vs throughput using seaborn for the relevant benchmark result directory.

Agent-Decision: Keep the notebook output-free so users run it with the repository uv notebook extra to render figures locally.

Agent-Limitation: The notebook reads existing checked-in summary CSVs and does not regenerate benchmark data.
@l05k

l05k commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

Added result/motivation/alex_256slot_space_throughput.ipynb, an output-free seaborn notebook that plots space (GiB) vs throughput (Mops/s) for art, alex, lipp, lipp-256slot, and the dataset-specific memory-matched ALEX-256slot variants across covid, fb-1, and osm. It is intended to be run with uv run --extra notebook jupyter notebook result/motivation/alex_256slot_space_throughput.ipynb. Validation: uv run --extra notebook python3 ... parsed the notebook JSON and verified all required source rows exist in the checked-in summary CSVs.

Update the seaborn notebook to include the linear dataset subplot using alex-256slot as the memory-close variant, and move the shared legend from the right side to the top of each figure.

Agent-Task: Add linear to the plotting notebook and place legends at the top.

Agent-Decision: Use the existing motivation summary for linear because no dataset-specific load-factor variant was needed there; keep tuned dataset rows from the load-factor summary.

Agent-Limitation: The notebook remains output-free and must be run by the user to render figures.
@l05k

l05k commented Jun 2, 2026

Copy link
Copy Markdown
Owner Author

Updated result/motivation/alex_256slot_space_throughput.ipynb: added the linear subplot using baseline alex-256slot as the memory-close 256-slot variant, widened the figure to four dataset panels, and moved the shared legend to the top of the insert/read figures. Validation reran via uv run --extra notebook python3 ... to confirm notebook JSON and required rows.

l05k added 4 commits June 2, 2026 15:27
…-throughput plot

The notebook filtered motivation data to BASELINE_INDEXES (which excludes
alex-256slot) before looking up the linear dataset's alex-256slot row.
Split into motivation_full (unfiltered, used for linear lookup) and
motivation (filtered to baselines, used for plotting).

Agent-Task: fix ValueError for linear dataset in alex_256slot_space_throughput.ipynb
Agent-Decision: keep original alex-256slot for linear (not tuned variant) since space is already within 10% of ART
Agent-Limitation: none
…hroughput plot

Replace the Jupyter notebook with a pure Python script that:
1. Prints the combined plot_data table (dataset x index x throughput x memory).
2. Prints the melted throughput_data table.
3. Saves insert and read scatter plots as PNG files.

This avoids the notebook runtime dependency and makes the analysis
directly reproducible with a single command:
  uv run --extra notebook python3 result/motivation/alex_256slot_space_throughput.py

Agent-Task: convert alex_256slot_space_throughput.ipynb to standalone script
Agent-Decision: savefig to PNG since headless environment has no display
Agent-Limitation: none
- Merge all alex-256slot(-lf*) variants into a single 'alex-256slot'
  legend label to avoid overcrowded legend/item overlap. Printed tables
  retain original index names.
- Switch to Carlito (Calibri metric-compatible) as the default sans-serif
  font with consistent font sizes across all elements.

Agent-Task: unify alex-256slot legend, switch to Calibri/Carlito font
Agent-Decision: normalize labels after printing tables but before plotting
Agent-Limitation: none
…y note

Two minor documentation fixes from PR review:
- Research record: note benchmarked commit 36f63c9 in Validation Method
- space_throughput.py: document dependency on motivation summary CSV

Agent-Task: Fix minor issues found during PR #4 review
Agent-Model: claude-opus-4.5
Agent-Decision: Follow-up commit per review workflow; do not amend
Agent-Limitation: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant