fsck times/memory sizes/etc

Eric Anderson anderson at centtech.com
Wed Feb 14 14:51:38 UTC 2007


I just did some quick playing around, doing newfs and fsck's on fresh 
file systems.  I did one set on a 1Gb malloc'ed md, and another on a 
65GB real disk device.  The disk was only being used for this test, 
nothing else.

I don't claim these numbers are perfect, but I did run each test 3-4 
times to make sure they were consistent.

I found it interesting that the fsck times didn't reduce once all the 
files/directories were deleted.

################################################
# mdconfig -a -t malloc -s 1024m

# time fsck_ufs -f /dev/md0
** /dev/md0
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 2 used, 506485 free (21 frags, 63308 blocks, 0.0% fragmentation)

real    0m0.014s
user    0m0.009s
sys     0m0.002s

# mount it
# fill it full of directories and empty files
# df -i /mnt
Filesystem 1K-blocks Used  Avail Capacity iused ifree %iused  Mounted on
/dev/md0     1012974 2340 929598     0%  141310     0  100%   /mnt

# umount it
# time fsck_ufs -f /dev/md0
** /dev/md0
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
141310 files, 1170 used, 505317 free (21 frags, 63162 blocks, 0.0% 
fragmentation)

real    0m0.266s
user    0m0.103s
sys     0m0.015s

# mount it, rm all the files
# umount it
# time fsck_ufs -f /dev/md0
** /dev/md0
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 2 used, 506485 free (21 frags, 63308 blocks, 0.0% fragmentation)

real    0m0.151s
user    0m0.045s
sys     0m0.024s


##################################################

# newfs -U /dev/ad2s2a
/dev/ad2s2a: 65397.4MB (133933888 sectors) block size 16384, fragment 
size 2048
         using 356 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
         with soft updates

# time fsck -f /dev/ad2s2a
** /dev/ad2s2a
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 2 used, 32429667 free (19 frags, 4053706 blocks, 0.0% 
fragmentation)

real    0m9.673s
user    0m0.449s
sys     0m0.000s

[root at neutrino ~]# mount /dev/ad2s2a /mnt
[root at neutrino ~]# df -i /mnt
Filesystem  1K-blocks Used    Avail Capacity iused   ifree %iused 
Mounted on
/dev/ad2s2a  64859338    4 59670588     0%       2 8384508    0%   /mnt

# fill it full of directories and empty files
# df -i /mnt
Filesystem  1K-blocks   Used    Avail Capacity iused ifree %iused 
Mounted on
/dev/ad2s2a  64859338 138346 59532246     0% 8384510     0  100%   /mnt

# umount it
# time fsck -f /dev/ad2s2a
** /dev/ad2s2a
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
8384510 files, 69173 used, 32360496 free (24 frags, 4045059 blocks, 0.0% 
fragmentation)

real    1m57.315s
user    0m6.046s
sys     0m0.811s

# memory usage for fsck maxed at 56448kb (~55MB)

# mount, rm -rf all created files/dirs
# df -i /mnt
Filesystem  1K-blocks Used    Avail Capacity iused   ifree %iused 
Mounted on
/dev/ad2s2a  64859338    6 59670586     0%       2 8384508    0%   /mnt

# umount it

# time fsck -f /dev/ad2s2a
** /dev/ad2s2a
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 3 used, 32429666 free (18 frags, 4053706 blocks, 0.0% 
fragmentation)

real    1m37.347s
user    0m3.054s
sys     0m0.693s

# memory usage for fsck (on this empty fs) maxed at 9344kb (about 9MB)
##################################################


Eric





-- 
------------------------------------------------------------------------
Eric Anderson        Sr. Systems Administrator        Centaur Technology
An undefined problem has an infinite number of solutions.
------------------------------------------------------------------------


More information about the freebsd-fs mailing list