On Thu, Apr 07, 2011 at 04:28:25PM +0200, Benny Lofgren wrote:

> On 2011-04-07 15.06, Otto Moerbeek wrote:
> > On Thu, Apr 07, 2011 at 02:34:27PM +0200, Benny Lofgren wrote:
> > 
> >> On 2011-04-07 11.08, Otto Moerbeek wrote:
> >>> Hi,
> >>>
> >>> I got little feedeback on this diff posed in a rather long thread, so
> >>> I am posting it again.
> >>>
> >>> Please test this, it makes fsck_ffs much faster (especially with -p)
> >>> and less memory hungry in a lot of cases.
> >>
> >> I've run it on a variety of file systems now and first of all, it seems
> >> to work without regressions. It also looks like it has about 2/3 of its
> >> previous memory footprint. However, I see very little increase in speed:
> > 
> > Were your filesystems mounted with softdep? Also, the most gain is
> > realized with ffs1 filesystems.
> 
> Apart from the / file system they had been mounted with softdep, yes.
> However they were of course unmounted when I ran fsck_ffs.
> 
> Does softdep actually alter the physical file system structure on disk? I
> have always been under the impression that softdep affects stuff like how
> things are buffered and the order of which things are written to disk rather
> than *what* is written, am I mistaken?

softdep does not change the layout. But only filesystems which were
mounted with softdep get this optimization. There's a flag in teh
superblock to signal that. Filesystem mounted with softdep have better
guarantees about the cylinder group headers being consistent. 

        -Otto


> And yes, they were all ffs1 filesystems. I have a 13 TB ffs2 file system on
> that machine as well, didn't try that now because I wanted to fire off a
> quick reply to your request for testing, and also you mentioned that ffs2
> is less (if at all) affected by this patch. I'll be glad to run a test
> against
> that volume as well, if you think there's an interest. Expect about 50
> minutes
> a run for one pass with the old and one pass with the new code though. :-)
> 
> 
> Regards,
> /Benny
> 
> 
> >> Unpatched, run with time /sbin/fsck_ffs -pf /dev/rraid0[adefghi]:
> > [snip]
> >> 1m20.35s real     0m2.57s user     0m4.29s system
> >>
> >> Patched, run with time /root/fsck_ffs -pf /dev/rraid0[adefghi]:
> >>
> > [snip]
> >> 1m18.52s real     0m1.32s user     0m3.85s system
> >>
> >> The file systems are organized like this:
> >>
> >> skynet:~/fsck_ffs_patch# dumpfs -m /dev/rraid0a
> >> # newfs command for /dev/rraid0a
> >> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> >> 525856 /dev/rraid0a
> >> skynet:~/fsck_ffs_patch# dumpfs -m /dev/rraid0d
> >> # newfs command for /dev/rraid0d
> >> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> >> 4197120 /dev/rraid0d
> >> skynet:~/fsck_ffs_patch# dumpfs -m /dev/rraid0e
> >> # newfs command for /dev/rraid0e
> >> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> >> 8390400 /dev/rraid0e
> >> skynet:~/fsck_ffs_patch# dumpfs -m /dev/rraid0f
> >> # newfs command for /dev/rraid0f
> >> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> >> 16780800 /dev/rraid0f
> >> skynet:~/fsck_ffs_patch# dumpfs -m /dev/rraid0g
> >> # newfs command for /dev/rraid0g
> >> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> >> 41944320 /dev/rraid0g
> >> skynet:~/fsck_ffs_patch# dumpfs -m /dev/rraid0h
> >> # newfs command for /dev/rraid0h
> >> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> >> 12583680 /dev/rraid0h
> >> skynet:~/fsck_ffs_patch# dumpfs -m /dev/rraid0i
> >> # newfs command for /dev/rraid0i
> >> newfs -O 1 -b 16384 -e 4096 -f 2048 -g 16384 -h 64 -m 5 -o time -s
> >> 7857920 /dev/rraid0i
> >> skynet:~/fsck_ffs_patch#
> >> Btw, I noticed a small change in this diff compared to the one you posted
> >> in the previous discussion thread. I assume this is the correct one to use?
> > 
> > Yes, though that's the most recent version.
> > 
> >     -Otto
> >>
> >> skynet:~# diff fsck_ffs.patch fsck_ffs_2.patch
> >> 158c158
> >> < +++ inode.c   31 Mar 2011 16:34:27 -0000
> >> ---
> >>> +++ inode.c   4 Apr 2011 09:16:36 -0000
> >> 203c203
> >> < +                     info[i].ino_state = USTATE;
> >> ---
> >>> +                     SET_ISTATE(i, USTATE);
> >>
> >>
> >> Regards,
> >>
> >> /Benny
> > 
> 
> -- 
> internetlabbet.se     / work:   +46 8 551 124 80      / "Words must
> Benny L?fgren        /  mobile: +46 70 718 11 90     /   be weighed,
>                     /   fax:    +46 8 551 124 89    /    not counted."
>                    /    email:  benny -at- internetlabbet.se

Reply via email to