# we use an external project and copy the sources to bin directory to ensure
# that object files are built outside of the source tree.
include(ExternalProject)
+ if(ALLOCATOR)
+ set(FIO_EXTLIBS EXTLIBS=-l${ALLOCATOR})
+ endif()
ExternalProject_Add(fio_ext
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/
UPDATE_COMMAND "" # this disables rebuild on each run
GIT_REPOSITORY "https://github.com/axboe/fio.git"
- GIT_TAG "bf0b7e75c1ccca4026c8880ed8a76fc7ef85f2f3"
+ GIT_TAG "fio-3.10"
SOURCE_DIR ${CMAKE_BINARY_DIR}/src/fio
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure
- BUILD_COMMAND $(MAKE) fio EXTFLAGS=-Wno-format-truncation
+ BUILD_COMMAND $(MAKE) fio EXTFLAGS=-Wno-format-truncation ${FIO_EXTLIBS}
INSTALL_COMMAND cp <BINARY_DIR>/fio ${CMAKE_BINARY_DIR}/bin)
endfunction()
===
Ceph uses the fio workload generator and benchmarking utility.
+(https://github.com/axboe/fio.git)
-To fetch the fio sources:
-
- git clone git://git.kernel.dk/fio.git
-
-To build fio:
-
- ./configure
- make
+FIO tool is automatically fetched to build/src/fio, and build if necessary.
RBD
---
If configure fails with "Rados Block Device engine no", see config.log for
details and adjust the cflags as necessary.
+If ceph was compiled with tcmalloc, it may be necessary to compile fio with:
+ make EXTLIBS=tcmalloc
+Otherwise fio might crash in malloc_usable_size().
+
To view the fio options specific to the rbd engine:
./fio --enghelp=rbd
of the ceph tree and load libfio_ceph_objectstore.so into fio as an external
engine.
-To build fio_ceph_objectstore against external(downloadable) FIO source code:
-```
- ./do_cmake.sh -DWITH_FIO=ON -DCMAKE_BUILD_TYPE=Release
- cd build
- make fio_ceph_objectstore install
-```
-To build against existing FIO source code:
+To build fio_ceph_objectstore run:
```
- FIO_ROOT_DIR=<path to fio source code> ./do_cmake.sh -DWITH_SYSTEM_FIO=ON
+ ./do_cmake.sh -DWITH_FIO=ON
cd build
- make fio_ceph_objectstore install
+ make fio_ceph_objectstore
```
+This will fetch FIO to build/src/fio directory,
+compile fio tool and libfio_ceph_objectstore.so.
If you install the ceph libraries to a location that isn't in your
LD_LIBRARY_PATH, be sure to add it: