Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jan 2004 20:17:58 +0100
From:      =?ISO-8859-1?Q?Bj=F6rn_Gr=F6nvall?= <bg@sics.se>
To:        Robert Watson <rwatson@freebsd.org>
Cc:        Willem Jan Withagen <wjw@withagen.nl>
Subject:   Re: Old SUN NFS performance papers.
Message-ID:  <20040127201758.13be4f08.bg@sics.se>
In-Reply-To: <Pine.NEB.3.96L.1040124210942.31483E-100000@fledge.watson.org>
References:  <003c01c3de8d$d569edb0$471b3dd4@dual> <Pine.NEB.3.96L.1040124210942.31483E-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

--Multipart=_Tue__27_Jan_2004_20_17_58_+0100_=Q2bfUEBOTrwOu39
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

On Sat, 24 Jan 2004 21:14:51 -0500 (EST)
Robert Watson <rwatson@freebsd.org> wrote:

> I haven't done much benchmarking on NFS lately, but something worth
> remembering is that people have spent a lot of time researching and
> optimizing TCP for a variety of connection types, whereas the NFS code
> basically has a static implementation of RPC backoff and flow control that
> hasn't evolved much.

One reason that FreeBSD users experience poor NFSv3/TCP performance is
that the defaults for rsize and wsize is unusually small, only
8k. Solaris and HP-UX defaults to 32k for a good reason. I guess TCP
simply needs a little bit more data to chew on to be efficient.

I tested this on 5.2-CURRENT and found that large file read
performance went up from 56Mbit/s to 80Mbit/s, an improvement by 43%.

I have written a patch that makes FreeBSD use the same defaults as
Solaris and HP-UX. Note that with NFSv3 there is no risk associated
with specifying to large values for [rw]size. The server automatically
limits these values in the fsinfo rpc. Patch is attached.

Cheers,
Björn

-- 
  _     _                                           ,_______________.
Bjorn Gronvall (Björn Grönvall)                    /_______________/|
Swedish Institute of Computer Science              |               ||
PO Box 1263, S-164 29 Kista, Sweden                | Schroedingers ||
Email: bg@sics.se, Phone +46 -8 633 15 25          |      Cat      |/
Cellular +46 -70 768 06 35, Fax +46 -8 751 72 30   '---------------'

--Multipart=_Tue__27_Jan_2004_20_17_58_+0100_=Q2bfUEBOTrwOu39
Content-Type: application/octet-stream;
 name="nfsclient.patch"
Content-Disposition: attachment;
 filename="nfsclient.patch"
Content-Transfer-Encoding: base64

LS0tIC91c3Ivc3JjL3N5cy9uZnNjbGllbnQvbmZzX3Zmc29wcy5jLm9yaWcJU2F0IE5vdiAyMiAw
MzoyMTo0OSAyMDAzCisrKyAvdXNyL3NyYy9zeXMvbmZzY2xpZW50L25mc192ZnNvcHMuYwlUdWUg
SmFuIDI3IDE5OjI2OjM1IDIwMDQKQEAgLTM1OSw2ICszNTksNyBAQAogCQltYXhmc2l6ZSA9IGZ4
ZHJfaHlwZXIoJmZzcC0+ZnNfbWF4ZmlsZXNpemUpOwogCQlpZiAobWF4ZnNpemUgPiAwICYmIG1h
eGZzaXplIDwgbm1wLT5ubV9tYXhmaWxlc2l6ZSkKIAkJCW5tcC0+bm1fbWF4ZmlsZXNpemUgPSBt
YXhmc2l6ZTsKKwkJbm1wLT5ubV9tb3VudHAtPm1udF9zdGF0LmZfaW9zaXplID0gbmZzX2lvc2l6
ZShubXApOwogCQlubXAtPm5tX3N0YXRlIHw9IE5GU1NUQV9HT1RGU0lORk87CiAJfQogCW1fZnJl
ZW0obXJlcCk7CkBAIC03ODUsOCArNzg2LDEyIEBACiAKIAlubXAtPm5tX3RpbWVvID0gTkZTX1RJ
TUVPOwogCW5tcC0+bm1fcmV0cnkgPSBORlNfUkVUUkFOUzsKLQlubXAtPm5tX3dzaXplID0gTkZT
X1dTSVpFOwotCW5tcC0+bm1fcnNpemUgPSBORlNfUlNJWkU7CisJaWYgKChhcmdwLT5mbGFncyAm
IE5GU01OVF9ORlNWMykgJiYgYXJncC0+c290eXBlID09IFNPQ0tfU1RSRUFNKSB7CisJCW5tcC0+
bm1fd3NpemUgPSBubXAtPm5tX3JzaXplID0gTkZTX01BWERBVEE7CisJfSBlbHNlIHsKKwkJbm1w
LT5ubV93c2l6ZSA9IE5GU19XU0la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gKGVycm9yKQogCQlyZXR1cm4gKGVycm9yKTsKIAl2cCA9IE5GU1RPVihucCk7CisJLyoK
KwkgKiBHZXQgdHJhbnNmZXIgcGFyYW1ldGVycyBhbmQgYXR0cmlidXRlcyBmb3Igcm9vdCB2bm9k
ZSBvbmNlLgorCSAqLworCWlmICgobm1wLT5ubV9zdGF0ZSAmIE5GU1NUQV9HT1RGU0lORk8pID09
IDAgJiYKKwkgICAgKG5tcC0+bm1fZmxhZyAmIE5GU01OVF9ORlNWMykpIHsKKwkJbmZzX2ZzaW5m
byhubXAsIHZwLCBjdXJ0aHJlYWQtPnRkX3VjcmVkLCBjdXJ0aHJlYWQpOworCX0KIAlpZiAodnAt
PnZfdHlwZSA9PSBWTk9OKQogCSAgICB2cC0+dl90eXBlID0gVkRJUjsKIAl2cC0+dl92ZmxhZyB8
PSBWVl9ST09UOwo=

--Multipart=_Tue__27_Jan_2004_20_17_58_+0100_=Q2bfUEBOTrwOu39--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040127201758.13be4f08.bg>