FreeBSD src
Go to file
Bill Paul f9dde4e78c Submitted by: Sebastian Strollow
Obtained from: Casper H. Dik (by vay of Usenet)

Small patch to help improve NIS rebinding times (among other things):


>From: casper@fwi.uva.nl (Casper H.S. Dik)
>Newsgroups: comp.sys.sun.misc,comp.sys.sun.admin
>Subject: FIX for slow rebinding of NIS.
>Summary: a small change in libc makes life with NIS a lot easier.
>Message-ID: <1992Jan17.173905.11727@fwi.uva.nl>
>Date: 17 Jan 92 17:39:05 GMT
>Sender: news@fwi.uva.nl
>Organization: FWI, University of Amsterdam
>Lines: 138
>Nntp-Posting-Host: halo.fwi.uva.nl

Have you been plagued by long waits when your NIS server is rebooted?
READ ON!

Sun has a patch, but the README says:

********************* WARNING ******************************

  This is a new version of ypbind that never uses the NIS
  binding file to cache the servers binding. This will have
  the effect of fixing the current symptom. However, it might
  degrade the overall performance of the system when the
  server is available. This is most likely to happen on an
  overloaded server, which will cause the network to produce
  a broadcast storm.

*************************************************************

Therefor, I have produced another fix.

o What goes wrong.

When the NIS server is rebooted, ypserv will obtain different ports
to listen for RPC requests. All clients will continue to use the old
binding they obtained earlier. The NIS server will send ICMP dst unreachable
messages for the RPC requests that arrive at the old port. These ICMPs
are dropped on the floor and the client code will continue sending the
requests until the timer has expired. The small fix at the end of this
message will pick up these ICMP messages and deliver them to the RPC layer.

o Before and after.

I've tested this on some machines and this is the result:

	(kill and restart ypserv on the server)

original% time ypmatch user passwd
user:....
0.040u 0.090s 2:35.64 0.0% 0+126k 0+0io 0pf+0w (155 seconds elapsed time)

fixedhost% time ypmatch user passwd
user:....
0.050u 0.050s 0:10.20 0.9% 0+136k 0+0io 0pf+0w (10 seconds elapsed time)

Rebinding is almost instantaneous.

o Other benefits.
	RPC calls that use UDP as transport will no longer time out but
	will abort much sooner. (E.g., the remote host is unreachable or
	111/udp is filtered by an intermediate router)
1995-04-02 20:05:20 +00:00
bin Add braces to fix wrong if-if-else-if nesting that broke `cp -pR' for 1995-04-02 00:49:16 +00:00
eBones Security fixes. 1995-02-17 03:57:00 +00:00
etc Add missing ';' 1995-04-01 12:55:33 +00:00
games If possible, pick up the caesar program inside in the compilation tree. 1995-03-26 18:53:45 +00:00
gnu Add back some stuff to yppush.c that I was a little over-zealous in 1995-04-02 20:01:50 +00:00
include Add a necessary include file for the catgets* routines. 1995-03-30 12:47:56 +00:00
lib Submitted by: Sebastian Strollow 1995-04-02 20:05:20 +00:00
libexec Fix truncating hostname using MAXHOSTNAMELEN 1995-03-24 05:15:09 +00:00
lkm Update to new screen update method. 1995-03-30 15:10:20 +00:00
release Remove kernel compilation directories after use. 1995-03-28 19:28:32 +00:00
sbin Submitted by: Philippe Charnier <charnier@lirmm.fr>, added to by bde 1995-04-02 16:52:14 +00:00
secure Mark Murray's authdes.c for xntpd 1995-03-23 19:09:24 +00:00
share By default, KEYWORDS is a copy of CATEGORIES. 1995-04-01 10:01:49 +00:00
sys Back out changes related to locked bits until more elegant 1995-04-02 19:28:58 +00:00
tools/regression/usr.bin/sed BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00
usr.bin Include <stdlib.h> so that malloc() is declared. 1995-04-02 19:01:07 +00:00
usr.sbin Fix long standing bogosity in ypbind: if /var/yp/binding doesn't exist, 1995-04-02 03:10:55 +00:00
COPYRIGHT This is the official 4.4 Lite copyright. 1994-09-11 07:53:28 +00:00
CVS-INFO Documented the new CVS template. This really isn't the right place for it, 1994-07-24 22:27:27 +00:00
HW.TROUBLE Added the first three entries. Changed the intro a bit. 1994-08-28 20:48:37 +00:00
Makefile Fixed most: target gnu/usr.sbin was install not all 1995-03-28 18:14:17 +00:00
README Small tweak - I said that ESC-ESC aborted the install. It actually only 1994-11-10 04:28:15 +00:00
TODO Include a file system debugger fsdb(8). 1995-03-17 19:28:59 +00:00

   -----------------------------------------
       FreeBSD 2.0  ---  ALPHA Release                 ,        ,
   -----------------------------------------          /(        )`
                                                      \ \___   / |
Welcome to the ALPHA release of FreeBSD 2.0 - the     /- _  `-/  '
first public snapshot of our new 4.4BSD Lite based   (/\/ \ \   /\
operating system environment.  This install proce-   / /   | `    \
dure is also at the ALPHA stage, and contains only   O O   ) /    |
the minimum functionality required by an             `-^--'`<     '
*EXPERIENCED* person to install the system.         (_.)  _  )   /
It is our hope, of course, that the feedback         `.___/`    /
provided from this snapshot will                       `-----' /
greatly assist us in making the release   <----.     __ / __   \
of 2.0 much more user friendly.  Your     <----|====O)))==) \) /====
comments and criticisms are very          <----'    `--' `.__,' \
valuable to us, so please don't hesitate               |        |
in contacting us!  Full details on where and            \       /	/\
how to provide feedback are given below.           ______( (_  / \______/
                                                 ,'  ,-----'   |
This install procedure is ALPHA code, and        `--{__________)
may very possibly *DESTROY* the contents of your
ENTIRE DISK!  Please do not proceed with this installation
unless you've adequately backed up your data first!

If any errors occur during this installation, you can see them
by toggling over to the alternate screen - type ALT-F2 to switch
over, ALT-F1 to switch back to the install screen.  The debugging
output on the second screen may be very valuable to us in understanding
your bug report, so please be sure to take note of it when reporting
any failures in the installation!  Thanks!

Menus and scrolling output windows may be traversed with the arrow
and Page Up/Page Down keys.  To suspend the installation at any point,
hit ESC twice.  Hitting TAB will move the focus to different controls.
If you've ever dealt with a DOS installation, you'll know how to deal
with this.

For a more complete description of what's new in this release, please
see the release notes.

For more documentation on this system, it is recommended that you purchase
the 4.4BSD Document Set from O'Reilly Associates and the USENIX Association.
ISBN 1-56592-082-1  We have no connection with O'Reilly, we're just
satisfied customers!

Have fun, and please let us know of any problems you encounter with
this release!

Comments should be sent to:

	hackers@FreeBSD.org

Bug reports should be sent using the `send-pr' utility, if you
were able to get the system installed, otherwise to:

	bugs@FreeBSD.org

And general questions to:

	questions@FreeBSD.org


Please have patience if your questions are not answered right away -
this is an especially busy time for us, and our volunteer resources
are often strained to the limit (if not somewhat past!).

Thanks!

				The FreeBSD Project