Simple command line RAM testing application.
Allocates a block of memory (the test array). The default size of the test array is 1 GiB, but this is user configurable using the '-s X' command line option.
Writes a pseudo random sequence of numbers into the test array.
Reads the data back from the test array checking that it matches the pseudo random number sequence.
Reports how many errors have been detected and the speed at which the writes and reads of the test array occured.
Repeats the writes and reads of the test array with different pseudo random number sequences until terminated with 'Ctrl C'.
Execution of the application typically looks like this:
[RamThrash] Test array allocated, size: 1.0 GiB Executing test... [ Cycles: 66 Errors: 0 ] [ W: 9.02 GiB/s R: 9.25 GiB/s ]
Known to be compatible with:
- Ubuntu Linux 19.04 Disco Dingo
- macOS Mojave 10.14
Should be compatible with many other Linux distributions/versions and UNIX based operating systems such as BSD, AIX etc.
git clone https://github.com/RJPLancaster/RamThrash.git
cd RamThrash ./buildRamThrash
To run with the default 1 GiB test array size:
To run with a user specified test array size of 12 GiB:
./RamThrash -s 12
Command line options
-i : Inject errors - Inject two errors into the test array on each pass to check algorithm is functioning correctly.
-s X : Set test array size (GiB) - Sets the test array size to X, where X is an integer specifying the array size in GiB.