From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,389a56bf87bdcf67 X-Google-Attributes: gid111c93,public From: Barak Pearlmutter Subject: NFS packet size (was: compiling 2.1.9x + MILO for LX) Date: 1998/03/31 Message-ID: <84emzi6pw8.fsf_-_@sweat.cs.unm.edu>#1/1 X-Deja-AN: 339748475 References: <87yaxu8rna.fsf@snot.cs.unm.edu> <6fk5t1$lqc@news3.newsguy.com> <87ra3m8bch.fsf@snot.cs.unm.edu> Organization: University of New Mexico, Albuquerque Newsgroups: comp.os.linux.alpha To follow up my own post ... a little benchmarking showed that 8k nfs packets give much faster NFS read times, on lightly loaded 10 and 100 megabit ethernet networks, between two Linux 2.0.33 machines. The advantage is more pronounced for 100. This appears to be in contradiction to some information posted by Donald Becker, so doubtless some details of my setup did not match his. It would be interesting to know the cause of the inefficiency with small rsize. Here are the figures I got for transfering a 16megabyte file (consisting of repeated copies of /boot/vmlinuz up to the appropriate file size) over 100baseT, from a Pentium Pro 200MHz server to a Alpha LX 533MHz client. 40 trials at each packet size. The script I used is included below. rsize time (secs, +/- stdev) ----- ---- 1024 19.4 +/- 1.8 2048 12.8 +/- 1.6 4096 8.5 +/- 1.4 8192 3.5 +/- 0.4 16384 3.3 +/- 0.4 ---------------------------------------------------------------- #! /bin/sh # "test-nfs" script. Grep and awk and gnuplot the output. case `hostname --short` in faceplant) server=sweat mdir=/var cdir=/nfs/sweat/var sdir=tmp fname=foo fname2=bar remuid=bap ;; clipping) cdir=/nfs/sweat # local mount point server=sweat # server host mdir=/ # directory on server to be mounted sdir=usr/tmp # directory on server where test file lives fname=foo # name of test file fname2=bar # name of place to copy test file to remuid=bap # remote user id ;; *) echo "unprogrammed host" exit 1 esac for t in 1 2 3 4 5 ; do for buf in 32768 16384 8192 4096 2048 1024 ; do # mount buffer size umount $cdir mount -o rsize=$buf,wsize=$buf,ro,nosuid $server:$mdir $cdir for i in 1 2 3 4 ; do #ssh -l bap -a -x sweat rm /$sdir/$fname #ssh -l bap -a -x sweat dd if=/dev/zero of=/$sdir/$fname bs=8196 count=2048 ssh -l $remuid -a -x $server "cd $mdir/$sdir; cp $fname $fname2; mv $fname2 $fname" echo NFS packet size: $buf date time cat < $cdir/$sdir/$fname | wc -c > /dev/null date done done done