FileBench for Linux

December 31, 2007 – 3:36 pm

Eric and Drew’s recent FileBench updates have been exceptionally helpful making the package more complete and easier to use. We’re using FileBench to do database I/O simulations on virtual machines, and I’ve just completed a significant update to the package to allow it to be used in full anger on Linux.

The main objective of this work was two-fold, to finish an updated port to Linux, and to enable native Linux async I/O, in a mode almost identical to that used by the major database vendors.

A brief summary of what was done in this release is:

  • Updated the automake Makefile.am tree, to build correct Linux based Makefiles for the new files and directories
  • Added a new backend support in the flowop library, so that aiowrite uses native Linux async I/O (via io_submit and io_getevents).
  • Added a new flowop (aiosubmit), to allow two-phase list I/O submit/reap
  • Added the aiosubmit to the oltp.f database workload
  • Enabled shared memory to work correctly, so that the database/oltp workload model will load and run
  • Fixed other minor Linux-related compatibility issues

To install the package on Linux, requires the following:

  • Install and enable Linux aio (apt-get install libaio)
  • Install AIO development libraries (apt-get install libaio-dev)
  • Install bison and flex
  • Untar filebench source
  • Run ./configure
  • Make with ‘make install’

The database model runs in full multi-process and AIO enabled mode, just as it does on Solaris:


filebench> load oltp
filebench> set $nshadows=10
filebench> set $dir=/rmc/data
filebench> set $filesize=100m
filebench> run
6383: 35.542: Creating/pre-allocating files and filesets
6383: 35.543: Fileset logfile: 1 files, avg dir = 1024.0, avg depth = 0.0, mbytes=10
6383: 35.543: Re-using fileset logfile file system.
6383: 35.543: Creating fileset logfile...
6383: 35.543: Re-using file /rmc/data/logfile/00000001/00000001
6383: 35.543: Preallocated 1 of 1 of fileset logfile in 1 seconds
6383: 35.543: Fileset datafiles: 10 files, avg dir = 1024.0, avg depth = 0.3, mbytes=1000
6383: 35.543: Re-using fileset datafiles file system.
6383: 35.543: Creating fileset datafiles...
6383: 55.889: Preallocated 10 of 10 of fileset datafiles in 21 seconds
6383: 55.889: waiting for fileset pre-allocation to finish
6383: 55.890: Starting 10 shadow instances
6383: 55.904: Starting 10 dbwr instances
6383: 55.920: Starting 1 lgwr instances
6430: 57.263: Starting 1 shadow threads
6428: 57.271: Starting 1 shadow threads
6434: 57.272: Starting 1 shadow threads
6435: 57.273: Starting 1 shadow threads
6437: 57.274: Starting 1 dbwr threads
6432: 57.275: Starting 1 shadow threads
6431: 57.278: Starting 1 shadow threads
6429: 57.279: Starting 1 shadow threads
6433: 57.280: Starting 1 shadow threads
6436: 57.281: Starting 1 dbwr threads
6439: 57.282: Starting 1 dbwr threads
6440: 57.286: Starting 1 dbwr threads
6441: 57.287: Starting 1 dbwr threads
6427: 57.287: Starting 1 shadow threads
6438: 57.288: Starting 1 dbwr threads
6442: 57.288: Starting 1 dbwr threads
6445: 57.289: Starting 1 dbwr threads
6444: 57.290: Starting 1 dbwr threads
6426: 57.291: Starting 1 shadow threads
6443: 57.292: Starting 1 dbwr threads
6446: 57.292: Starting 1 lgwr threads
6383: 59.934: Creating 22020096 bytes of ISM Shared Memory...
6383: 59.934: Allocated 22020096 bytes of ISM Shared Memory... at 2aaaaabb3000, id 1015839
6383: 59.934: Running...
6383: 120.197: Run took 60 seconds...
6383: 120.198: Per-Operation Breakdown
random-rate 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
shadow-post-dbwr 260ops/s 0.0mb/s 15.8ms/op 0us/op-cpu
shadow-post-lg 260ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
shadowhog 260ops/s 0.0mb/s 0.4ms/op 0us/op-cpu
shadowread 262ops/s 0.5mb/s 22.1ms/op 0us/op-cpu
dbwr-aiowait 2ops/s 0.0mb/s 0.1ms/op 0us/op-cpu
dbwr-block 2ops/s 0.0mb/s 0.2ms/op 0us/op-cpu
dbwr-hog 2ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
dbwr-aiosubmit 2ops/s 0.0mb/s 4203.5ms/op 0us/op-cpu
dbwrite-a 251ops/s 0.5mb/s 0.0ms/op 0us/op-cpu
lg-aiowait 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
lg-block 0ops/s 0.0mb/s 11973.0ms/op 0us/op-cpu
lg-aiosubmit 0ops/s 0.0mb/s 124.5ms/op 0us/op-cpu
lg-write 0ops/s 0.0mb/s 0.0ms/op 0us/op-cpu
6383: 120.198:
IO Summary: 31155 ops 517.0 ops/s, (262/251 r/w) 1.0mb/s, 49us cpu/op, 22.1ms latency

We’ll work with Eric and Drew to merge the Solaris & Linux sources, since there may still be some conflicts resulting from the Linux changes. In the interim, see filebench-1.1.0-linux.tar.gz for a tarball that runs on Linux, and please let me know if you see any further Linux related issues.

Oh, and Happy New Year for this evening!

Post a Comment