Coder Social home page Coder Social logo

iobench's Introduction

iobench

C++ I/O library test.

Test Disk IO Libraries:

  • pread
  • AIO
  • io_uring
  • spdk

Report

C++ Disk I/O Library Benchmark Report

For AWS linux server

Install liburing.

Install spdk.

Follow the user guide to config your machine and mount device.

Remember to check your nvme SSD device:

sudo lsblk -f

Build

mkdir build
cd build
cmake ..
make

Generate data on disk

mkdir /data
cd build
./gendata /home/ubuntu/dgl/dgl/datasets/file_128MB.bin 128
./gendata /data/file_512MB.bin 512
./gendata /data/file_1GB.bin 1024
stat /data/file_128MB.bin
stat /data/file_512MB.bin
stat /data/file_1GB.bin

Use fio to test and verify your SSD bandwidth:

sudo apt install fio
fio -ioengine=libaio -bs=4k -direct=1 -thread -numjobs=1 -rw=read -filename=/data/file_1GB.bin -name="BS 16KB read test" -iodepth=512 -runtime=20
fio -ioengine=libaio -bs=64k -direct=1 -thread -numjobs=1 -rw=read -filename=/data/file_1GB.bin -name="BS 64KB read test" -iodepth=512 -runtime=20
fio -ioengine=libaio -bs=64k -direct=1 -thread -numjobs=8 -rw=read -filename=/data/file_1GB.bin -name="BS 64KB read test" -iodepth=512 -runtime=20

The bandwidth should between 2000-3500 MB/s.

Usage

$ ./<lib> <file> <is_random_read> <thread_num> <block size>

Or run the script:

bash ./pread_test.sh
bash ./fio_test.sh

Test pread:

./pread /home/ubuntu/dgl/dgl/datasets/file_1GB.bin 0 1 16
./pread /data/file_1GB.bin 0 8 16
./pread /data/file_1GB.bin 0 8 64
./pread /data/file_1GB.bin 1 8 16
./pread /data/file_1GB.bin 1 8 64

Expect output:

5570568009356738390, 2536.537ms, 0.394GB/s
5570568009356738390, 789.062ms, 1.267GB/s
5570568009356738390, 350.578ms, 2.852GB/s
5570568009356738390, 314.861ms, 3.176GB/s

Test aio:

./aio /data/file_1GB.bin 1
./aio /data/file_1GB.bin 8

Expect output:

5570568009356738390, 554.996ms, 1.802GB/s
5570568009356738390, 582.408ms, 1.717GB/s

Test io_uring:

./iouring /data/file_1GB.bin 1
./iouring /data/file_1GB.bin 4
./iouring /data/file_1GB.bin 16

Expect output:

5570568009356738390, 1154.126ms, 0.866GB/s
5570568009356738390, 833.122ms, 1.200GB/s
5570568009356738390, 774.006ms, 1.292GB/s

Test spdk:

iobench's People

Contributors

xiangyuzhi avatar liu-rj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.