All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Hans Reiser <reiser@namesys.com>
Cc: Mike Benoit <ipso@snappymail.ca>,
	"Vladimir V. Saveliev" <vs@namesys.com>,
	reiserfs-list@namesys.com
Subject: Re: ReiserFS v3 choking when free space falls below 10%?
Date: Fri, 30 Jun 2006 12:47:13 -0400	[thread overview]
Message-ID: <44A55591.6060500@suse.com> (raw)
In-Reply-To: <44A55271.7050501@namesys.com>

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans Reiser wrote:
> Mike Benoit wrote:
> 
>> This seems strange, because to me this type of workload would lend
>> itself to being less fragmented then most workloads. All the box does is
>> records TV programs, so over the course of 30-60min periods I would
>> guess 95+% of the writes are sequential. 
>>
>> Why would the fragmentation be so bad? Is there a way to tell what the
>> fragmentation rate is?
>>
>> Thanks.
>>
>>  
>>
> I wonder how the bitmap optimizations that Jeff added handle this usage
> pattern.  Jeff?

That's certainly interesting. The bitmap hinting code should skip bitmap
blocks with fewer blocks that are being asked for. The first zero hint
patch was never applied to mainline. I have that in my queue as well.

Try using the attached patch. It directs the block allocator to start
the search at the first known 0 bit rather than scanning the entire
block to find it. I'm not sure if will have a meaningful performance
impact, but it's worth a try.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEpVWRLPWxlyuTD7IRAm1uAJwIExdMY1ju2VjnVFmbweEluNUi+QCgqZWL
rNWRcVDW0KqBCrvUl1L4veE=
=Cuir
-----END PGP SIGNATURE-----

[-- Attachment #2: reiserfs-05-bitmap-use-first-zero-hint.diff --]
[-- Type: text/x-patch, Size: 1349 bytes --]

From: Jeff Mahoney <jeffm@suse.com>
Subject: [PATCH 5/5] reiserfs: make bitmap use cached first zero bit

 Currently, the bitmap code uses half of the hinting data gathered and cached
 and wastes the other half. We'll skip completely full bitmaps, but start
 scanning in bitmaps at locations where if we consulted the zero bit hint,
 we'd know there aren't any free bits available.

 This patch uses the first zero hint to bump the beginning of the search
 window to where we know there is at least one zero bit.

 fs/reiserfs/bitmap.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

diff -ruNpX ../dontdiff linux-2.6.15.orig.staging1/fs/reiserfs/bitmap.c linux-2.6.15.orig.staging2/fs/reiserfs/bitmap.c
--- linux-2.6.15.orig.staging1/fs/reiserfs/bitmap.c	2006-01-16 16:53:35.663319136 -0500
+++ linux-2.6.15.orig.staging2/fs/reiserfs/bitmap.c	2006-01-16 16:53:35.673317616 -0500
@@ -187,7 +187,10 @@ static int scan_bitmap_block(struct reis
 			return 0;	// No free blocks in this bitmap
 		}
 
-		/* search for a first zero bit -- beggining of a window */
+		if (*beg < bi->first_zero_hint)
+			*beg = bi->first_zero_hint;
+
+		/* search for a first zero bit -- beginning of a window */
 		*beg = reiserfs_find_next_zero_le_bit
 		    ((unsigned long *)(bh->b_data), boundary, *beg);
 

  reply	other threads:[~2006-06-30 16:47 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29 17:41 ReiserFS v3 choking when free space falls below 10%? Mike Benoit
2006-06-29 19:12 ` Vladimir V. Saveliev
2006-06-29 20:15   ` Mike Benoit
2006-06-29 20:22     ` Vladimir V. Saveliev
2006-06-29 21:01       ` Mike Benoit
2006-06-29 20:36     ` Nate Diller
2006-06-30 16:33     ` Hans Reiser
2006-06-30 16:47       ` Jeff Mahoney [this message]
2006-06-30 17:04         ` Hans Reiser
2006-06-30 17:46           ` Mike Benoit
2006-06-30 18:18             ` Hans Reiser
2006-07-05  0:37         ` Mike Benoit
2006-07-05  2:37           ` Hans Reiser
2006-07-05 14:42             ` Tom Vier
2006-07-05 19:12             ` Jeff Mahoney
     [not found]             ` <20060706125856.fdac1d16.pegasus@nerv.eu.org>
2006-07-06 15:43               ` Mike Benoit
2006-07-06 16:01                 ` Jonathan Briggs
2006-07-06 17:26                 ` Toby Thain
2006-07-06 17:26                   ` Toby Thain
2006-07-06 18:02                 ` Jeff Mahoney
2006-07-06 18:12                   ` Hans Reiser
2006-07-06 18:19                     ` Jeff Mahoney
2006-07-06 18:47                       ` Mike Benoit
2006-07-06 19:17                         ` Hans Reiser
2006-07-06 18:27                   ` Mike Benoit
2006-07-06 18:39                     ` Jeff Mahoney
2006-07-07  7:29                       ` Mike Benoit
2006-07-07 17:49                         ` Jan Kara
2006-07-07 17:50                           ` Jeff Mahoney
2006-07-07 18:07                             ` Jan Kara
2006-07-07 18:08                               ` Jeff Mahoney
2006-07-07 19:05                               ` Hans Reiser
2006-07-07 19:18                                 ` Jan Kara
2006-07-07 19:38                                   ` Hans Reiser
2006-07-07 20:18                           ` Mike Benoit
2006-07-07 21:04                           ` Mike Benoit
2006-07-07 21:20                             ` Hans Reiser
2006-07-08 18:45                               ` Jeff Mahoney
2006-07-09  0:01                                 ` Hans Reiser
2006-07-09  0:02                                 ` Hans Reiser
2006-07-12  0:54                                 ` Jeffrey Mahoney
2006-07-12  5:42                                   ` Hans Reiser
2006-07-12  5:52                                     ` Jeffrey Mahoney
2006-07-12  8:18                                       ` Hans Reiser
2006-07-12 16:06                                         ` Jeff Mahoney
2006-07-24 22:26 ` ReiserFS v3 choking when free space falls below 10% - FIXED Mike Benoit
2006-07-24 22:32   ` Jeff Mahoney
2006-07-26  0:10   ` David Masover
2006-07-26  2:25     ` Mike Benoit
2006-07-26 14:29     ` Hans Reiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44A55591.6060500@suse.com \
    --to=jeffm@suse.com \
    --cc=ipso@snappymail.ca \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.com \
    --cc=vs@namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.