Richard HJ's Web Site

mem_bw Home Page

Tool to Measure the Memory Bandwidth

mem_bw ses the CPU to read, write or read-modify-write areas of memory. The size and number of reads or writes can be set.
This is based on chachebench from llcbench but allows cpu usage to be measures and can be set to run with one setting for a number of cycles, rather than just scan the read/write size. It uses unrolled loops, but the results are quite dependant on compiler sophistication!

mem_bw

The program is run as follows:
Usage: mem_bw -option<parameter> [...]

The command options are:

-b = <size of data read/written from/to memory in kbytes [20 kBytes]>
-l = <no. of read or writes to do >
-m = do read-mod-write test
-q = quiet - only print results
-r = do read test
-v = turn on debug printout
-w = do write test
-B = <bin width of histo in us>
-H = histograms
-M = <min (low limit) of histo in us>

Installation of mem_bw

The distribution of mem_bw is split into two tarballs: the mem_bw tool and the supporting library libhj. The mem_bw-a.b.c tarball creates directory mem_bw-a.b.c and libhj-l.m.n creates directory libhj-l.m.n. For installation and compilation in your home directory having downloaded the corresponding mem_bw and library files, start by cd to the library directory then:

./configure --prefix=$HOME
make install

$HOME/include and $HOME/lib are created. Then cd to the directory containing mem_bw and do:

./configure --prefix=$HOME --with-hj-location=$HOME
make install

$HOME/sbin is created with the mem_bw program.

Versions of mem_bw

Version

Download
mem_bw

Download
libhj library

Write-up

Excel plots example

Notes

mem_bw-1.0.1

tar file
mem_bw-1.0.1
libhj-4.1.3      

mem-bw-1.0.0

tar file
mem_bw-1.0.0

libhj-4.0.2

     

Enjoy, but the usual disclaimers apply!

Feedback is welcome!

© 2006, 2007, 2008, 2009, 2010, 2011 Richard Hughes-Jones (R.Hughes-Jones@manchester.ac.uk)
22 Jan 2011.

Copyright notice | Disclaimer | Privacy Policy |