From: Eric Sandeen <sandeen@sandeen.net>
To: stan@hardwarefreak.com
Cc: xfs@oss.sgi.com
Subject: Re: Performance degradation over time
Date: Wed, 10 Oct 2012 09:31:16 -0500 [thread overview]
Message-ID: <507586B4.6010201@sandeen.net> (raw)
In-Reply-To: <50757583.9000901@hardwarefreak.com>
On 10/10/12 8:17 AM, Stan Hoeppner wrote:
> On 10/10/2012 3:51 AM, Marcin Deranek wrote:
>> Hi,
>>
>> We are running XFS filesystem on one of out machines which is a big
>> store (~3TB) of different data files (mostly images). Quite recently we
>> experienced some performance problems - machine wasn't able to keep up
>> with updates. After some investigation it turned out that open()
>> syscalls (open for writing) were taking significantly more time than
>> they should eg. 15-20ms vs 100-150us.
>> Some more info about our workload as I think it's important here:
>> our XFS filesystem is exclusively used as data store, so we only
>> read and write our data (we mostly write). When new update comes it's
>> written to a temporary file eg.
>>
>> /mountpoint/some/path/.tmp/file
>>
>> When file is completely stored we move it to final location eg.
>>
>> /mountpoint/some/path/different/subdir/newname
>>
>> That means that we create lots of files in /mountpoint/some/path/.tmp
>> directory, but directory is empty as they are moved (rename() syscall)
>> shortly after file creation to a different directory on the same
>> filesystem.
>> The workaround which I found so far is to remove that directory
>> (/mountpoint/some/path/.tmp in our case) with its content and re-create
>> it. After this operation open() syscall goes down to 100-150us again.
>> Is this a known problem ?
>> Information regarding our system:
>> CentOS 5.8 / kernel 2.6.18-308.el5 / kmod-xfs-0.4-2
>> Let me know if you need to know anything more.
>
> Hi Marcin,
>
> I'll begin where you ended: kmod-xfs. DO NOT USE THAT. Use the kernel
> driver. Eric Sandeen can point you to the why. AIUI that XFS module
> hasn't been supported for many many years.
Yep. Ditch that; it overrides the maintained module that comes with the
kernel itself. See if that helps, first, I suppose.
I've been asking Centos for a while to find some way to deprecate that,
but it's like night of the living dead xfs modules.
(modinfo xfs will tell you for sure which xfs.ko is getting loaded I suppose).
> Regarding your problem, I can't state some of the following with
> authority, though it might read that way. I'm making an educated guess
> based on what I do know of XFS and the behavior you're seeing. Dave
> will clobber and correct me if I'm wrong here. ;)
>
> XFS filesystems are divided into multiple equal sized allocation groups
> on the underlying storage device (single disk, RAID, LVM volume, etc).
> With inode32 each directory that is created has its files store in only
> one AG, with some exceptions, which you appear to bumping up against.
> If you're using inode64 the directories, along with their files, go into
> the AGs round robin.
Agreed that it would be good to know whether inode64 is in use.
Let's start there (and with a modern xfs.ko) before we speculate further.
> Educated guessing: When you use rename(2) to move the files, the file
> contents are not being moved, only the directory entry, as with EXTx
> etc. Thus the file data is still in the ".tmp" directory AG, but that
> AG is no longer its home. Once this temp dir AG gets full of these
> "phantom" file contents (you can only see them with XFS tools), the AG
> spills over. At that point XFS starts moving the phantom contents of
> the rename(2) files into the AG which owns the directory of the
> rename(2) target. I believe this is the source of your additional
> latency. Each time you do an open(2) call to write a new file, XFS is
> moving a file's contents (extents) to its new/correct parent AG, causing
> much additional IO, especially if these are large files.
Nope, don't think so ;) Nothing is going to be moving file contents
behind your back on a rename.
<snip>
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-10-10 14:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 8:51 Performance degradation over time Marcin Deranek
2012-10-10 13:17 ` Stan Hoeppner
2012-10-10 14:31 ` Eric Sandeen [this message]
2012-10-11 8:33 ` Marcin Deranek
2012-10-11 9:15 ` Marcin Deranek
2012-10-14 19:31 ` Peter Grandi
2012-10-10 23:37 ` Dave Chinner
2012-10-11 8:42 ` Marcin Deranek
-- strict thread matches above, loose matches on Subject: below --
2016-03-08 14:09 Matthew Keeler
2016-03-08 16:32 ` Michal Kazior
2016-03-08 16:38 ` Matthew Keeler
2016-03-09 2:01 ` Matthew Keeler
2016-03-09 6:00 ` Michal Kazior
2016-03-09 12:46 ` Matthew Keeler
2016-03-17 11:21 ` Michal Kazior
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=507586B4.6010201@sandeen.net \
--to=sandeen@sandeen.net \
--cc=stan@hardwarefreak.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.