Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1728508

Re: XFS mounted with 'discard' option - deleting fio test files slow

From Dave Chinner <david@fromorbit.com>
Newsgroups linux.kernel
Subject Re: XFS mounted with 'discard' option - deleting fio test files slow
Date 2017-09-08 01:40 +0200
Message-ID <uneyR-6Vy-9@gated-at.bofh.it> (permalink)
References <un9IS-3K0-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Your email is full of wacky symbols and needs line wrapping at 72
columns]

On Thu, Sep 07, 2017 at 06:22:22PM +0000, Lu, Qian wrote:
> Recently we received a bug report in the XFS filesystem with
> 'discard' option. I have been able to reproduce this issue. I used
> XFS filesystem to format NVMe SSD and mounted with 'discard'
> option. When I tried to delete the test fio files, the session
> took long time. This issue is based on Linux 4.9 stable tree. I
> have also repeated this test with Linux 4.13, 4.12, and we are
> facing the same issue. Tests were repeated several times and it
> was consistent.

.....
> 
> # fio --name fio_test_file --direct=1 --rw=randwrite --bs=4k --size=5G --numjobs=8 --group_reporting
> --> Interrupt with Ctrl+C
> # time rm -rf fio_test_file.*
> real 2m2.242s
> user 0m0.000s
> sys 0m25.524s

4k random write with direct IO. 5GB file. Probably got a million 4k
extents in it. Which means XFS has sent a million tiny 4k discards
to the device. Run 'xfs_bmap -vvp fio_test_file.*' to confirm.

Don't use "-o discard" if you care about performance.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

XFS mounted with 'discard' option - deleting fio test files slow "Lu, Qian" <luqia@amazon.com> - 2017-09-07 20:30 +0200
  Re: XFS mounted with 'discard' option - deleting fio test files slow Dave Chinner <david@fromorbit.com> - 2017-09-08 01:40 +0200
    Re: XFS mounted with 'discard' option - deleting fio test files slow Christoph Hellwig <hch@infradead.org> - 2017-09-08 09:20 +0200
  Re: XFS mounted with 'discard' option - deleting fio test files slow "Lu, Qian" <luqia@amazon.com> - 2017-09-08 19:20 +0200
    Re: XFS mounted with 'discard' option - deleting fio test files slow Hao Chen <haochen@amazon.com> - 2017-09-09 01:30 +0200

csiph-web