Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751640AbbD3LOk (ORCPT ); Thu, 30 Apr 2015 07:14:40 -0400 Received: from mail.phunq.net ([184.71.0.62]:38854 "EHLO starbase.phunq.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbbD3LOh convert rfc822-to-8bit (ORCPT ); Thu, 30 Apr 2015 07:14:37 -0400 From: Daniel Phillips To: Dave Chinner Cc: Mike Galbraith , , , , "Theodore Ts'o" , OGAWA Hirofumi Subject: Re: xfs: does mkfs.xfs require fancy switches to get decent =?iso-8859-1?Q?performance=3F_(was_Tux3_Report:_How_fast_can_we_fsync=3F)?= Date: Thu, 30 Apr 2015 04:14:54 -0700 User-Agent: Trojita/v0.5-14-g8a2496c; Qt/4.8.6; X11; Linux; Ubuntu 14.04.2 LTS MIME-Version: 1.0 Message-ID: In-Reply-To: <20150430002008.GY15810@dastard> References: <8f886f13-6550-4322-95be-93244ae61045@phunq.net> <1430274071.3363.4.camel@gmail.com> <1906f271-aa23-404b-9776-a4e2bce0c6aa@phunq.net> <1430289213.3693.3.camel@gmail.com> <1430325763.19371.41.camel@gmail.com> <1430334326.7360.25.camel@gmail.com> <20150430002008.GY15810@dastard> Organization: tux3.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3909 Lines: 74 On Wednesday, April 29, 2015 5:20:08 PM PDT, Dave Chinner wrote: > It's easy to be fast on empty filesystems. XFS does not aim to be > fast in such situations - it aims to have consistent performance > across the life of the filesystem. > > In this case, ext4, btrfs and tux3 have optimal allocation filling > from the outside of the disk, while XFS is spreading the files > across (at least) 4 separate regions of the whole disk. Hence XFS is > seeing seek times on read are much larger than the other filesystems > when the filesystem is empty as it is doing full disk seeks rather > than being confined to the outer edges of spindle. > > Thing is, once you've abused those filesytsems for a couple of > months, the files in ext4, btrfs and tux3 are not going to be laid > out perfectly on the outer edge of the disk. They'll be spread all > over the place and so all the filesystems will be seeing large seeks > on read. The thing is, XFS will have roughly the same performance as > when the filesystem is empty because the spreading of the allocation > allows it to maintain better locality and separation and hence > doesn't fragment free space nearly as badly as the oher filesystems. > Free space fragmentation is what leads to performance degradation in > filesystems, and all the other filesystem will have degraded to be > *much worse* than XFS. > > Put simply: empty filesystem benchmarking does not show the real > performance of the filesystem under sustained production workloads. > Hence benchmarks like this - while interesting from a theoretical > point of view and are widely used for bragging about whose got the > fastest - are mostly irrelevant to determining how the filesystem > will perform in production environments. > > We can also look at this algorithm in a different way: take a large > filesystem (say a few hundred TB) across a few tens of disks in a > linear concat. ext4, btrfs and tux3 will only hit the first disk in > the concat, and so go no faster because they are still bound by > physical seek times. XFS, however, will spread the load across many > (if not all) of the disks, and so effectively reduce the average > seek time by the number of disks doing concurrent IO. Then you'll > see that application level IO concurrency becomes the performance > limitation, not the physical seek time of the hardware. > > IOWs, what you don't see here is that the XFS algorithms that make > your test slow will keep *lots* of disks busy. i.e. testing empty > filesystem performance a single, slow disk demonstrates that an > algorithm designed for scalability isn't designed to acheive > physical seek distance minimisation. Hence your storage makes XFS > look particularly poor in comparison to filesystems that are being > designed and optimised for the limitations of single slow spindles... > > To further demonstrate that it is physical seek distance that is the > issue here, lets take the seek time out of the equation (e.g. use a > SSD). Doing that will result in basically no difference in > performance between all 4 filesystems as performance will now be > determined by application level concurrency and that is the same for > all tests. Lovely sounding argument, but it is wrong because Tux3 still beats XFS even with seek time factored out of the equation. Even with SSD, if you just go splattering files all over the disk you will pay for it in latency and lifetime when the disk goes into continuous erase and your messy layout causes write multiplication. But of course you can design your filesystem any way you want. Tux3 is designed to be fast on the hardware that people actually have. Regards, Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/