A Simple Memory Benchmark

Introduction

I wrote a very simple memory benchmark. It performs a sequential read or write on a block of memory until 256 MB was read or written, for different block sizes. This should show the difference in memory performance for cache hits and cache misses.

Below are the results for some machines I have access to. callisto is my PowerPC.

Memory Read Performance (MB/s)

block sizemercator stevin sp05 callistoE callistoS piefje sp17 bartm
64350.685287.640104.065609.524609.524433.898218.803640.000
128345.946263.918110.823609.524609.524501.961222.609731.429
256400.000290.909110.823640.000640.000522.449237.037775.758
512419.672290.909117.972673.684673.684522.449246.154825.806
1K433.898308.434116.895691.892711.111544.681234.862800.000
2K441.379308.434117.431711.111711.111544.681253.465825.806
4K449.123316.049118.519711.111711.111556.522243.810825.806
8K419.672320.000119.626711.111711.111556.522237.037825.806
16K161.006324.051117.972731.429711.111533.333220.690825.806
32K162.025174.150118.519200.000711.111201.575224.561800.000
64K146.286180.282117.431130.612139.891192.481269.474253.465
128K142.222172.973 89.510134.737134.031188.235237.037253.465
256K117.972179.021 89.199113.274123.671175.342211.570250.980
512K109.871168.421 89.510100.787113.778163.057201.575250.980
1M 94.465110.823 89.199 90.780106.224146.286211.570142.222
2M 89.199109.871 94.465 87.372101.587143.017204.800141.436
4M 88.276109.402 93.773 87.372101.186140.659200.000142.222
8M 88.889108.936 91.103 87.075101.587139.891206.452142.222

Memory Write Performance (MB/s)

block sizemercator stevin sp05 callistoE callistoS piefje sp17 bartm
64 82.848426.667253.465522.449533.33383.388465.455581.818
128 82.315433.898297.674568.889568.88983.934595.349691.892
256 82.848465.455332.468609.524595.34985.050640.000731.429
512 84.211512.000350.685624.390640.00084.211691.892775.758
1K 83.934512.000355.556640.000640.00084.211731.429752.941
2K 82.581522.449360.563656.410656.41084.211731.429775.758
4K 83.934522.449365.714656.410640.00085.050691.892775.758
8K 83.660544.681365.714656.410656.41083.388656.410800.000
16K 83.117556.522365.714656.410673.68484.211711.111800.000
32K 83.117533.333365.714148.837656.41085.050711.111731.429
64K 81.529544.681360.563 93.431100.78784.211711.111131.282
128K 82.848533.333119.626 97.338 94.81583.388691.892131.282
256K 79.012501.961119.626 78.769 85.61984.211400.000131.282
512K 82.848406.349120.188 69.377 78.28784.211371.014129.949
1M 82.581148.837120.188 61.836 72.11384.488400.00069.755
2M 82.848142.222119.626 59.535 68.63384.488400.00069.565
4M 82.848146.286116.895 59.259 68.81783.388406.34969.565
8M 82.581145.455114.286 59.953 69.00384.211328.20570.330

Machines

HostnameCPUClock SpeedChipsetBus SpeedL1 cacheL2 cacheMain memory
mercator Pentium 133 MHzi430FX 66 MHz2x8K512K64M EDO
stevin UltraSPARC 167 MHzUltra-2 83 MHz2x16K 1M256M
sp05 POWER2 66 MHzSP2 thin66 MHz 64K -256M
callistoE604e 200 MHzVLSI GG266 MHz2x32K512K32M EDO
callistoS604e 200 MHzVLSI GG266 MHz2x32K512K32M SD
piefje Pentium MMX166 MHzi430TX 66 MHz2x16K512K64M EDO
sp17 POWER2 135 MHzSP2 wide ??128K -512M
bartm K6 233 MHzi430TX 66 MHz2x32K512K64M SD

Program Source

The C source is to be compiled with the command
gcc -O3 -fomit-frame-pointer MemSpeed.c -o MemSpeed


This page is maintained by Geert Uytterhoeven.
$Date: 2006-01-25 21:24:49 $