From owner-freebsd-stable@FreeBSD.ORG Sat Nov 22 19:48:33 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F43116A4CE for ; Sat, 22 Nov 2003 19:48:33 -0800 (PST) Received: from aphrodite.aquezada.com (H130.C231.tor.velocet.net [216.138.231.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7E4343FE5 for ; Sat, 22 Nov 2003 19:48:31 -0800 (PST) (envelope-from lists+freebsd@aquezada.com) Received: from localhost (localhost [127.0.0.1]) by aphrodite.aquezada.com (Postfix) with ESMTP id F178A982; Sat, 22 Nov 2003 22:46:00 -0500 (EST) Received: from aphrodite.aquezada.com ([127.0.0.1])port 10024) with LMTP id 68713-03; Sat, 22 Nov 2003 22:45:50 -0500 (EST) Received: from jupiter.acf.aquezada.com (jupiter.acf.aquezada.com [192.168.5.5]) by aphrodite.aquezada.com (Postfix) with ESMTP id 65CA45FD; Sat, 22 Nov 2003 22:45:50 -0500 (EST) Received: by jupiter.acf.aquezada.com (Postfix, from userid 1001) id 6F58452CF3; Sat, 22 Nov 2003 22:48:17 -0500 (EST) From: "Julian C. Dunn" To: freebsd-stable@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Aquezada Productions Message-Id: <1069559296.2759.127.camel@jupiter.acf.aquezada.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 22 Nov 2003 22:48:17 -0500 X-Virus-Scanned: by amavisd-new at aquezada.com Subject: NIS performance bad - any ideas? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Nov 2003 03:48:33 -0000 I need some assistance with resolving an issue with bad NIS performance. I have three systems set up as follows: * NIS master running NetBSD 1.6.1 * NIS slave running NetBSD 1.6.1 * NIS client running FreeBSD 4.9-STABLE as of Nov. 17 Each of these machines is dual-homed talking to both a public network and internal LAN. The public network interfaces are firewalled against NIS requests and I have verified that both the client and slave are properly YP bound to the internal interfaces. The FreeBSD NIS client has very bad performance when doing NIS lookups for authentication, e.g. POP e-mail, logins, sudo, even "finger". After doing a "truss" on a finger command, I can sort of see what is going on, but I cannot determine why. Here is what the (ellided) truss output looks like at the problem area (I've replaced the real NIS domain with "the_nis_domain" in the first line): open("/var/yp/binding/the_nis_domain.2",0x0,05002420230) = 5 (0x5) flock(0x5,0x6) ERR#35 'Resource temporarily unavailable' readv(0x5,0xbfbfecc4,0x2) = 14 (0xe) close(5) = 0 (0x0) break(0x8065000) = 0 (0x0) gettimeofday(0xbfbfec08,0x0) = 0 (0x0) getpid() = 33258 (0x81ea) socket(0x2,0x2,0x11) = 5 (0x5) getsockname(0x5,{ AF_INET 0.0.0.0:0 },0xbfbfeb1c) = 0 (0x0) getsockopt(0x5,0x0,0x13,0xbfbfeb14,0xbfbfeb18) = 0 (0x0) setsockopt(0x5,0x0,0x13,0xbfbfeb10,0x4) = 0 (0x0) bind(0x5,{ AF_INET 0.0.0.0:0 },16) ERR#1 'Operation not permitted' setsockopt(0x5,0x0,0x13,0xbfbfeb14,0x4) = 0 (0x0) ioctl(5,FIONBIO,0xbfbfec04) = 0 (0x0) fcntl(0x5,0x2,0x1) = 0 (0x0) bind(0x5,{ sa_len = 0, sa_family = 0, sa_data = { } },16) = 0 (0x0) getsockname(0x5,{ AF_INET 0.0.0.0:2313 },0xbfbfecb4) = 0 (0x0) sendto(0x5,0x8064968,0x48,0x0,0x8064008,0x10) = 72 (0x48) gettimeofday(0xbfbfeff0,0x0) = 0 (0x0) select(0x6,0xbfbff060,0x0,0x0,0xbfbfefe8) = 1 (0x1) recvfrom(0x5,0x8064068,0x900,0x0,0xbfbff050,0xbfbfefcc) = 104 (0x68) getpid() = 33258 (0x81ea) The last few lines starting with "getsockname" repeat about 1,340 times before 'finger' returns any useful information. Obviously this is the source of the problem, as on the NIS slave, this does not occur - 'finger' returns after a couple such calls. Does anyone have any ideas about where I should start looking to try and resolve this problem? Obviously NIS is *eventually* deciding that it's found the information it's looking for, and returns, but the >1000 extra network reads are inexplicable to me. - Julian -- [ Julian C. Dunn * ] [ WWW: www.aquezada.com/staff/julian/ * www.dreaming.org/~julian/ ] [ PGP: 0xFDC205B9 - 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ] [ "sometimes you win, sometimes you lose / and most times ] [ you choose between the two" - carole king, "sweet seasons" ]