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.
>
> 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