[Cluster-devel] [fsck.gfs2 PATCH 0/2] Two fsck_bitmap_set patches

Bob Peterson rpeterso at redhat.com
Wed Jul 13 13:14:02 UTC 2016


Hi,

I posted these two fsck.gfs2 performance patches previously on
22 June as part of a multi-patch set. I split these two patches
from the rest, but they only achieve savings together.

The theory behind these two patches is this:
A large file system (in my case 15TB, at 80% full) is going to loop
trillions of times, touching the bitmap in memory each time, so the
more efficient we can make that, the faster it will go. In my case,
it was looping more than 13 trillion times, and as you can tell,
making fsck_bitmap_set more efficient did help significantly.

In this case, the savings is probably only significant when verbose
mode (-vv option) is not used. The problem is that the fsck_bitmap_set
function was checking for verbose mode and passing lots of information
into the function, even when it wasn't going to use it. By converting
the function into a macro that only checked the value once instead of
passing all that information, it avoided doing that 13 trillion times,
which resulted in considerable savings.

The first performance patch I sent today allowed pass1 to go
from 16h49m44.636s to 15h52m8.912s.

This set of two patches made pass1 go from 15h52m to 14h23m, a savings
of 89 minutes: another 9.3 percent speedup from the previous set.

Regards,

Bob Peterson
Red Hat File Systems
---
Bob Peterson (2):
  fsck.gfs2: Make _fsck_bitmap_set not send a return code
  fsck.gfs2: convert fsck_bitmap_set to a macro

 gfs2/fsck/metawalk.c | 58 ----------------------------------------------
 gfs2/fsck/metawalk.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++------
 gfs2/fsck/pass1.c    | 22 ++++++++++++++----
 3 files changed, 75 insertions(+), 70 deletions(-)

-- 
2.5.5




More information about the Cluster-devel mailing list