QDpy parallelism benchmarks

Ordered comparison across 16 methods

The plots compare sequential evaluation, four threads, four processes, and local Ray with four CPUs. The 384 searches cover three seeds and two evaluator costs. All four executors returned matching ordered result archives and reported counters for each method, workload, and seed.

Search times for 16 QDpy methods. The left panel uses one Rastrigin score per evaluation and the right uses 2,048. Markers show medians and lines span the three seeds.

Speed relative to sequential for threads, processes, and local Ray across the same 16 methods and two workloads. The dashed line marks equal speed.

The runtime plot uses seconds on a log scale. The speedup plot divides each seed’s sequential time by its time under the other executor before taking the median. The lines span the smallest and largest observations across the three seeds. A speedup above 1× means the executor finished sooner than sequential.

Sequential led for 13 of 16 methods with the cheap evaluator. With 2,048 scores per candidate, threads led for 15 methods. For MAP-Elites on that workload, threads took 0.29 s, processes 0.30 s, Ray 0.43 s, and sequential 0.66 s. Their paired speedups were 2.24×, 2.20×, and 1.53×. BOP-Elites led with sequential evaluation on both workloads.

Executor setup and warm-up took 0.20 s for threads, 4.79 s for processes, and 8.60 s for local Ray. Those costs matter when running one short search with a fresh pool.

How the comparison was run

Each search had 768 evaluation attempts with batches of 32 and packs of eight. BOP-Elites had 48 attempts and asks for one point at a time. CMA-MAEGA counts each centre gradient evaluation and packs offspring evaluations. Extract-ME submits one seeded rollout per task and includes incumbent reevaluations in its budget. Results are applied in submission order within each batch.

The common evaluator uses eight-dimensional normalized Rastrigin and the first two genome coordinates as descriptors. The cheap workload calculates one score per candidate. The costlier workload averages 2,048 deterministic shifted scores per candidate. MOME uses two opposing objectives. Constrained MAP-Elites adds a constraint on the sum of the first two coordinates, and Extract-ME adds small seeded noise to fitness. MAP-Elites variants use 256 cells, including fixed centroids for CVT-MAP-Elites. NSLC and Dominated Novelty Search retain their own archive structures. Use the plots to compare executors within a method and workload.

The runs used QDpy revision f31c10f on a Linux machine with an Intel Xeon E5-2630 v4, CPython 3.12.14, NumPy 2.5.5, SciPy 1.18.1, and Ray 2.60.0. The driver and worker pools shared four pinned physical cores. BLAS used one thread, and Discount Model Search ran on CPU. Search times include evaluation, transport, and the coordinator’s search and archive work. They exclude construction, warm-up, and fingerprinting. The data file records executor setup and worker warm-up separately.

Per-run results and environment details

Reproduce the plots

From the repository root, install the optional dms and ray extras to run the full matrix. Use a node-local TMPDIR for process and Ray workers. The CPU numbers here select four distinct cores on the benchmark host.

python -m pip install -e ".[dms,ray]"
export OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1
export TMPDIR=/dev/shm RAY_USAGE_STATS_ENABLED=0

taskset -c 10-13 python -m scripts.benchmark_methods run \
    --backends sequential multithreading concurrent ray \
    --output build/method-parallelism/results.json
python -m scripts.benchmark_methods plot build/method-parallelism/results.json \
    --output-dir build/method-parallelism/plots

Use --methods map cvt isoline dns mome to try a smaller matrix with the base installation and the default three local executors. The plot command checks the seed pairs and archive fingerprints before drawing.

The sections below report earlier MAP-Elites experiments, each with its own workload and timing window.

One million Rastrigin evaluations on one machine

Each executor ran one seeded MAP-Elites search on Linux with Python 3.14.4 and the QDpy 0.1.3.dev1 default wheel. The budget was one million candidates, with batches of 128 and packs of 32. The pools used four workers and numerical libraries used one thread per process. Logging was disabled.

Executor

Search time

Candidates/s

Speed relative to sequential

Sequential

93.15 s

10,736

1.00×

Four threads

113.51 s

8,810

0.82×

Four processes

134.26 s

7,448

0.69×

All runs filled 1,024 cells. Feedback arrived in different orders, which changed the archives and update counts. The process run finished and saved its report, then emitted a forkserver cleanup error on the network filesystem. A smaller check using a node-local temporary directory shut down cleanly. Benchmark commands

