From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: Does Ext4 support parallel write similar to XFS? Date: Thu, 26 Jan 2012 09:55:35 +1100 Message-ID: <20120125225535.GU15102@dastard> References: <4F202F2E.9000608@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Amit Sahrawat , xfs@oss.sgi.com, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, LKML , Christoph Hellwig To: Eric Sandeen Return-path: Received: from ipmail04.adl6.internode.on.net ([150.101.137.141]:19600 "EHLO ipmail04.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832Ab2AYWzi (ORCPT ); Wed, 25 Jan 2012 17:55:38 -0500 Content-Disposition: inline In-Reply-To: <4F202F2E.9000608@redhat.com> Sender: linux-ext4-owner@vger.kernel.org List-ID: On Wed, Jan 25, 2012 at 10:34:54AM -0600, Eric Sandeen wrote: > On 1/24/12 11:19 PM, Amit Sahrawat wrote: > > In XFS we can write parallel (i.,e we can make use of allocation > > groups for writing process). If the files are kept in individual > > directories, there is a possibility that first the blocks for that > > files be used from individual allocation groups. If I start =E2=80=98= 4=E2=80=99 > > writing process(cp 100MB_file //) =E2=80=93 after writing i= s finished > > =E2=80=93 if I check the bmap =E2=80=93 it does shows that initial = allocation was from > > individual allocation groups. > > Even though in Ext4 also we do have groups =E2=80=93 but I am not a= ble to get > > behavior similar to XFS. > > If I check the file extents =E2=80=93 the extents are in mixed form= , the > > allocation pattern is also very fragmented. > >=20 > > Please share more on this. Also, if there is a possible exact test > > case to check for parallel writes support. >=20 > It seems that you are asking more about allocation policy than parall= elism > in general? With either filesystem, you could use preallocation to w= ind > up with more contiguous files when you write them in parallel, though > that requires some idea of the file size ahead of time. >=20 > ext4 doesn't have that exact dir::group heuristic that xfs uses, > but it does have other mechanisms and heuristics to try to get good > file and directory layout. XFs has different allocation policies according to mount options used. inode32 (default for > 1TB), inode64 (default for <1TB) and filestreams. Each will give you different layouts for the same test depending on the size of your filesystem and the amount of free space you have available in it. If XFS does what you want, then use it. There is no good reason for trying to make ext4 do everything XFS does because it simply can't. Especially when it comes to allocation strategies and policies... Cheers, Dave. --=20 Dave Chinner david@fromorbit.com -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q0PMtdpT082016 for ; Wed, 25 Jan 2012 16:55:39 -0600 Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by cuda.sgi.com with ESMTP id pGfeAhsE7cyAIU1V for ; Wed, 25 Jan 2012 14:55:37 -0800 (PST) Date: Thu, 26 Jan 2012 09:55:35 +1100 From: Dave Chinner Subject: Re: Does Ext4 support parallel write similar to XFS? Message-ID: <20120125225535.GU15102@dastard> References: <4F202F2E.9000608@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4F202F2E.9000608@redhat.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Eric Sandeen Cc: Amit Sahrawat , LKML , xfs@oss.sgi.com, Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org T24gV2VkLCBKYW4gMjUsIDIwMTIgYXQgMTA6MzQ6NTRBTSAtMDYwMCwgRXJpYyBTYW5kZWVuIHdy b3RlOgo+IE9uIDEvMjQvMTIgMTE6MTkgUE0sIEFtaXQgU2FocmF3YXQgd3JvdGU6Cj4gPiBJbiBY RlMgd2UgY2FuIHdyaXRlIHBh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91IHdhbnQsIHRoZW4gdXNl IGl0LiBUaGVyZSBpcyBubyBnb29kIHJlYXNvbiBmb3IKdHJ5aW5nIHRvIG1ha2UgZXh0NCBkbyBl dmVyeXRoaW5nIFhGUyBkb2VzIGJlY2F1c2UgaXQgc2ltcGx5IGNhbid0LgpFc3BlY2lhbGx5IHdo ZW4gaXQgY29tZXMgdG8gYWxsb2NhdGlvbiBzdHJhdGVnaWVzIGFuZCBwb2xpY2llcy4uLgoKQ2hl ZXJzLAoKRGF2ZS4KLS0gCkRhdmUgQ2hpbm5lcgpkYXZpZEBmcm9tb3JiaXQuY29tCgpfX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwp4ZnMgbWFpbGluZyBsaXN0 Cnhmc0Bvc3Muc2dpLmNvbQpodHRwOi8vb3NzLnNnaS5jb20vbWFpbG1hbi9saXN0aW5mby94ZnMK From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751792Ab2AYWzj (ORCPT ); Wed, 25 Jan 2012 17:55:39 -0500 Received: from ipmail04.adl6.internode.on.net ([150.101.137.141]:19600 "EHLO ipmail04.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832Ab2AYWzi (ORCPT ); Wed, 25 Jan 2012 17:55:38 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EAKKHIE95LElR/2dsb2JhbABChQmpO4EGgXIBAQUjDwEjIxAIAQIYAgImAgIUJQMhE64+kVUTgRyHYAEGBgkFBAMHAhAGBQcFg1kBBQQFEAaCH4EWBJUdkmY Date: Thu, 26 Jan 2012 09:55:35 +1100 From: Dave Chinner To: Eric Sandeen Cc: Amit Sahrawat , xfs@oss.sgi.com, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, LKML , Christoph Hellwig Subject: Re: Does Ext4 support parallel write similar to XFS? Message-ID: <20120125225535.GU15102@dastard> References: <4F202F2E.9000608@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4F202F2E.9000608@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 25, 2012 at 10:34:54AM -0600, Eric Sandeen wrote: > On 1/24/12 11:19 PM, Amit Sahrawat wrote: > > In XFS we can write parallel (i.,e we can make use of allocation > > groups for writing process). If the files are kept in individual > > directories, there is a possibility that first the blocks for that > > files be used from individual allocation groups. If I start ‘4’ > > writing process(cp 100MB_file //) – after writing is finished > > – if I check the bmap – it does shows that initial allocation was from > > individual allocation groups. > > Even though in Ext4 also we do have groups – but I am not able to get > > behavior similar to XFS. > > If I check the file extents – the extents are in mixed form, the > > allocation pattern is also very fragmented. > > > > Please share more on this. Also, if there is a possible exact test > > case to check for parallel writes support. > > It seems that you are asking more about allocation policy than parallelism > in general? With either filesystem, you could use preallocation to wind > up with more contiguous files when you write them in parallel, though > that requires some idea of the file size ahead of time. > > ext4 doesn't have that exact dir::group heuristic that xfs uses, > but it does have other mechanisms and heuristics to try to get good > file and directory layout. XFs has different allocation policies according to mount options used. inode32 (default for > 1TB), inode64 (default for <1TB) and filestreams. Each will give you different layouts for the same test depending on the size of your filesystem and the amount of free space you have available in it. If XFS does what you want, then use it. There is no good reason for trying to make ext4 do everything XFS does because it simply can't. Especially when it comes to allocation strategies and policies... Cheers, Dave. -- Dave Chinner david@fromorbit.com