fbpx

Learn about Fio:

  1. Fio
  2. Fio Basics
  3. Compile Fio
  4. Visualize Fio Logs with fio2gnuplot

Fio is a tool for measuring IO performance. This article shows how you can compile Fio yourself with the associated source code . You can also use the source code from the git repository.

Obtain source code

By download

The Fio source code can be downloaded from the Fio Github website (github.com):

$ wget https://github.com/axboe/fio/archive/fio-2.14.tar.gz

In the first step, the tar.gz is unpacked:

$ tar -xzvf fio-2.14.tar.gz
$ ls
fio-2.14.tar.gz fio-fio-2.14

Per git repo

The current commits and updates can always be viewed on the website http://git.kernel.dk/?p=fio.git;a=summary . More information about Git can be found in the category Git . To clone the Fio repository, use the following command:

$ git clone https://github.com/axboe/fio.git
$ ls
fio

From the git repo new updates can be obtained regularly:

$ cd fio
$ git pull
[...]

Thereafter, Fio can be recompiled to install the latest version.

Compile

Compiling requires a build environment (make etc.). In addition, the “libaio” library must be installed for asynchronous IO accesses.

$ sudo apt-get install libaio1 libaio-dev
[...]
$ ls
arch client.c diskutil.c fifo.h fio.c flow.c helpers.h iolog.c log.h mutex.h profile.c REPORTING-BUGS stat.c trim.h
backend.c compiler diskutil.h file.h fio_generate_plots flow.h HOWTO iolog.h Makefile options.c profile.h server.c stat.h verify.c
blktrace_api.h COPYING engines filehash.c fio_generate_plots.1 gettime.c init.c io_u.c memalign.c options.h profiles server.ht verify.h
blktrace.c crc eta.c filehash.h fio.h gettime.h io_ddir.h lib memalign.h os rbtree.c SERVER-TODO time.c
cgroup.c debug.c examples filesetup.c FIO-VERSION-GEN hash.h ioengine.h libfio.c memory.c parse.c rbtree.h smalloc.c time.h
cgroup.h debug.h fifo.c fio.1 flist.h helpers.c ioengines.c log.c mutex.c parse.h README smalloc.h trim.c
$ make
FIO_VERSION = fio-2.0.9-3-ga7321
    DEP .depend
[...]
    CC profiles / tiobench.o
    CC fio

To install

The compiled binary files are finally copied to the corresponding directories:

$ sudo make install
install -m 755 -d / usr / local / bin
install fio fio_generate_plots / usr / local / bin
install -m 755 -d / usr / local / man / man1
install -m 644 fio.1 / usr / local / man / man1
install -m 644 fio_generate_plots.1 / usr / local / man / man1
$ fio --version
fio-2.0.9-3-ga7321
Categories: Tutorials

2 Comments

Fio Basics - Virtono Community · June 21, 2023 at 8:43 AM

[…] Compile Fio […]

Fio - Virtono Community · June 21, 2023 at 8:51 AM

[…] Compile Fio […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.