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

Greetings, Dennis Hagarty (dehagart)!

>>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.

No need for apology :) And thank you for chiming back in. Your help is much

> 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)

That's surprisingly small amount of groups.
Even on local system, I have 11(13 if elevated) groups attached to my userid.
Perhaps, the execution of the id -G has been influenced by your current (at
that moment) /etc/group file.

> 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

Could you please do me a favor and repeat the test with a little deviation of
my previous suggestion?

1. Remove /etc/{nsswitch.conf,passwd,group} files. (Rename, move away - by
your choice.)
2. Stop cygserver, if it is running, and any other Cygwin-related programs.
3. Start the mintty (elevated, if need) with write access to /etc. Supposedly,
this will be slow.
4. Make sure id -G lists all the groups you're member of.
The `id -znG | tr "\0" "\n"` would probably be more visible.
5. Repeat the steps from previous suggestion.
    getent passwd $(id -u) > /etc/passwd
    getent group $(id -G) > /etc/group
    printf "%s\n" "passwd: files db" "group: files db" > /etc/nsswitch.conf
6. Close and restart mintty

Andrey Repin ( 17.02.2015, <13:35>

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

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