Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NFS speedup tip from Roman Drahtmueller



>From draht@rzlin1.ruf.uni-freiburg.de Mon Sep 07 02:38:59 1998
Return-Path: <draht@rzlin1.ruf.uni-freiburg.de>
Delivered-To: ken@nlc.net.au
Received: (qmail 9697 invoked by alias); 7 Sep 1998 12:38:59 +1000
Received: (qmail 9691 invoked from network); 7 Sep 1998 12:38:57 +1000
Received: from rzlin1.ruf.uni-freiburg.de (draht@132.230.4.151)
  by nhj.nlc.net.au with SMTP; 7 Sep 1998 12:38:57 +1000
Received: (from draht@localhost)
	by rzlin1.ruf.uni-freiburg.de (8.8.5/8.8.5) id EAA02197;
	Mon, 7 Sep 1998 04:38:36 +0200
Date: Mon, 7 Sep 1998 04:38:33 +0200 (MEST)
From: Roman Drahtmueller <draht@uni-freiburg.de>
Reply-To: draht@uni-freiburg.de
To: Ken Yap <ken@nlc.net.au>
Subject: Re: Nice Job. 
In-Reply-To: <E0zFpni-0006oD-00@mailgateway1.uni-freiburg.de>
Message-ID: <Pine.LNX.3.96.980907041930.32677b-200000@rzlin1.ruf.uni-freiburg.de>
X-Organization: University of Freiburg
X-Remarks: Rechenzentrum der Uni Freiburg
X-Bogomips: 66.56 BogoMIPS
X-Beware: Having return-path problems
X-Bullshit: The header is genuine....WTF did you expect?
X-Cry: help me I'm a prisioner in a coke factory - send beer
X-Ftp-Home: ftp://ftp.warez.org/
X-Mailer: Mozarella beta (Alles Kaese) V211.2.142
X-Question: Are you bored? Just interested cause you read mail headers...
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-427518204-944616098-905135913=:32677"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---427518204-944616098-905135913=:32677
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE

Hey, btw, I have something that might be of interest for you.

Some trick that speeds up nfs by a factor of 2 (it reaches 10Base-T limits
here).

Grab the latest unfsd-package from
linux.mathematik.tu-darmstadt.de:/pub/linux/people/okir
and run rpc.nfsd with something like this:

/usr/sbin/rpc.nfsd 2

This will make it fork a second daemon so that both daemons will answer
requests. By testing it turned out that more than two are no good any
more. Now comes the clue: Use the little program in the attachment
(resched) to change the scheduling policy of the daemons by doing this:=20

for i in `ps fauxw | grep rpc.nfsd | grep -v grep | awk '{print $2}'`; do
     /usr/local/bin/resched -r $i >/dev/null 2>&1 && echo -n $i" "
done

and then see how throughput has changed.

Be careful with resched because only interrupts will interrupt a process
in the runqueue that is running under SCHED_RR or SCHED_FIFO policy.
You know what I mean, the box locks up if something loops.
I usually use it to have a realtime scheduling policy shell handy if one
of my lusers hit the wrong button and the machine overloads.

Performance gets close to a Sparc sun under Solaris doing nfs-V2(UDP).

Pass the trick on to the others, if you like, and tell them greetings.

Roman.
 _                                                                   _
| Roman Drahtm=FCller              "The whole world is about three      |
  CC University of Freiburg       drinks behind."
| email: draht@uni-freiburg.de         (Humphrey Bogart)              |
 -                                                                   -

---427518204-944616098-905135913=:32677
Content-Type: TEXT/plain; name="resched.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.96.980907043833.32677c@rzlin1.ruf.uni-freiburg.de>
Content-Description: resched.c

LyoNCiAqICByZXNjaGVkIChSb21hbiBEcmFodG11ZWxsZXIgPGRyYWh0QHVu
aS1mcmVpYnVyZy5kZT4NCiAqDQogKiAgZGVsaXZlcnMgYSBwcm9jZXNzIHRv
IGFub3RoZXIgc2NoZWR1bGluZyBjbGFzcyBwb2xpY3kuDQogKg0KICogIENB
VVRJT046IEhhbmRsZSB3aXRoIGNhcmUgYW5kIHJlYWQgdGhlIG1hbnBhZ2Ug
YmVmb3JlIHlvdSB1c2UgaXQuDQogKiAgICAgICAgICAgQ1BVLWludGVzaXZl
IHByb2Nlc3NlcyB3aWxsIG5vdCByZXR1cm4gYmVmb3JlIHRoZXk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gICAgIH0NCiAg
ICBpZiAoYXJnYy1vcHRpbmQgPT0gMSkNCiAgICAgICAgcGlkID0gYXRvaShh
cmd2W29wdGluZF0pOw0KICAgIGVsc2UgaWYgKGFyZ2Mtb3B0aW5kICE9IDAp
IHsNCiAgICAgICAgICAgIHVzYWdlKCk7DQogICAgICAgICAgICBleGl0KDEp
Ow0KICAgICAgICB9DQogICAgaWYgKHBvbGljeSA9PSBTQ0hFRF9PVEhFUiAp
IHByaW9yaXR5LT5zY2hlZF9wcmlvcml0eSA9IDA7DQogICAgcHJpbnRmKCJj
YWxsaW5nIHNjaGVkX3NldHNjaGVkdWxlcjogcGlkOiAlaSBwcmlvcml0eTog
JWkgcG9saWN5ID0gJWkgXG4iDQogICAgICAgICAgICAgICAgLHBpZCxwcmlv
cml0eS0+c2NoZWRfcHJpb3JpdHkscG9saWN5KTsNCiAgICBpZiAoMCA+IHNj
aGVkX3NldHNjaGVkdWxlcihwaWQscG9saWN5LHByaW9yaXR5KSkgew0KICAg
ICAgICBwZXJyb3IoInNjaGVkX3NldHNjaGVkdWxlciIpOw0KICAgICAgICB1
c2FnZSgpOw0KICAgICAgICBleGl0KC0xKTsNCiAgICB9DQogICAgZXhpdCAo
MCk7DQp9DQo=
---427518204-944616098-905135913=:32677--



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.