Subject: Re: install/22044: missing domainname in rc.conf
To: Noriyuki Soda <soda@sra.co.jp>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 07/04/2003 11:54:50
[ On Friday, July 4, 2003 at 21:04:08 (+0900), Noriyuki Soda wrote: ]
> Subject: Re: install/22044: missing domainname in rc.conf
>
> Some (old?) implementations of NIS open a TCP socket to access ypbind
> at every call of name-service-related functions (e.g. getpwent(),
> gethostbyname()), even if the access failed every time due to absence
> of ypbind and YP servers. This takes significant cost especially on
> heavy loaded servers.

As far as I can remember that has not been true for a very long time,
e.g. since before SunOS-4.1.1 and whatever versions of other systems
were current at the time (AIX-3.0?, HP/UX 10?)

(it would also imply that such old systems had some other way to find a
valid address of the server for the specified YP domain -- i.e. other
than using the equivalent of our /var/yp/binding/`domainname`.*)

> Our NIS library doesn't take such significant cost, because our libc
> checks existence of /var/run/ypbind.lock at first.

IFF 'nis' has been left in /etc/nsswitch.conf.

IMNSHO I've always thought /etc/nsswitch.conf should be edited by
sysinst as well.

> But I still don't
> think it's good thing to set `domainname' by default installation,
> because it may confuse users about the meaning of the `domainname',

I think this only matters to people (i.e. dinosaurs ;-) who still think
the NIS should rule the world.

> and it has slight, but certain performance penalty.

Not very much worse than having to read and parse /etc/nsswitch.conf in
the first place.

I've got a "todo" item on my list to make sure the default nsdispatch
configuration doesn't include NIS (or HESOID) on my own systems so that
I can simply remove /etc/nsswitch.conf and save even a wee bit more
(i.e. pay only the price of one stat() call).

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>