From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14904 invoked by alias); 5 Mar 2014 15:34:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 14893 invoked by uid 89); 5 Mar 2014 15:34:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: etr-usa.com Received: from etr-usa.com (HELO etr-usa.com) (130.94.180.135) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Mar 2014 15:34:42 +0000 Received: (qmail 55189 invoked by uid 13447); 5 Mar 2014 15:34:37 -0000 Received: from unknown (HELO [172.20.0.42]) ([68.35.121.157]) (envelope-sender ) by 130.94.180.135 (qmail-ldap-1.03) with SMTP for ; 5 Mar 2014 15:34:37 -0000 Message-ID: <5317440D.4060000@etr-usa.com> Date: Wed, 05 Mar 2014 16:47:00 -0000 From: Warren Young User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Testers needed: New passwd/group handling in Cygwin References: <87y50vc910.fsf@Rainer.invalid> <20140228201047.GC2381@calimero.vinschen.de> <20140228210804.GE2381@calimero.vinschen.de> <20140303092114.GA26619@calimero.vinschen.de> <1686957830.20140303195207@yandex.ru> <53152031.3000208@etr-usa.com> <397967999.20140304053603@yandex.ru> <53155F96.3060400@etr-usa.com> <20140304080727.GC7236@calimero.vinschen.de> In-Reply-To: <20140304080727.GC7236@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00079.txt.bz2 On 3/4/2014 01:07, Corinna Vinschen wrote: > On Mar 3 22:07, Warren Young wrote: >> >> You have to measure it to find out. > > I was inclined to go with Andrey's suggestion for simplicity. What's > yours? Science! Survey actual lookup times, and make a statistical determination from that. e.g. +3 sigma[1] above the normal to capture > 99% of the Cygwin user base, or +6 sigma to reduce outliers to the order of 2 ppm. To collect the data, instrument the DLL and report anonymous statistics back to cygwin.com if the user opts in via setup.exe. Rather than report back continually, just keep a model of the lookup time[2], and report the current lookup time average on each setup.exe run, such as in the HTTP request for the mirror list: GET /mirrors.lst?adluavg=123 That is, setup.exe is reporting that the typical AD lookup time at this site is currently 123 ms. Note that you don't have to write a CGI program to accomplish this. Apache will continue to serve static mirror.lst files for you with the GET parameter.[3] It will dutifully log each query to access_log, and you can dig the reported lookup time values out of the file when you want to compile your statistics. When calculating statistics, use only the latest value for each reporting IP, so that sites that update Cygwin more often don't skew the results. The default timeout should be baked into the DLL, but overridable in nsswitch.conf, with ms resolution. The default shouldn't be in the shipping nsswitch.conf file, because you want DLL updates to be able to provide a new default timeout if your initial guess turns out to be inappropriate. You want ms resolution, since my test above shows at least one case where the normal lookup time is on the order of 1 ms. If cygwin1.dll defaults to 1 s, I'd want to change my local timeout to 10 or 100 ms. [1] https://en.wikipedia.org/wiki/Standard_deviation [2] A decaying average technique should work. Save the last 10 or so lookup times to the registry on DLL shutdown. If there isn't that much lookup data on hand, start with repeats of the last known lookup time, or the default value. [3] Try it: http://cygwin.com/mirrors.lst?foo=bar -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple