From: Adam Kupczyk Date: Thu, 6 Sep 2018 13:49:01 +0000 (+0200) Subject: objectstore/test/fio: Fixed fio compilation when tcmalloc is used. X-Git-Tag: v14.1.0~1101^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a0025dbaf4924837d46b023a5fa3071df89960f7;p=ceph.git objectstore/test/fio: Fixed fio compilation when tcmalloc is used. Updated fio README. Signed-off-by: Adam Kupczyk --- diff --git a/cmake/modules/BuildFIO.cmake b/cmake/modules/BuildFIO.cmake index 31e44e08ba8f..55c40a3a059e 100644 --- a/cmake/modules/BuildFIO.cmake +++ b/cmake/modules/BuildFIO.cmake @@ -2,14 +2,17 @@ function(build_fio) # 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 /configure - BUILD_COMMAND $(MAKE) fio EXTFLAGS=-Wno-format-truncation + BUILD_COMMAND $(MAKE) fio EXTFLAGS=-Wno-format-truncation ${FIO_EXTLIBS} INSTALL_COMMAND cp /fio ${CMAKE_BINARY_DIR}/bin) endfunction() diff --git a/src/test/fio/README.md b/src/test/fio/README.md index 13a6dcf06bb8..065a4a1cd8e7 100644 --- a/src/test/fio/README.md +++ b/src/test/fio/README.md @@ -2,15 +2,9 @@ FIO === 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 --- @@ -31,6 +25,10 @@ To build fio with 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 @@ -49,18 +47,14 @@ Because the ObjectStore is not a public-facing interface, we build it inside 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= ./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: