xfs
[Top] [All Lists]

Re: [QUESTION] Too much time to delete file on xfs filesystem

To: Ryan Lee <ryanlee.lahk@xxxxxxxxx>
Subject: Re: [QUESTION] Too much time to delete file on xfs filesystem
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 19 Jun 2012 12:03:41 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <CABF-5Wryz4QXMzDb12zViPytSEi67Tm0ZwPkYLJaCbDix+91fg@xxxxxxxxxxxxxx>
References: <CABF-5Wryz4QXMzDb12zViPytSEi67Tm0ZwPkYLJaCbDix+91fg@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>