Skip to content

shm-sync/shm_sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shm_sync

This repository contains companion code for the following paper:

Shinhyung Yang, Seongho Jeong, Byunguk Min, Yeonsoo Kim, Bernd Burgstaller, and Johann Blieberger.
Design-space evaluation for non-blocking synchronization in Ada: lock elision of protected objects, concurrent objects, and low-level atomics. Journal of Systems Architecture 110:101764, Elsevier, Nov. 2020. [pdf] (open access)

If you use this code, please cite the paper using the below BibTeX reference.

@article{shmsync,
  title = {Design-space evaluation for non-blocking synchronization in {Ada}:
           lock elision of protected objects, concurrent objects, and
           low-level atomics},
  author = {Shinhyung Yang and Seongho Jeong and Byunguk Min and Yeonsoo Kim
            and Bernd Burgstaller and Johann Blieberger},
  journal = "Journal of Systems Architecture",
  volume = "110",
  pages = "101764",
  year = "2020",
  issn = "1383-7621",
  doi = "https://doi.org/10.1016/j.sysarc.2020.101764",
}

Introduction

shm_sync is a synchronization benchmark suite for shared-memory multicore architectures. In contrast to prior work, it provides relaxations to determine the performance overhead incurred by a sequentially consistent high-level language memory model.

News
  • Feb 10, 2020: GitHub repository created
  • Nov 24, 2020: Added link to published paper

Prerequisites

Please refer to the top-level CMakeLists.txt file for the configuration options of shm_sync. The list of prerequisites assumes a full build of both the Ada and C++ benchmarks. The shm_sync benchmarks require a Linux system with the following software packages installed (stated versions are known to work and represent the minimum for GCC and CMake).

Building the benchmark suite

shm_sync is a CMake-based project. To build the project, move to project root and follow the instructions below. The name of the build directory decides between debug and release builds.

To build the benchmarks in debug mode:

$ mkdir build_dbg
$ cd build_dbg
$ cmake ..
$ make

To build the benchmarks in release mode:

$ mkdir build_rel
$ cd build_rel
$ cmake ..
$ make

To use Likwid for running benchmarks:

$ cmake -DLIKWID_ROOT=/opt/likwid/4.3.4 ..

The benchmark suite supports 16-byte (double-word) atomic load, atomic store, and compare-and-swap. Benchmarks using 16-byte atomic operations tend to be considerbly slower than their 8-byte counterparts. In our experiments, this was e.g., noticeable with the AdaLockFree benchmark.

To build with 16-byte atomic operations enabled:

$ cmake -DBUILD_DWATOMIC=ON ..

Running benchmarks

In scripts/run:

$ python3 ./run.py TATASLock
# Run with detailed benchmark settings (settings.py)
$ python3 ./run.py TATASLock --threads 28 --executions 100 --iterations 10M

To run benchmark with scaling run from (1..t) threads:

$ python3 ./run.py TATASLock --threads 28 --executions 100 --iterations 10M -r

To run benchmark with scaling run from (1..t) threads and to view overview only:

$ python3 ./run.py TATASLock --threads 28 --executions 100 --iterations 10M -r -o

To run lock benchmark with busy loop lasting for 30 nsec inside critical section (-u) and busy loop lasting for 50 nsec outside critical section (-y):

$ python3 ./run.py TATASLock --threads 28 --executions 100 --iterations 10M -r -o -u 30 -y 50

Obtaning benchmark data

Benchmark profiling data files are stored under the data folder in the following subdirectory scheme:

[PROJECT_ROOT]/data/[datetime]/[benchmark_name]/[binary_name]

For example:

shm_sync_latest/data/April30_2019_10:15:22/TASLock

To get statistics and R-plots measuring ExecutionTime and Throughput, go to scripts/run and run Drawing.py:

$ python3 ./Drawing.py ../../data/[datetime]/[benchmark_name] -t [number_of_threads] -i [number_of_iterations]

For example, to plot given sample_ArrayLock.txt:

$ python3 ./Drawing.py sample_ArrayLock.txt -t 28 -i 10000000

To plot given sample_ArrayLock.txt and sample_CLHQueueLock.txt separately with single operation:

$ python3 ./Drawing.py sample_ArrayLock.txt sample_CLHQueueLock.txt -t 28 14 -i 10000000 10000

Result Plot

arraylock

clhqueuelock

To plot given sample_ArrayLock.txt and sample_TATASLock.txt into a single figure, use "-c" flag. But their [number_of_threads] for -t and [number_of_iterations] for -i should be same.

$ python3 ./Drawing.py sample_ArrayLock.txt sample_TATASLock.txt -t 28 14 -i 10000000 -c

Result plot

combined

Troubleshooting

If cmake cannot locate the Boost library, add the library's root path to the cmake command line:

# version and path of Boost may vary
$ cmake -DBOOST_ROOT=/opt/boost/1.69.0 ..

Contact

Please email Bernd Burgstaller at bburg@yonsei.ac.kr and include [shm_sync] in the subject line.

Authors

Shinhyung Yang
Seongho Jeong
Byunguk Min
Yeonsoo Kim
Bernd Burgstaller
Johann Blieberger

License

The shm_sync benchmarks are open source software distributed under the license agreement found in LICENSE.txt.

Acknowledgements

This work was supported by the Austrian Science Fund (FWF) project I 1035N23, and by the Next-Generation Information Computing Development Program through the National Research Foundation of Korea (NRF), funded by the Ministry of Science, ICT & Future Planning under grant NRF-2015-M3C4A-7065522.

About

No description, website, or topics provided.

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE.txt
GPL-3.0
COPYING.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published