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.
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 |
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.
You have to check this link
In common, you must do the following.
sudo pip3 install black flake8
sudo apt install doxygen
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.
You download the source code and install necessary programs and libraries following.
sudo pip3 install scons scons-compiledb
sudo pip3 install clang-format
sudo apt install cppcheck libaio-dev libjson-c-dev libjemalloc-dev
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.
sudo apt install llvm-6.0 clang-6.0 libclang-6.0-dev
sudo ln -s /usr/bin/clang-6.0 /usr/bin/clang
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 thejemalloc
library based on this link.
Additionally, you can get information about how to make the driver program of the runner from this link
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 acompile_commands.json
file. So, if you want to generate that file then must only doscons
.
- 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. - You must follow the init JSON contents
must be
{"driver": "<DRIVER-NAME>", "setting": {...}}
. Andsetting
field has driver dependant contents.
- pthread: POSIX thread library for trace-replay
- AIO: asynchronous I/O library
- rt: Real-Time library
- json-c: Json library for C language
- unity: Unit test library for C language
- jemalloc: A library which does the efficient memory dynamic allocation.
You must follow the contributing rules in this link.