X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Zg1DK1KZwEjDTn8wuo+I3vPzT7rSQ5XiXwGnzIoIfIQ3035txbgjW hRIgRwlsEM+jbFKB46tIqZvMOWcoKdm0i2gy1jypkpIqGb9Zj8KEGpWyGXbgXM/e kgEuf8aKXaYUm3X93tFfpwrTaso8AOQy/x7LFB7DeKfNaoq5Uw9/RE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=xpipj5mLQcUXLCGm9ryOEhdgEjw=; b=NPRvV1AP5VZpJSIJ6bLRMAOHJG2a eY+2f9qEdWK0NKCLe7eJjklGy552Zsb2GgKMUgB34A6NCSr034nDUnMUUNlYXOAG kfhLcJMiYvKF9H2/r5gYdmJrdfvtbwcHy5NBRs9y7OW0OozjlOzxEhS08stY3GEu U+m/2HwB7aVDDG8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Date: Tue, 17 Feb 2015 11:44:30 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Very slow Cygwin startup on Windows 7 Message-ID: <20150217104430.GU8493@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <3FEEC3A37A0B0A48AA326075128C32EE4DC9F0E8 AT xmb-rcd-x01 DOT cisco DOT com> <87mw4nugdx DOT fsf AT Rainer DOT invalid> <3FEEC3A37A0B0A48AA326075128C32EE4DC9F137 AT xmb-rcd-x01 DOT cisco DOT com> <869208266 DOT 20150210030528 AT yandex DOT ru> <3FEEC3A37A0B0A48AA326075128C32EE4EE263B8 AT xmb-rcd-x01 DOT cisco DOT com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4ECF1u7dKBoUGhe3" Content-Disposition: inline In-Reply-To: <3FEEC3A37A0B0A48AA326075128C32EE4EE263B8@xmb-rcd-x01.cisco.com> User-Agent: Mutt/1.5.23 (2014-03-12) --4ECF1u7dKBoUGhe3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 17 10:23, Dennis Hagarty (dehagart) wrote: > >>>> Well, nsswitch.conf was a good suggestion - I'd left it as the defau= lt > >>>> (which is empty), but I added a 'files' entry and it came good again. > >>>> Changing the passwd and group entries to 'files db' makes it very sl= ow > >>>> again. > >>> > >>>Limit the number of entries that Cygwin fetches from the DC. Also, > >>>starting a cygserver would help. > >>> > >>>> Not sure what changed here, I have a very good connection to my DC, > >>>> but obviously something wrong here now. > >>> > >>>You may be surprised at how slow a DC really can be when it sees some > >>>load, regardless of connection speed when you try to fetch several > >>>thousand entries. If I were to try a 'mkpasswd -d' on our DC I'd > >>>usually have to wait about an hour with very little network traffic to > >>>show (the resulting file would be about 4MiB). > >>> > >>> > >>>Regards, > >>>Achim. >=20 > >> Thanks Achim - I've recreated my passwd and group files to be sure. > >> I checked some domain lookups and they take a second or two for each e= ntry - quite slow. >=20 > >> So, I'll leave nsswitch where it is for now and I've started cygserver. >=20 > >If you are accepting suggestions, and up for some experimentation, try t= his: >=20 > ># getent passwd $(id -u) > /etc/passwd > ># getent group $(id -G) > /etc/group > ># echo -e "#\npasswd: files db\ngroup: files db\n" > /etc/nsswitch.conf > > > >and start bash without cygserver running. Just for test. > >The idea is to have "your" groups in files so that in simple case of (ju= st > >startup" Cygwin don't have to talk to DC all too much. If at all. >=20 > >You'd still need to run cygserver to benefit from long-time caching, tho= ugh. >=20 > Apologies for my slow response - urgent RFI's. >=20 > Ok, so I reverted nsswitch to the 'files db' setting. > I stopped cygserver > I ran your commands to recreate /etc/passwd and /etc/group Ideally passwd and group are set to "db" only for this, just to be sure. > (they now contain 1 line and 3 lines respectively - before it had > about 10 & 21 lines in each) Hang on. getent group $(id -G) only returns three lines? That's a bit weird. How does the output of `id' look like?=20 > To create a bash terminal window (from cmd) takes about 5-6 minutes. > cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" &= echo !TIME!" > 11:01:20.27 > 11:06:59.78 =3D 5:39.51 With a running cygserver, how long did it take the second time? Can you please check again with the cygwin test release 1.7.35-0.2? Two tests: - Set passwd and group to "db" only - Set passwd to "files db" and group to "db" - Both set to "files db" I think I'm going to create another test version which adds debug output to get timings for the LookupAccountName and LDAP calls. The long time this takes in some environments is really puzzeling me. Would you be willing to run such a test if I provide you with a debug augmented Cygwin DLL? Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --4ECF1u7dKBoUGhe3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU4xuOAAoJEPU2Bp2uRE+goWgP/jMM6SFGDQBSyXLN36VtBvL3 Gs/SQDy5a7Dgd7FEuRm+x4JCSRJxjp3lr48icxzXYxNWyRXTRgy40Xbq93Ivwdx/ MLJ0VQEEcm/cuEZR3ZaZ2ihYTUhhEvqeDuhtGkYGwPGxrDDoX/VJAelQW7AJBgxL +CdV7jhFneMjQZsStcUlk4p3NwjIMhq/AGWNyZRaowSYdcje1N6orueIIyksX1dz j1qXJ6SOxY40hg3YZBHKe8IVj0HxC2O/XB3Pvyqa5Hk5KeOzrjiUowMy6E9KHZs4 F7FKHla55aIm+WpFO2UPRKG2Irhff3n4bF0IP7Co7zegvFD91izwHXxJ/ww3c7hK nZWodJw18o6CCT0Ch22q2LpSTdOH5flKXpFdcOjim6FjAqscwJNTsmKJZ2WnjMZb 97Uh5hZVkaiIjvBRHfpV3zu19HwdW+bv8svpYIYPALi016G0EDKuWPszMJkJwz0P t31dh8tSLI8HXYvKNNWl9rie2iZ4GYKQn4DJdYWYxNDb9YPZ+8L9UUpxZJjHvf8B sJT7nVVikAAUX6OfPpq6dUNGilBBnC0Jh/1f2yRxeWiAAkmu88kftzmZGnPoeAoH uDW4Bw7Z/bEWGwruny9USrGKVTHg0odk9SR7frEVeIKd2yaZcyrga8RKugZDCtFj LI2lGcu6k/9mXy75g41Z =WNad -----END PGP SIGNATURE----- --4ECF1u7dKBoUGhe3--