| title | Run QuantLib benchmark workloads |
|---|---|
| weight | 5 |
| layout | learningpathall |
After building QuantLib, move to the test suite directory:
cd ~/QuantLib-$QL_VER/test-suiteFrom the test suite directory, run a baseline benchmark:
./quantlib-benchmarkThis confirms that the benchmark is working correctly on your system.
To understand how performance scales, run benchmarks with different numbers of threads:
./quantlib-benchmark --size=80 --nProc=1
./quantlib-benchmark --size=80 --nProc=2
./quantlib-benchmark --size=80 --nProc=4These runs keep the workload size constant while changing the number of threads.
Next, vary the problem size while keeping the thread count fixed:
./quantlib-benchmark --size=1 --nProc=1
./quantlib-benchmark --size=5 --nProc=1
./quantlib-benchmark --size=8 --nProc=1This shows how runtime changes as the workload increases.
The Standard_D4ps_v5 virtual machine has a limited number of cores.
Start with:
- 1 thread
- 2 threads
- 4 threads
Using larger values can oversubscribe the system and lead to inconsistent results.
Your notes include larger values such as 12, 24, and 48 threads, but these are better suited for larger machines.
For meaningful comparisons:
- change one parameter at a time
- keep the environment consistent
- repeat runs if results vary
This helps ensure that differences in runtime reflect real performance changes.