From mboxrd@z Thu Jan 1 00:00:00 1970 From: Theodore Tso Subject: Re: Does "32.1% non-contiguous" mean severely fragmented? Date: Mon, 22 Oct 2007 09:02:45 -0400 Message-ID: <20071022130245.GC29220@thunk.org> References: <200710190149.l9J1n3Ti083212@www262.sakura.ne.jp> <20071019185222.GB751@thunk.org> <200710201239.BIF34800.OOJQFLMHFVtFOS@I-love.SAKURA.ne.jp> <20071020131719.GA8860@thunk.org> <200710222058.FBC09363.tFVJOOSFLHFQMO@I-love.SAKURA.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Tetsuo Handa Return-path: Received: from THUNK.ORG ([69.25.196.29]:49414 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752421AbXJVNCz (ORCPT ); Mon, 22 Oct 2007 09:02:55 -0400 Content-Disposition: inline In-Reply-To: <200710222058.FBC09363.tFVJOOSFLHFQMO@I-love.SAKURA.ne.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Oct 22, 2007 at 08:58:11PM +0900, Tetsuo Handa wrote: > > --- Start VM --- > --- Suspend VM --- > [root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem > Ubuntu7.10.vmem: 751 extents found, perfection would be 5 extents > [root@sakura Ubuntu7.10]# sync > [root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem > Ubuntu7.10.vmem: 3281 extents found, perfection would be 5 extents > [root@sakura Ubuntu7.10]# filefrag Ubuntu7.10.vmem > Ubuntu7.10.vmem: 3281 extents found, perfection would be 5 extents > --- Resume and poweroff VM --- > > What? "sync" yields more discontiguous? What filesystem are you using? ext3? ext4? xfs? And are you using any non-standard patches, such as some of the delayed allocation patches that have been floating around? If you're using ext3, that shouldn't be happening..... If you use the -v option to filefrag, both before and after the sync, that might show us what is going on. The other thing is to use debugfs and its "stat" command to get detailed breakdown of the block assignments of the file. Are you sure the file isn't getting written by some background tasks that you weren't aware of? This seems very strange; what virtualization software are you using? VMware, Xen, KVM? - Ted