[Top] [All Lists]

Re: very slow file deletion on an SSD

To: Krzysztof Adamski <k@xxxxxxxxxxx>
Subject: Re: very slow file deletion on an SSD
From: joe.landman@xxxxxxxxx
Date: Sun, 27 May 2012 10:59:52 -0400
Cc: Stefan Ring <stefanrin@xxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxxx>, linux-raid <linux-raid@xxxxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-type:message-id :content-transfer-encoding:cc:x-mailer:from:subject:date:to; bh=EpZWEVLTPGYKwKmyixVd51kgMcdCa348grrI6FxIo8c=; b=oTlXB53WdZCUFCi2G3MNGgUtlC+G9P5GGp/7NKf49IP27Cec0nMDei00/zEqhAFlyG So5sbloKY1yHLuEu+9nNwpSdKb7pfkEtwzFEsZoVO/kd55Tjl9zFfHL36/jskkH9MRcr 9R+7UCI0oU+4TFTAt9rQippwPUDNwyr/iTntFvDU/qJDkkJA6LlrUZmImVPY7XrqthU/ glVA2Wz9Xz4HrO2C1c/A9jn/z7VDnYOChNMXlGx6Q63Cyea+C9cdzDYfRwt5NP164hUx PLGWnCMuqBkj9D1e/YpUz/s3SY5fgE+UgQZy1P6IEMxYmMkCtho0QIaEkoqVBGRXoKkE qQXw==
In-reply-to: <1338124504.28212.255.camel@xxxxxxxxxxxxxxxxxx>
References: <4FBF60D1.80104@xxxxxxxxx> <20120526231838.GR25351@dastard> <4FC16683.9060800@xxxxxxxxx> <20120527000701.GS25351@dastard> <4FC18845.6030301@xxxxxxxxx> <4FC19408.5020502@xxxxxxxxxxx> <CAAxjCEzX4dmm6YuR__1_a6mw+D=vizV0VrCLqCC-d5GSgkbE6g@xxxxxxxxxxxxxx> <1338124504.28212.255.camel@xxxxxxxxxxxxxxxxxx>
This is going to be a very fragmented file.  I am guessing that this is the 
reason for the long duration delete.   I'll do some more measurements before 
going to 3.4.x as per Eric's note.

Sent from my iPad

On May 27, 2012, at 9:15 AM, Krzysztof Adamski <k@xxxxxxxxxxx> wrote:

> On Sun, 2012-05-27 at 09:34 +0200, Stefan Ring wrote:
>>>> [root@siFlash test]# xfs_bmap -vp 2.r.96.0
>>>> xfs_bmap: xfsctl(XFS_IOC_GETBMAPX) iflags=0x4 ["2.r.96.0"]: Cannot 
>>>> allocate memory
>>> Try filefrag -v maybe, if your e2fsprogs is new enough.
>>> Trying to remember, ENOMEM in bmap rings a bell... but this is possibly 
>>> indicative of an extremely fragmented file.
>> True, I've had it happen with extremely fragmented files.
>> I've started playing around with discard myself only recently, but so
>> far I like the approach of using fstrim a lot better than the discard
>> option: http://xfs.org/index.php/FITRIM/discard
> Check what blockdev --getra <md device> is set to. I used to have a
> several second deletes on large (4GB) fragmented files when ra was the
> default 256. Once I changed it to 4096 (best value will depend on your
> setup) the deletes became instant.
> K

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