public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Ryan Lee <ryanlee.lahk@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: [QUESTION] Too much time to delete file on xfs filesystem
Date: Tue, 19 Jun 2012 12:03:41 +1000	[thread overview]
Message-ID: <20120619020341.GK25389@dastard> (raw)
In-Reply-To: <CABF-5Wryz4QXMzDb12zViPytSEi67Tm0ZwPkYLJaCbDix+91fg@mail.gmail.com>

On Tue, Jun 19, 2012 at 09:45:28AM +0900, Ryan Lee wrote:
> Hi, My name is Ryan.
> 
>  Nowadays, Our company product has a new problem which is taking too much
> time to delete file on xfs filesystem.
> 
>  When I try to delete the file (18GByte, It was just one file), it would
> take around 7 minutes 30 seconds.

It's fragmented, isn't it? Run 'xfs_bmap -vp <file>' and count the
extents. If that fails because of ENOMEM errors, run 'xfs_io -f -c
stat <file>' to see what the count of extents is. if the result is
in the thousands, then that is the reason for it being slow.

> # time rm hdd_write_test6.ts

Hmmm - a loopback filesystem image that was written to randomly?
Perhaps you should preallocate the file before running the write
test....

> kernel  2.6.37

A current kernel (e.g. 3.4) will be significantly faster at removing
fragmented files than 2.6.37. Consider upgrading.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2012-06-19  2:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-19  0:45 [QUESTION] Too much time to delete file on xfs filesystem Ryan Lee
2012-06-19  2:03 ` Dave Chinner [this message]

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=20120619020341.GK25389@dastard \
    --to=david@fromorbit.com \
    --cc=ryanlee.lahk@gmail.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