• unknown's avatar
    BUG#24143 Heavy file fragmentation with multiple ndbd on single fs · fdd6efb6
    unknown authored
    If we have the XFS headers (at build time) we can use XFS specific ioctls
    (once testing the file is on XFS) to better allocate space.
    
    This dramatically improves performance of mysql-test-run cases as well:
    
    e.g.
    number of extents for ndb_dd_basic tablespaces and log files
    BEFORE this patch: 57, 13, 212, 95, 17, 113 
    WITH this patch  :  ALL 1 or 2 extents
    
    (results are consistent over multiple runs. BEFORE always has several files
    with lots of extents).
    
    As for timing of test run:
    BEFORE
    ndb_dd_basic                   [ pass ]         107727
    real    3m2.683s
    user    0m1.360s
    sys     0m1.192s
    
    AFTER
    ndb_dd_basic                   [ pass ]          70060
    real    2m30.822s
    user    0m1.220s
    sys     0m1.404s
    
    (results are again consistent over various runs)
    
    similar for other tests (BEFORE and AFTER):
    ndb_dd_alter                   [ pass ]         245360
    ndb_dd_alter                   [ pass ]         211632
    
    
    configure.in:
      Check for XFS headers
    storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp:
      If the XFS headers are installed, use the xfsctl(XFS_IOC_RESVSP64) call (a
      wrapper around ioctl) to tell the xfs file system how much space to reserve
      for this file.
    fdd6efb6
AsyncFile.cpp 30.1 KB