]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objectstore/test/fio: Fixed fio compilation when tcmalloc is used. 23962/head
authorAdam Kupczyk <akupczyk@redhat.com>
Thu, 6 Sep 2018 13:49:01 +0000 (15:49 +0200)
committerAdam Kupczyk <akupczyk@redhat.com>
Thu, 13 Sep 2018 07:43:48 +0000 (09:43 +0200)
                      Updated fio README.

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
cmake/modules/BuildFIO.cmake
src/test/fio/README.md

index 31e44e08ba8fa790d9e70df43eec09385fb74fa6..55c40a3a059e51bf5b7032ce907897e99b6fae3c 100644 (file)
@@ -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 <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()
index 13a6dcf06bb81f6fde857f876b81df0c76d6f9e7..065a4a1cd8e74e646665b3fc00ab9d80e71f140e 100644 (file)
@@ -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=<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: