From 0d43a08edf8947d49dcece2e70c85ae95a6f3e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=5BQuy=20Anh=5D=20=C2=ABElliot=C2=BB=20Nguyen?= <23906-nguyenquy@users.noreply.gitlab.inf.ethz.ch> Date: Wed, 3 Jun 2026 22:37:08 +0200 Subject: [PATCH] Memory Read Bandwidth for x86 --- measurements/memory/x86/1.log | 37 ++++++++++++++++ measurements/memory/x86/2.log | 37 ++++++++++++++++ measurements/memory/x86/3.log | 37 ++++++++++++++++ measurements/variant_baseline/x86/2.log | 58 +++++++++++++++++++++++++ scripts/mem-bench.sh | 1 + 5 files changed, 170 insertions(+) create mode 100644 measurements/memory/x86/1.log create mode 100644 measurements/memory/x86/2.log create mode 100644 measurements/memory/x86/3.log create mode 100644 measurements/variant_baseline/x86/2.log create mode 100755 scripts/mem-bench.sh diff --git a/measurements/memory/x86/1.log b/measurements/memory/x86/1.log new file mode 100644 index 0000000..76a392f --- /dev/null +++ b/measurements/memory/x86/1.log @@ -0,0 +1,37 @@ +sysbench 1.0.20 (using system LuaJIT 2.1.1761786044) + +Running the test with following options: +Number of threads: 1 +Initializing random number generator from current time + + +Running memory speed test with the following options: + block size: 1048576KiB + total size: 20480MiB + operation: read + scope: global + +Initializing worker threads... + +Threads started! + +Total operations: 20 ( 37.08 per second) + +20480.00 MiB transferred (37967.45 MiB/sec) + + +General statistics: + total time: 0.5378s + total number of events: 20 + +Latency (ms): + min: 25.99 + avg: 26.87 + max: 33.18 + 95th percentile: 28.16 + sum: 537.47 + +Threads fairness: + events (avg/stddev): 20.0000/0.00 + execution time (avg/stddev): 0.5375/0.00 + diff --git a/measurements/memory/x86/2.log b/measurements/memory/x86/2.log new file mode 100644 index 0000000..e582bbd --- /dev/null +++ b/measurements/memory/x86/2.log @@ -0,0 +1,37 @@ +sysbench 1.0.20 (using system LuaJIT 2.1.1761786044) + +Running the test with following options: +Number of threads: 1 +Initializing random number generator from current time + + +Running memory speed test with the following options: + block size: 1048576KiB + total size: 20480MiB + operation: read + scope: global + +Initializing worker threads... + +Threads started! + +Total operations: 20 ( 37.63 per second) + +20480.00 MiB transferred (38536.77 MiB/sec) + + +General statistics: + total time: 0.5299s + total number of events: 20 + +Latency (ms): + min: 25.63 + avg: 26.48 + max: 36.38 + 95th percentile: 27.66 + sum: 529.61 + +Threads fairness: + events (avg/stddev): 20.0000/0.00 + execution time (avg/stddev): 0.5296/0.00 + diff --git a/measurements/memory/x86/3.log b/measurements/memory/x86/3.log new file mode 100644 index 0000000..90efd3b --- /dev/null +++ b/measurements/memory/x86/3.log @@ -0,0 +1,37 @@ +sysbench 1.0.20 (using system LuaJIT 2.1.1761786044) + +Running the test with following options: +Number of threads: 1 +Initializing random number generator from current time + + +Running memory speed test with the following options: + block size: 1048576KiB + total size: 20480MiB + operation: read + scope: global + +Initializing worker threads... + +Threads started! + +Total operations: 20 ( 37.35 per second) + +20480.00 MiB transferred (38249.60 MiB/sec) + + +General statistics: + total time: 0.5339s + total number of events: 20 + +Latency (ms): + min: 26.01 + avg: 26.68 + max: 33.21 + 95th percentile: 27.66 + sum: 533.54 + +Threads fairness: + events (avg/stddev): 20.0000/0.00 + execution time (avg/stddev): 0.5335/0.00 + diff --git a/measurements/variant_baseline/x86/2.log b/measurements/variant_baseline/x86/2.log new file mode 100644 index 0000000..441426c --- /dev/null +++ b/measurements/variant_baseline/x86/2.log @@ -0,0 +1,58 @@ +rm -f main_* run_tests *.o *.s variants/*.s variants/*.o headers/*.s headers/*.o +/usr/bin/g++ main.cpp ./variants/variant_baseline.cpp -o main_baseline -O3 -march=native -std=c++23 -Wall -Wextra -flto -DFLOPCOUNT=0 -DRANDOM_SEED=0 -DROOFLINE=0 -DBENCHMARK=1 +=== N_P=50 N_ITER=200 === +W(n) per iteration: 183700.00 flops +Q(n) per iteration: 6512 bytes +I(n): 28.21 flops/byte +W(n): 36740000.00 flops +T(n): 27372765.00 cycles +P(n): 1.34 flops/cycle + +=== N_P=100 N_ITER=200 === +W(n) per iteration: 727400.00 flops +Q(n) per iteration: 12912 bytes +I(n): 56.34 flops/byte +W(n): 145480000.00 flops +T(n): 107682440.00 cycles +P(n): 1.35 flops/cycle + +=== N_P=200 N_ITER=200 === +W(n) per iteration: 2894800.00 flops +Q(n) per iteration: 25712 bytes +I(n): 112.59 flops/byte +W(n): 578960000.00 flops +T(n): 434952380.00 cycles +P(n): 1.33 flops/cycle + +=== N_P=500 N_ITER=200 === +W(n) per iteration: 18037000.00 flops +Q(n) per iteration: 64112 bytes +I(n): 281.34 flops/byte +W(n): 3607400000.00 flops +T(n): 2803955380.00 cycles +P(n): 1.29 flops/cycle + +=== N_P=1000 N_ITER=200 === +W(n) per iteration: 72074000.00 flops +Q(n) per iteration: 128112 bytes +I(n): 562.59 flops/byte +W(n): 14414800000.00 flops +T(n): 11379685260.00 cycles +P(n): 1.27 flops/cycle + +=== N_P=2000 N_ITER=200 === +W(n) per iteration: 288148000.00 flops +Q(n) per iteration: 256112 bytes +I(n): 1125.09 flops/byte +W(n): 57629600000.00 flops +T(n): 46349779000.00 cycles +P(n): 1.24 flops/cycle + +=== N_P=5000 N_ITER=200 === +W(n) per iteration: 1800370000.00 flops +Q(n) per iteration: 640112 bytes +I(n): 2812.59 flops/byte +W(n): 360074000000.00 flops +T(n): 312436846520.00 cycles +P(n): 1.15 flops/cycle + diff --git a/scripts/mem-bench.sh b/scripts/mem-bench.sh new file mode 100755 index 0000000..afce0e0 --- /dev/null +++ b/scripts/mem-bench.sh @@ -0,0 +1 @@ +sudo sysbench memory --memory-block-size=1G --memory-total-size=20G --memory-oper=read run