public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Stewart Smith <stewart@mysql.com>
To: xfs@oss.sgi.com
Subject: XFS_IOC_RESVSP64 versus XFS_IOC_ALLOCSP64 with multiple threads
Date: Mon, 13 Nov 2006 12:33:22 +1100	[thread overview]
Message-ID: <1163381602.11914.10.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]

I recently (finally) wrote my patch to use the xfsctl to get better
allocation for NDB disk data files (datafiles and undofiles).
patch at:
http://lists.mysql.com/commits/15088

This actually ends up giving us a rather nice speed boost in some of the
test suite runs.

The problem is:
- two cluster nodes on 1 host (in the case of the mysql-test-run script)
- each node has a complete copy of the database
- ALTER TABLESPACE ADD DATAFILE / ALTER LOGFILEGROUP ADD UNDOFILE
creates files on *both* nodes. We want to zero these out.
- files are opened with O_SYNC (IIRC)

The patch I committed uses XFS_IOC_RESVSP64 to allocate (unwritten)
extents and then posix_fallocate to zero out the file (the glibc
implementation of this call just writes zeros out).

Now, ideally it would be beneficial (and probably faster) to have XFS do
this in kernel. Asynchronously would be pretty cool too.. but hey :)

The reason we don't want unwritten extents is that NDB has some realtime
properties, and futzing about with extents and the like in the FS during
transactions isn't such a good idea.

So, this would lead me to try XFS_IOC_ALLOCSP64 - which doesn't have the
"unwritten extents" warning that RESVSP64 does. However, with the two
processes writing the files out, I get heavy fragmentation. Even with a
RESVSP followed by ALLOCSP I get the same result.

So it seems that ALLOCSP re-allocates extents (even if it doesn't have
to) and really doesn't give you much (didn't do too much timing to see
if it was any quicker).

Is this expected behaviour? (it wasn't for me)
-- 
Stewart Smith, Software Engineer
MySQL AB, www.mysql.com
Office: +14082136540 Ext: 6616
VoIP: 6616@sip.us.mysql.com
Mobile: +61 4 3 8844 332

Jumpstart your cluster:
http://www.mysql.com/consulting/packaged/cluster.html

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2006-11-13  1:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13  1:33 Stewart Smith [this message]
     [not found] ` <965ECEF2-971D-46A1-B3F2-C6C1860C9ED8@sgi.com>
2006-11-13  4:09   ` XFS_IOC_RESVSP64 versus XFS_IOC_ALLOCSP64 with multiple threads Stewart Smith
2006-11-13  4:53     ` Sam Vaughan
2006-11-13  5:20       ` Stewart Smith
2006-11-14  0:04         ` Sam Vaughan
2006-11-14  0:25           ` Chris Wedgwood
2006-11-14  0:31             ` Sam Vaughan
2006-11-14  0:37               ` Sam Vaughan
2006-11-27  5:55           ` Stewart Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1163381602.11914.10.camel@localhost.localdomain \
    --to=stewart@mysql.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox