Skip to content
The classic STREAM benchmark, extended to measure NUMA effects.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The original STREAM benchmark was developed by John D. McCalpin and is copyright

This version was adapted by Lars Bergstrom in 2011-2012 with much feedback from
Twitter, Metarstation, and a variety of other end users.

First, you will need to install libnuma on your machine. This library is not suppored on
OSX, but is available via any package manager on Linux or can be locally installed from:

Then, set the number of threads equal to the number of cores on your machine:

Finally, compile using GCC:
gcc -O3 -std=c99 -fopenmp -lnuma -DN=80000000 -DNTIMES=100 stream.c -o stream-gcc

- To simulate non-NUMA aware access, define the constant: -DNON_NUMA
This constant will cause the memory to be touched by a thread on one node and then
for all of the stream operations to happen from another node.
- To show what happens when you perform only accesses that do not coincide with
a prior cache block, compile with -DSTRIDE=8 (assuming 64-byte cache lines and 8-byte

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.