Skip to main content

RAM Benchmark

Simple RAM benchmark for Linux.

Package version Package version

Simple RAM Benchmark

This is a simple RAM benchmark written in C++. It allows checking approximate RAM speed. The code creates a 1 GiB (1024*1024*1024 bytes) buffer, fills it with zeroes, scans the buffer, and measure the time.

Note: This is only experimental code written to check the RAM speed on Linux. There are probably better tools for memory analysis available like memtest86.

Requirements

  • Unix/Linux OS (can be easily ported to Windows)
  • g++ compiler compatible with OpenMP (for multi-threaded variant)
  • at least 1 GB free RAM (for buffer)

Install and run using pip

To execute the benchmark, you only have to meet the requirements and run the below commands:

pip install rambenchmark
rambenchmark

Compile and run manually

If you prefer to compile and execute the code manually, you can do that by running the following commands:

git clone git@github.com:rsusik/rambenchmark.git
cd rambenchmark/rambenchmark
g++ -O3 -std=c++11 -fopenmp -o rambench ./rambench.cpp
./rambench

Tests

The benchmark uses two functions for tests:

  1. memset()
  2. memchr()

Output

The benchmark produces below example output:

======================================================================
BENCHMARKING RAM WITH MULTI THREADS
(...please wait...)

4 concurrent threads are supported.

----------------------------------------------------------------------
MEMSET TEST

RESULT of filling 1GiB buffer with zeros.
>>> 0.0654 (s) / 16415.2 (MB/s) <<<

                   Details
  #Threads        Time (s)      Speed (MB/s)
         1      0.0654 (s)    16415.2 (MB/s)
         2      0.0663 (s)    16189.3 (MB/s)
         3      0.0708 (s)    15161.6 (MB/s)
         4      0.0750 (s)    14299.5 (MB/s)

----------------------------------------------------------------------
MEMCHR TEST

RESULT of scanning 1GiB buffer.
>>> 0.0776 (s) / 13820.1 (MB/s) <<<

                   Details
  #Threads        Time (s)      Speed (MB/s)
         1      0.1686 (s)     6365.2 (MB/s)
         2      0.0985 (s)    10893.6 (MB/s)
         3      0.0874 (s)    12281.8 (MB/s)
         4      0.0776 (s)    13820.1 (MB/s)

======================================================================

Metadata

Release files for rambenchmark 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rambenchmark 1.3
File Size Uploaded Provenance Actions
rambenchmark-1.3.tar.gz 5.2 kB Without provenance Details for rambenchmark-1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rambenchmark 1.3
File Interpreter ABI Platform Actions
rambenchmark-1.3-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.5 abi3 Linux glibc 2.5+ x86-64 Details for rambenchmark-1.3-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Total release size: 143.7 kB

Release files / rambenchmark-1.3.tar.gz

Download URL rambenchmark-1.3.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
60a57c90384408b0d2bf7fe58ab1711ba0c3e9b7a1736bb048614ab9fe3eea14
BLAKE2b-256 checksum
How to use checksums
63177d1fbadff2c63882bc939243de67b86750e299414458fcda4b431bac64a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.4

Release files / rambenchmark-1.3-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL rambenchmark-1.3-cp35-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 138.5 kB
Tags CPython 3.5 Linux glibc 2.5+ x86-64 abi3
SHA-256 checksum
How to use checksums
9dd590d485e2734917f14104a6d17cdbe838fd1374d521f5f801b7d0341af309
BLAKE2b-256 checksum
How to use checksums
9ce0cd62e31a49701b0151f8c567663564b341d20f09ee473b1c7bc0975ddc69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.4

Security for rambenchmark 1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page