Below is the list of changes that have just been committed into a local
5.1 repository of stewart. When stewart does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-10 01:08:35+11:00, stewart@willster.(none) +2 -0
BUG#24143 Heavy file fragmentation with multiple ndbd on single fs
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@stripped, 2006-11-10 01:08:33+11:00, stewart@willster.(none) +2 -0
Check for XFS headers
storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp@stripped, 2006-11-10 01:08:33+11:00, stewart@willster.(none) +16 -0
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.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: stewart
# Host: willster.(none)
# Root: /home/stewart/Documents/MySQL/5.1/ndb-mgm-work
--- 1.388/configure.in 2006-11-01 23:25:56 +11:00
+++ 1.389/configure.in 2006-11-10 01:08:33 +11:00
@@ -697,6 +697,8 @@
sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
sys/resource.h sys/param.h)
+AC_CHECK_HEADERS([xfs/xfs.h])
+
#--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS
# and defines HAVE_LIBM etc
--- 1.36/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2006-11-03 02:18:41 +11:00
+++ 1.37/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp 2006-11-10 01:08:33 +11:00
@@ -18,6 +18,10 @@
#include <my_sys.h>
#include <my_pthread.h>
+#ifdef HAVE_XFS_XFS_H
+#include <xfs/xfs.h>
+#endif
+
#include "AsyncFile.hpp"
#include <ErrorHandlingMacros.hpp>
@@ -459,6 +463,18 @@
Uint32 index = 0;
Uint32 block = refToBlock(request->theUserReference);
+#ifdef HAVE_XFS_XFS_H
+ if(platform_test_xfs_fd(theFd))
+ {
+ ndbout_c("Using xfsctl(XFS_IOC_RESVSP64) to allocate disk space");
+ xfs_flock64_t fl;
+ fl.l_whence= 0;
+ fl.l_start= 0;
+ fl.l_len= (off64_t)sz;
+ if(xfsctl(NULL, theFd, XFS_IOC_RESVSP64, &fl) < 0)
+ ndbout_c("failed to optimally allocate disk space");
+ }
+#endif
#ifdef HAVE_POSIX_FALLOCATE
posix_fallocate(theFd, 0, sz);
#endif
| Thread |
|---|
| • bk commit into 5.1 tree (stewart:1.2317) BUG#24143 | Stewart Smith | 9 Nov |