Skip to content

🔬This program benchmarks the I/O performance per container. You can see the implementation of this program on our website.

License

Notifications You must be signed in to change notification settings

I-O-Benchmark-On-Container/ContainerTracer

Repository files navigation

한국어 링크

Introduction

Container Tracer is a tool that measures I/O performance per container. This program complements lacks of cgroup and container building sequence the existing I/O performance measurement program like fio and filebench.

Currently, Container Tracer uses trace-replay to measure the I/O performance of each container.

Execution Sample

Recommended system requirements

This program can run on the system which follows the POSIX standards.

But in these documents and our testing was based on the system which is described in the following table.

So, when you build and run this program you have to care about this information.

item content
Operting System Ubuntu 18.04
Kernel linux 4.19

Project Components

The composition of the project is as follows.

  • trace-replay: trace-replay which reconstructed to produce the formatted data to message queue or shared memory. (language: C)
  • runner: Assign benchmark program to each container. (language: C)
  • web: Developed based on Flask, which output the value from runner produces. (language: Python)
  • setting: The directory which contains Scons' build global configuration
  • include: The directory has C program's header. Almost all C program's header must be located in this place.

runner directory subdirectory test has unit-test program of each driver of runner.

Implementation

You have to check this link

Building

In common, you must do the following.

sudo pip3 install black flake8
sudo apt install doxygen

web

Since we are using Flask, you must install Flask and install the related package first.

sudo pip3 install flask flask_restful flask_socketio pynput

And you can run this program with the following command in the project root directory.

sudo python web/run.py

You can get more information from this link.

trace-replay and runner

You download the source code and install necessary programs and libraries following.

Debian

sudo pip3 install scons scons-compiledb
sudo pip3 install clang-format
sudo apt install cppcheck libaio-dev libjson-c-dev libjemalloc-dev

Redhat

sudo yum install cppcheck libaio-devel json-c-devel jemalloc-devel

If you want to build by clang compiler then you must change the SConstruct file's CC section' gcc to clang and follow like below.

Debian

sudo apt install llvm-6.0 clang-6.0 libclang-6.0-dev
sudo ln -s /usr/bin/clang-6.0 /usr/bin/clang

Redhat

sudo yum install llvm6.0 clang7.0-devel clang7.0-libs

Based on the following commands you do the build and unit testing. This execution results are stored in ./build/debug.

sudo scons -c
sudo scons test DEBUG=True TARGET_DEVICE=<your device>

If you want to build the release mode then you do the following. This execution results are stored in ./build/release

sudo scons -c
scons

Moreover, you can install the release mode of runner libraries by following commands. If you want to install the debug mode then just change the sudo scons install to sudo scons DEBUG=True install

sudo scons install
sudo ldconfig

Under the redhat distribution, you must care about two things.

First, you have to check /etc/ld.so.conf file has the line /usr/local/lib. If not you add that line.

Second, if you encounter an error that related to the jemalloc you must build the jemalloc library based on this link.

Additionally, you can get information about how to make the driver program of the runner from this link

Notes

  • DEBUG=True enables us to print all information about debugging. This expects to be made you to easily debug our program.
  • Because trace-replay needs the superuser privileges, you must run this program with superuser privileges.
  • sudo scons test doesn't make a compile_commands.json file. So, if you want to generate that file then must only do scons.

Warning

  1. Because the trace-replay does direct-IO, this may be destructing your disk's file system. So, you must run this program under an empty disk or virtual disk.
  2. You must follow the init JSON contents must be {"driver": "<DRIVER-NAME>", "setting": {...}}. And setting field has driver dependant contents.

Libraries

  1. pthread: POSIX thread library for trace-replay
  2. AIO: asynchronous I/O library
  3. rt: Real-Time library
  4. json-c: Json library for C language
  5. unity: Unit test library for C language
  6. jemalloc: A library which does the efficient memory dynamic allocation.

Contributing

You must follow the contributing rules in this link.