This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Very slow Cygwin startup on Windows 7
- From: "Dennis Hagarty (dehagart)" <dehagart at cisco dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Tue, 17 Feb 2015 10:23:36 +0000
- Subject: RE: Very slow Cygwin startup on Windows 7
- Authentication-results: sourceware.org; auth=none
- 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>
>>>> 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
(they now contain 1 line and 3 lines respectively - before it had about 10 & 21 lines in each)
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
Starting cygserver:
11:08:31.55
11:08:31.62 = 0:00.07
Stopping it again:
11:09:19.02
11:15:04.45 = 05:45.43
With the 'db' entry excluded as a control:
11:15:56.80
11:15:56.90 = 00:00.10
I reverted back to use files+db and my larger passwd and group files, turned on cygserver:
11:19:34.31
11:19:34.38 = 00:00.07
Regards
Dennis
--
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