From ea81dfa7929ba83bf4d24e1be34b8384716a637e Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 14 Oct 2019 20:44:08 +0200 Subject: add documentation for loop, cfrac, espresso --- src/benchmarks/loop.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/benchmarks/loop.py') diff --git a/src/benchmarks/loop.py b/src/benchmarks/loop.py index 5f016d8..5a957b9 100644 --- a/src/benchmarks/loop.py +++ b/src/benchmarks/loop.py @@ -15,7 +15,25 @@ # You should have received a copy of the GNU General Public License # along with allocbench. If not, see . -"""Definition of the loop micro benchmark""" +"""Definition of the loop micro benchmark + +This benchmark allocates and immediately deallocates a pseudo random sized allocation +N times in T threads. The acquired memory is neither read nor written. Not using the +allocations at all maybe seems odd but this micro benchmark should only measure +the allocators fast paths, scalability and management overhead. +Using the allocations will add cache effects to our results which are +measured for example in the false sharing or larson benchmarks. + +Observations: +* Glibc's factor two faster for allocations <= 1024B +* TCMalloc suffers when allocating only small chunks + +Interpretation: +* A significant higher cache miss rate than other allocators could mean that + internals suffer from false sharing (TCMalloc). +* Speed changes with constant threads but changing sizes may show performance + differences in differing strategies for seperate sizes (glibc thread caches < 1032B) +""" from src.benchmark import Benchmark @@ -29,7 +47,7 @@ class BenchmarkLoop(Benchmark): def __init__(self): name = "loop" - self.cmd = "loop{binary_suffix} {nthreads} 1000000 {maxsize}" + self.cmd = "loop{binary_suffix} {nthreads} 1000001 {maxsize}" self.args = {"maxsize": [2 ** x for x in range(6, 16)], "nthreads": Benchmark.scale_threads_for_cpus(2)} -- cgit v1.2.3