Date: Wed, 12 Dec 2001 15:57:07 +1100 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Maxim Sobolev <sobomax@FreeBSD.ORG>, Sheldon Hearn <sheldonh@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sbin/newfs newfs.8 Message-ID: <20011212155707.A27238@gsmx07.alcatel.com.au> In-Reply-To: <200112101846.fBAIkee47815@apollo.backplane.com>; from dillon@apollo.backplane.com on Mon, Dec 10, 2001 at 10:46:40AM -0800 References: <200111271953.fARJrFc88452@freefall.freebsd.org> <3C10F171.FEE996EB@FreeBSD.org> <200112101846.fBAIkee47815@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On 2001-Dec-10 10:46:40 -0800, Matthew Dillon <dillon@apollo.backplane.com> wrote:
> Interesting. I just ran a test using VN for /usr/ports:
...
> So /usr/ports alone will eat 100MB of additional disk space on a
> 2K/16K filesystem, which is quite significant.
>
>
> /usr/src has these characteristics:
>
>Filesystem 1K-blocks Used Avail Capacity Mounted on (1K/8K)
>/dev/vn0c 4065694 1002597 2737842 27% /mnt
>Filesystem 1K-blocks Used Avail Capacity Mounted on (2K/16K)
>/dev/vn0c 4129310 1046374 2752592 28% /mnt
This is about 3 times the size I got. Are you sure this is a standard
/usr/src?
I've just done something similar: /usr/doc, /usr/ports, -CURRENT
/usr/src, /usr/www and an i386 -STABLE /usr/obj, for each of 4/.5,
8/1, 16/2 and 32/4 block sizes, using a 2048MB VN filesystem. Apart
from /usr/obj, all the files were checked out from a CVS repository
and include CVS metadata (it might be interesting to see the
difference with the metadata deleted, but I didn't think of that until
later). All filesystems were freshly created using "-i 8192". The
script I used is attached.
Size: 4096/512 % 8K/1K 16K/2K % 32K/4K % inodes
Available 2030712 2032623 2031598 2029532
/usr/doc 33471 -6.87 35940 40648 13.10 50068 39.31 6089
/usr/obj [1] 1136121 1163554 2.41 1222868 7.64 42136
/usr/ports 105662 -31.33 153868 256562 66.74 468208 204.29 108516
/usr/src 355361 -4.88 373586 411666 10.19 489496 31.03 52467
/usr/www 11146 -7.48 12047 13980 16.05 17992 49.35 2422
The % columns are wastage compared to the 8K/1K filesystem. Apart from
/usr/ports, the cost of moving to 16K/2K seems fairly small. Whether
any of these are "typical" filesystems is arguable.
IMHO, the cases that will suffer badly from 2K frags are:
- /usr/ports.
- Older one-file-per-article news servers
- /var/spool/mqueue on big mailservers
I don't see that any of these will bite a novice sysadmin: Building
/usr/ports is more a "FreeBSD developer" environment. And anyone
running a large news or mail server needs to have some ideas about
what they are doing.
[1] I did a kernel build part-way through and this figure isn't accurate.
Peter
[-- Attachment #2 --]
#!/bin/sh
#
# Check space wastage on a variety of filesystems for a variety of
# block and frag sizes
FILE=/usr/tmp/foo
SIZE=2048
# Checkout FS from CVS into vn1
check_cvs() {
echo "############## Checking $1/$2 cvs: $3 ###################"
newfs -b $1 -f $2 -i 4096 /dev/vn1c
mount -o async,noatime /dev/vn1c /foo
df -ki /foo
cd /foo
cvs -Q -R -d /usr/ncvs checkout $3
df -ki /foo
cd
umount /foo
}
# Check filesystems for given block/frag size
check_size() {
echo "############## Checking $1/$2 FS ###################"
check_cvs $1 $2 doc
check_cvs $1 $2 ports
check_cvs $1 $2 src
check_cvs $1 $2 www
echo "############## Checking $1/$2 /usr/obj ###################"
newfs -b $1 -f $2 -i 4096 /dev/vn1c
mount -o async,noatime /dev/vn1c /foo
df -ki /foo
cd /usr
find obj | cpio -pd /foo
df -ki /foo
cd
umount /foo
}
dd if=/dev/zero of=$FILE bs=1m count=$SIZE || echo $?
vnconfig -e -s labels vn1 $FILE || exit $?
disklabel -wr vn1 auto || exit $?
check_size 4096 512
check_size 8192 1024
check_size 16384 2048
check_size 32768 4096
vnconfig -u vn1
rm -f $FILE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011212155707.A27238>
