This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Very slow Cygwin startup on Windows 7

On Feb 17 10:23, Dennis Hagarty (dehagart) wrote:
> >>>> Well, nsswitch.conf was a good suggestion - I'd left it as the default
> >>>> (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 slow
> >>>> 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.
> >> 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 entry - quite slow.
> >> So, I'll leave nsswitch where it is for now and I've started cygserver.
> >If you are accepting suggestions, and up for some experimentation, try this:
> ># 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 (just
> >startup" Cygwin don't have to talk to DC all too much. If at all.
> >You'd still need to run cygserver to benefit from long-time caching, though.
> Apologies for my slow response - urgent RFI's.
> 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? 

> 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 = 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?


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpfFZt67Sjra.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]