mfs and buildworlds on the SunFire x4600

Kris Kennaway kris at obsecurity.org
Tue May 8 06:54:05 UTC 2007


On Tue, May 08, 2007 at 02:04:57PM +0800, Mars G. Miro wrote:
> On 5/8/07, Kris Kennaway <kris at obsecurity.org> wrote:
> >On Tue, May 08, 2007 at 11:45:12AM +0800, Mars G. Miro wrote:
> >
> >> that or, does mfs speeding things up really work?  remains to be
> >> seen ...
> >
> >Of course it does...even the fastest disk hardware on the market
> >(well, as of a year ago) is several times slower than memory writing,
> >and commodity disk hardware is orders of magnitude slower.  Yes, I
> >have the measurements to prove this:
> >
> >  http://people.freebsd.org/~kris/scaling/Filesystem%20Performance.pdf
> >
> 
> That was the paper I was referring to in my 1st email.
> 
> Do you still have your scripts that you could prolly make publicly 
> available?
> 
> As some of you might have noticed already, I have a plethora of exotic
> machines and hardware on my hands that i could test FreeBSD on ;-)

Here it is (the iostat monitoring won't work for md devices).  Provide
your own /usr/ports tarball :)

#!/bin/sh
reps=$1
jobs=$2

disk=md0
iostat_disk=md0

prepdisk() {
  disk=$1

  umount -f /test

#  mdconfig -d -u 0
#  mdconfig -d -u 1
#  mdconfig -d -u 2
#  mdconfig -d -u 3
#  mdconfig -d -u 4
#  mdconfig -a -t swap -s 4g
#  mdconfig -a -t swap -s 4g
#  mdconfig -a -t swap -s 4g
#  mdconfig -a -t swap -s 4g
#  mdconfig -a -t swap -s 4g
#  mdconfig -a -t swap -s 4g
#  newfs /dev/${disk} > /dev/null
#  #tunefs -n enable /dev/${disk}
#  mount -o noasync /dev/${disk} /test

   mdconfig -d -u 0
   mdconfig -a -t swap -s 16g -u 0
   newfs -O2 /dev/md0 > /dev/null
   #newfs -f 512 -i 2048 -O 1 -n  /dev/md0 > /dev/null
   tunefs -n enable /dev/md0
   mount -o noclusterw,noclusterr /dev/md0 /test
#    mount -t tmpfs foo /test
}

doextract() {
    disk=$1
    start=$2
    dir=$3

    time=$(/usr/bin/time -o /dev/stdout -p gtar xfC /usr/perf/ports.tar ${dir} | grep real | awk '{print $2}')

    end=$(iostat -Id ${iostat_disk} | tail -1 | awk '{print $3}')

    size=$(echo "scale=3; ${end}*1024-${start}*1024" | bc)
    rate=$(echo "scale=3; ${size}/${time}" | bc)

    df=$(df -k /test | grep /test | awk '{print $3}')
    fsrate=$(echo "scale=3; ${df}/${time}" | bc)

    echo "Device: ${size} KB written in ${time} seconds, ${rate} KB/sec"
    echo "Filesystem: ${df} KB written in ${time} seconds, ${fsrate} KB/sec"
}

for i in `jot $reps 1`; do
  prepdisk ${disk}

  start=$(iostat -Id ${iostat_disk} | tail -1 | awk '{print $3}')
  cd /test

  echo "Starting -j${jobs}"
  for i in `jot $jobs 1`; do
    mkdir $i
    doextract ${disk} "${start}" ${i} &
  done
  wait
done



More information about the freebsd-stable mailing list