This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Testers needed: New passwd/group handling in Cygwin
- From: Warren Young <warren at etr-usa dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 05 Mar 2014 08:34:37 -0700
- Subject: Re: Testers needed: New passwd/group handling in Cygwin
- Authentication-results: sourceware.org; auth=none
- References: <87y50vc910 dot fsf at Rainer dot invalid> <20140228201047 dot GC2381 at calimero dot vinschen dot de> <CAKf2h5TjyeMxuw=XkqoGMC8A_f+LpSzcx5nof5ViUBQ-0sYXFg at mail dot gmail dot com> <20140228210804 dot GE2381 at calimero dot vinschen dot de> <CAKf2h5QbafQq25jndf8RdDGWsp_MMfziBep2Pe1H7rA+OmOCdA at mail dot gmail dot com> <20140303092114 dot GA26619 at calimero dot vinschen dot de> <1686957830 dot 20140303195207 at yandex dot ru> <53152031 dot 3000208 at etr-usa dot com> <397967999 dot 20140304053603 at yandex dot ru> <53155F96 dot 3060400 at etr-usa dot com> <20140304080727 dot GC7236 at calimero dot vinschen dot de>
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