From owner-freebsd-stable@FreeBSD.ORG Wed Jan 23 06:04:57 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D12BB16A418; Wed, 23 Jan 2008 06:04:57 +0000 (UTC) (envelope-from mcdouga9@egr.msu.edu) Received: from mx.egr.msu.edu (surfnturf.egr.msu.edu [35.9.37.164]) by mx1.freebsd.org (Postfix) with ESMTP id A188313C4D5; Wed, 23 Jan 2008 06:04:57 +0000 (UTC) (envelope-from mcdouga9@egr.msu.edu) Received: from localhost (localhost.egr.msu.edu [127.0.0.1]) by mx.egr.msu.edu (Postfix) with ESMTP id C58B92EB8E2; Wed, 23 Jan 2008 00:46:44 -0500 (EST) X-Virus-Scanned: amavisd-new at egr.msu.edu Received: from mx.egr.msu.edu ([127.0.0.1]) by localhost (surfnturf.egr.msu.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Ulvn0bAy114; Wed, 23 Jan 2008 00:46:44 -0500 (EST) Received: from localhost (daemon.egr.msu.edu [35.9.44.65]) by mx.egr.msu.edu (Postfix) with ESMTP id 9C02B2EB8CE; Wed, 23 Jan 2008 00:46:44 -0500 (EST) Received: by localhost (Postfix, from userid 21281) id 987A333C3D; Wed, 23 Jan 2008 00:46:44 -0500 (EST) Date: Wed, 23 Jan 2008 00:46:44 -0500 From: Adam McDougall To: Michael Bushkov Message-ID: <20080123054644.GV18746@egr.msu.edu> References: <20080117185547.GA85161@sepulca.yandex.ru> <242ACF9B-7B89-49F2-8F20-F2D51104574B@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <242ACF9B-7B89-49F2-8F20-F2D51104574B@freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: stable@freebsd.org Subject: Re: nscd again (nis client cache) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2008 06:04:57 -0000 I wanted to say Thanks!!! for this example, because before this point I was under the impression that nscd/cached was of no use for NIS clients, only LDAP or maybe other directory systems that I don't use. I tried "cache compat" as below for passwd and group and it works! Our NIS entries at work are big enough that without the cache, top takes 7+ seconds to open, ssh login takes a few seconds, and samba logins were concerningly slow. I did not try samba connections, but the other methods are much faster now on the second run. Wanted to post this for the archive too. On Sat, Jan 19, 2008 at 02:17:11PM +0300, Michael Bushkov wrote: Hi Denis, Several things: 1. You definitely can't use cache for *_compat sources. I mean lines like "group_compat: cache nis" aren't supported. 2. Cache should work ok with the configuration you've mentioned in your first example, i.e.: "group: cache compat". Just checking - why do you think that cache isn't working? The correct way to determine it is to perform the same query twice. During the first pass (when query is not cached), the request will be processed by NIS module and you'll have all the NIS-related stuff in the logs. On the second pass the request should be handled by scd module - and you shouldn't see any activity in NIS logs. It would be great to see the debug log (with nscd log turned on) separately - for the first and the second pass. It would help to find the error in nscd, if there is one. With best regards, Michael Bushkov On Jan 17, 2008, at 9:55 PM, Denis Barov wrote: >> Hello! >> >> I found some strange behaviour of NIS/nscd when NIS in compat mode. In >> /etc/nsswitch.conf I have: >> >> netgroup: cache compat >> passwd: cache compat >> group: cache compat