Varying pack size and objective cost

These are medians of three runs per setting on Linux with Python 3.14.4 and four workers per pool. Process timings include worker startup. The evaluator averages the indicated number of deterministic shifted Rastrigin scores for each candidate. One candidate still counts as one evaluation.

Candidates

Batch / pack size

Scores per candidate

Sequential

Threads

Processes

32,768

128 / 32

1

2.07 s

2.51 s

4.89 s

32,768

1,024 / 256

1

2.05 s

2.20 s

4.49 s

16,384

1,024 / 256

128

2.07 s

1.75 s

3.79 s

32,768

1,024 / 256

512

10.55 s

6.61 s

7.49 s

At 512 scores per candidate, threads were 1.60× as fast and processes were 1.41× as fast as sequential. When comparing executors for your own search, keep the batch size fixed so the algorithm draws parents from the archive at the same points in the run. Vary the pack size to trade dispatch overhead against the number of tasks available to workers. Packed evaluation benchmark

Ordered BipedalWalker episodes

Each search ran 192 seeded episodes with a 120-step cap. Python 3.11.16 and Gymnasium 1.4.0 ran on Linux. Both pools used four workers. Batch size was 32 and results were applied in submission order. The median of three repeats is shown for each setting.

Candidates per pack

Sequential

Threads

Processes

1

6.09 s

14.96 s

5.59 s

4

5.93 s

14.79 s

5.69 s

8

5.60 s

15.49 s

5.60 s

All 27 runs retained the same 40 elites with matching measurements and order. At the fastest settings, sequential and process evaluation each took about 5.6 seconds. Walker benchmark command

One archive across two Ray nodes

Shoal job 4159 used Apptainer, Python 3.12.16, Ray 2.60.0, and eight Ray CPUs per node. Each search evaluated 4,096 candidates in batches of 512 and packs of 16. The costlier workload repeated the same scalar Rastrigin calculation 512 times per candidate. The serial and Ray runs used ordered feedback and gave byte-identical archive exports with 960 occupied cells.

Calls per candidate

Serial time

Two-node Ray time

Ray speed relative to serial

Ray candidates on shoal1 / shoal2

1

1.60 s

7.61 s

0.21×

3,376 / 720

512

5.86 s

2.84 s

2.07×

2,256 / 1,840

Search times exclude cluster startup and archive export. The first Ray workload includes worker warm-up. Slurm recorded 69 seconds for the original allocation, covering startup, both serial references, both Ray searches, and shutdown. The documentation verification run in job 4170 reproduced the archives and timed the costlier workload at 6.37 s serial and 2.99 s with Ray. Ray recipe and outputs

Five million evaluations across independent Rundra tasks

Shoal job 4153 ran 100 seeds of 50,000 candidates each. Rundra scheduled four worker allocations concurrently, each running 25 independent searches on 25 CPUs. Each seed wrote a separate archive. The fetched manifests accounted for all five million candidates and every search filled its 1,024 cells.

Measurement

Result

Median search duration per seed

16.85 s

Elapsed Slurm execution across the four concurrent allocations

27 s

Aggregate throughput over that execution window

About 185,000 candidates/s

The execution window includes container startup and task result writes. Image preparation, queueing, and retrieval are outside the window. This is sweep throughput across 100 archives. The Ray section reports search time for one archive. Rundra sweep recipe

Shoal also ran 3,712 matched-budget method trials across 128 independent seeds. QD category comparison and plots

Reproduce the comparisons

Run these commands from the repository root. Set TMPDIR to a node-local directory for the process pool.

export OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1

for backend in sequential multithreading concurrent; do
    python -m scripts.benchmark_qdpy parallel --evaluations 1000000 \
        --batch-size 128 --pack-size 32 --workers 4 --parallelism "$backend" \
        --output "build/parallel-million-$backend.json"
done

python -m scripts.benchmark_qdpy parallel --evaluations 32768 \
    --batch-size 1024 --pack-size 256 --workers 4 --rastrigin-samples 512 \
    --repeats 3 --output build/parallel-costly.json

The reports contain environment information, timings, and archive fingerprints. Add --ordered when you need the same archive across executors. For the Walker command and its optional dependencies, see the benchmark guide. For the multi-node command and per-host evaluation counts, see the Ray tutorial.