public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_db: defang frag command
@ 2016-05-11 19:41 Eric Sandeen
  2016-05-12  9:23 ` Carlos Maiolino
  2016-05-23 15:06 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2016-05-11 19:41 UTC (permalink / raw)
  To: xfs-oss

Too many people freak out about this fictitious "fragmentation
factor."  As shown in the fact, it is largely meaningless, because
the number approaches 100% extremely quickly for just a few
extents per file.

I thought about removing it altogether, but perhaps a note
about its uselessness, and a more soothing metric (avg extents
per file) might be useful.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/db/frag.c b/db/frag.c
index 36bb689..e11b140 100644
--- a/db/frag.c
+++ b/db/frag.c
@@ -172,6 +172,10 @@ frag_f(
 		answer = 0.0;
 	dbprintf(_("actual %llu, ideal %llu, fragmentation factor %.2f%%\n"),
 		extcount_actual, extcount_ideal, answer);
+	dbprintf(_("Note, this number is largely meaningless.\n"));
+	answer = (double)extcount_actual / (double)extcount_ideal;
+	dbprintf(_("Files on this filesystem average %.2f extents per file\n"),
+		answer);
 	return 0;
 }
 


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs_db: defang frag command
  2016-05-11 19:41 [PATCH] xfs_db: defang frag command Eric Sandeen
@ 2016-05-12  9:23 ` Carlos Maiolino
  2016-05-23 15:06 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maiolino @ 2016-05-12  9:23 UTC (permalink / raw)
  To: xfs

On Wed, May 11, 2016 at 02:41:28PM -0500, Eric Sandeen wrote:
> Too many people freak out about this fictitious "fragmentation
> factor."  As shown in the fact, it is largely meaningless, because
> the number approaches 100% extremely quickly for just a few
> extents per file.
> 
> I thought about removing it altogether, but perhaps a note
> about its uselessness, and a more soothing metric (avg extents
> per file) might be useful.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/db/frag.c b/db/frag.c
> index 36bb689..e11b140 100644
> --- a/db/frag.c
> +++ b/db/frag.c
> @@ -172,6 +172,10 @@ frag_f(
>  		answer = 0.0;
>  	dbprintf(_("actual %llu, ideal %llu, fragmentation factor %.2f%%\n"),
>  		extcount_actual, extcount_ideal, answer);
> +	dbprintf(_("Note, this number is largely meaningless.\n"));
> +	answer = (double)extcount_actual / (double)extcount_ideal;
> +	dbprintf(_("Files on this filesystem average %.2f extents per file\n"),
> +		answer);
>  	return 0;
>  }

I'm not quite comfortable with it, in my mind, if it's meaningless, why should
we print it?

I agree with printing the average though.

>  
> 
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

-- 
Carlos

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs_db: defang frag command
  2016-05-11 19:41 [PATCH] xfs_db: defang frag command Eric Sandeen
  2016-05-12  9:23 ` Carlos Maiolino
@ 2016-05-23 15:06 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-05-23 15:06 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On Wed, May 11, 2016 at 02:41:28PM -0500, Eric Sandeen wrote:
> Too many people freak out about this fictitious "fragmentation
> factor."  As shown in the fact, it is largely meaningless, because
> the number approaches 100% extremely quickly for just a few
> extents per file.
> 
> I thought about removing it altogether, but perhaps a note
> about its uselessness, and a more soothing metric (avg extents
> per file) might be useful.

Heh.  Looks reasonable:

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-23 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-11 19:41 [PATCH] xfs_db: defang frag command Eric Sandeen
2016-05-12  9:23 ` Carlos Maiolino
2016-05-23 15:06 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox