public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Very slow Cygwin startup on Windows 7
@ 2015-02-09 17:36 Dennis Hagarty (dehagart)
  2015-02-09 17:47 ` Achim Gratz
  0 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-09 17:36 UTC (permalink / raw)
  To: cygwin

>> Hi,
>> 
>> I've been a long-time Cygwin user and become quite dependent on it.
>>
>> So, I'm in a bit of a pickle since I did an update from a mirror site today, and now my Cygwin window startup takes about 3-4 MINUTES (it was < 2 seconds before).
>>
>> I'd been using it and all was well, and then the update seemed to 'do' something which results in this behaviour (there were quite a few updates).
>>
>> I have been through the archives and tried what I could find - It's certainly nothing to do with bash completion.
>>
>> Login from a remote machine to my Cygwin-enabled device is normal.
>>
>> Also, I can start multiple minitty sessions from one Cygwin window and it's almost instantaneous.
>>
>> But clicking on the desktop icons requires a multi-minute wait.
>>
>> Any ideas where to start?
>> The daemons/services seem to be fine. 
>> There are no entries in the event log.
>> There are no resources being consumed.
>> I've taken out my .rc and profiles files and no difference.
>>
>> I'm happy to go digging, but I need a pointer of where to dig.
>>
>> Here is the output of my cygcheck:
>>
>> <snip>
>>
> Does changing /etc/nsswitch.conf help?  If the file doesn't exist,
> what if you create it and then set the passwd and grouip entries
> to
>
>  passwd: files
>   group: files
>
> Then start another mintty via the desktop shortcut and see if it
> starts faster.
>
> If that's the problem, you seem to have a slow or unusable connection to
> your DC.  Unfortunately you stripped almost all usable information from
> your cygcheck output, like environment variables, etc.
>
> Corinna

Sorry, I only meant to edit out the UID values from the DC.
Here is the full list of cygcheck --sysinfo --verbose: https://dl.dropboxusercontent.com/u/33069639/cygcheck.txt 

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.

Not sure what changed here, I have a very good connection to my DC, but obviously something wrong here now.

Thanks
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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-09 17:36 Very slow Cygwin startup on Windows 7 Dennis Hagarty (dehagart)
@ 2015-02-09 17:47 ` Achim Gratz
  2015-02-09 18:18   ` Dennis Hagarty (dehagart)
  0 siblings, 1 reply; 65+ messages in thread
From: Achim Gratz @ 2015-02-09 17:47 UTC (permalink / raw)
  To: cygwin

Dennis Hagarty (dehagart) writes:
> 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.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-09 17:47 ` Achim Gratz
@ 2015-02-09 18:18   ` Dennis Hagarty (dehagart)
  2015-02-09 18:51     ` Corinna Vinschen
                       ` (2 more replies)
  0 siblings, 3 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-09 18:18 UTC (permalink / raw)
  To: Achim Gratz, cygwin

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

But I'm just wondering how this failed after I updated - I was using it successfully 30 mins previously.
I've had it configured this way for years.

Thanks for the assistance and explanations.
Cheers
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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-09 18:18   ` Dennis Hagarty (dehagart)
@ 2015-02-09 18:51     ` Corinna Vinschen
  2015-02-09 19:18       ` Dennis Hagarty (dehagart)
  2015-02-09 19:38     ` Achim Gratz
  2015-02-10  0:35     ` Andrey Repin
  2 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-09 18:51 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]

On Feb  9 18:18, 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.
> 
> But I'm just wondering how this failed after I updated - I was using it successfully 30 mins previously.
> I've had it configured this way for years.

https://cygwin.com/ml/cygwin-announce/2015-02/msg00009.html

It helps to read the announcements ;)


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-09 18:51     ` Corinna Vinschen
@ 2015-02-09 19:18       ` Dennis Hagarty (dehagart)
  0 siblings, 0 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-09 19:18 UTC (permalink / raw)
  To: cygwin

Thanks :-)

I saw that, but it didn't quite sink in that this was my problem.

Cheers
Dennis

-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Corinna Vinschen
Sent: Monday, 9 February 2015 19:51
To: cygwin@cygwin.com
Subject: Re: Very slow Cygwin startup on Windows 7

On Feb  9 18:18, 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.
> 
> But I'm just wondering how this failed after I updated - I was using it successfully 30 mins previously.
> I've had it configured this way for years.

https://cygwin.com/ml/cygwin-announce/2015-02/msg00009.html

It helps to read the announcements ;)


Corinna

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-09 18:18   ` Dennis Hagarty (dehagart)
  2015-02-09 18:51     ` Corinna Vinschen
@ 2015-02-09 19:38     ` Achim Gratz
  2015-02-10  0:35     ` Andrey Repin
  2 siblings, 0 replies; 65+ messages in thread
From: Achim Gratz @ 2015-02-09 19:38 UTC (permalink / raw)
  To: cygwin

Dennis Hagarty (dehagart) writes:
> But I'm just wondering how this failed after I updated - I was using it successfully 30 mins previously.
> I've had it configured this way for years.

Before the update, Cygwin didn't talk to your DC, but it does now.  The
details are in the announcement for the update.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-09 18:18   ` Dennis Hagarty (dehagart)
  2015-02-09 18:51     ` Corinna Vinschen
  2015-02-09 19:38     ` Achim Gratz
@ 2015-02-10  0:35     ` Andrey Repin
  2015-02-12  6:05       ` Dennis Hagarty (dehagart)
                         ` (3 more replies)
  2 siblings, 4 replies; 65+ messages in thread
From: Andrey Repin @ 2015-02-10  0:35 UTC (permalink / raw)
  To: Dennis Hagarty (dehagart), cygwin

Greetings, Dennis Hagarty (dehagart)!

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

> But I'm just wondering how this failed after I updated - I was using it
> successfully 30 mins previously.
> I've had it configured this way for years.

That was the sole point of the update. :) No, no. Not the snail's speed, ofc.
But the more direct connection of Cygwin to the native security environment.
File ACL's included.



--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 10.02.2015, <02:54>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-10  0:35     ` Andrey Repin
@ 2015-02-12  6:05       ` Dennis Hagarty (dehagart)
  2015-02-12 10:17       ` Corinna Vinschen
                         ` (2 subsequent siblings)
  3 siblings, 0 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-12  6:05 UTC (permalink / raw)
  To: cygwin

Thanks Andrey,

I'll do that.

I see the purpose of the update - just the way it was documented didn't really make 
it clear to me that it was going to hit my DC and cause performance issues.

The UID stuff doesn't really worry me too much, I was happy with the old way.
But I'll use your suggestion tomorrow.

Cheers
Dennis

-----Original Message-----
From: Andrey Repin [mailto:anrdaemon@yandex.ru] 
Sent: Tuesday, 10 February 2015 01:05
To: Dennis Hagarty (dehagart); cygwin@cygwin.com
Subject: Re: Very slow Cygwin startup on Windows 7

Greetings, Dennis Hagarty (dehagart)!

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

> But I'm just wondering how this failed after I updated - I was using it
> successfully 30 mins previously.
> I've had it configured this way for years.

That was the sole point of the update. :) No, no. Not the snail's speed, ofc.
But the more direct connection of Cygwin to the native security environment.
File ACL's included.



--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 10.02.2015, <02:54>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-10  0:35     ` Andrey Repin
  2015-02-12  6:05       ` Dennis Hagarty (dehagart)
@ 2015-02-12 10:17       ` Corinna Vinschen
  2015-02-12 20:05         ` Andrey Repin
  2015-02-13  2:12         ` Andrey Repin
  2015-02-12 12:39       ` Achim Gratz
  2015-02-17 14:50       ` Dennis Hagarty (dehagart)
  3 siblings, 2 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-12 10:17 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

Hi Andrey,

On Feb 10 03:05, Andrey Repin wrote:
> [...]
> 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.

Do you feel up to the task to extend the FAQ entry

https://cygwin.com/faq/faq.html#faq.using.startup-slow

with a description of your solution?


Thanks,
Corinna


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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 12:39       ` Achim Gratz
@ 2015-02-12 12:39         ` Corinna Vinschen
  2015-02-12 16:01         ` Eric Blake
  2015-02-12 23:06         ` Andrey Repin
  2 siblings, 0 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-12 12:39 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

On Feb 12 12:09, Achim Gratz wrote:
> Andrey Repin <anrdaemon <at> yandex.ru> writes:
> > # getent passwd $(id -u) > /etc/passwd
> # mkpasswd -l >> /etc/passwd
> > # getent group $(id -G) > /etc/group
> # mkgroup -l >> /etc/group
> > # echo -e "#\npasswd: files db\ngroup: files db\n" > /etc/nsswitch.conf

Why?


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-10  0:35     ` Andrey Repin
  2015-02-12  6:05       ` Dennis Hagarty (dehagart)
  2015-02-12 10:17       ` Corinna Vinschen
@ 2015-02-12 12:39       ` Achim Gratz
  2015-02-12 12:39         ` Corinna Vinschen
                           ` (2 more replies)
  2015-02-17 14:50       ` Dennis Hagarty (dehagart)
  3 siblings, 3 replies; 65+ messages in thread
From: Achim Gratz @ 2015-02-12 12:39 UTC (permalink / raw)
  To: cygwin

Andrey Repin <anrdaemon <at> yandex.ru> writes:
> # getent passwd $(id -u) > /etc/passwd
# mkpasswd -l >> /etc/passwd
> # getent group $(id -G) > /etc/group
# mkgroup -l >> /etc/group
> # echo -e "#\npasswd: files db\ngroup: files db\n" > /etc/nsswitch.conf

Regards,
Achim.


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 12:39       ` Achim Gratz
  2015-02-12 12:39         ` Corinna Vinschen
@ 2015-02-12 16:01         ` Eric Blake
  2015-02-12 19:59           ` Andrey Repin
  2015-02-12 23:06         ` Andrey Repin
  2 siblings, 1 reply; 65+ messages in thread
From: Eric Blake @ 2015-02-12 16:01 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

On 02/12/2015 05:09 AM, Achim Gratz wrote:
> Andrey Repin <anrdaemon <at> yandex.ru> writes:
>> # getent passwd $(id -u) > /etc/passwd
> # mkpasswd -l >> /etc/passwd
>> # getent group $(id -G) > /etc/group
> # mkgroup -l >> /etc/group
>> # echo -e "#\npasswd: files db\ngroup: files db\n" > /etc/nsswitch.conf

'echo -e' is non-portable; use printf instead.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 16:01         ` Eric Blake
@ 2015-02-12 19:59           ` Andrey Repin
  0 siblings, 0 replies; 65+ messages in thread
From: Andrey Repin @ 2015-02-12 19:59 UTC (permalink / raw)
  To: Eric Blake, cygwin

Greetings, Eric Blake!

>>> # echo -e "#\npasswd: files db\ngroup: files db\n" > /etc/nsswitch.conf

> 'echo -e' is non-portable; use printf instead.

Knew I'm missing something.
Sure, will do.
Thank you.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 12.02.2015, <22:43>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 10:17       ` Corinna Vinschen
@ 2015-02-12 20:05         ` Andrey Repin
  2015-02-12 20:40           ` Corinna Vinschen
  2015-02-13  2:12         ` Andrey Repin
  1 sibling, 1 reply; 65+ messages in thread
From: Andrey Repin @ 2015-02-12 20:05 UTC (permalink / raw)
  To: Corinna Vinschen, cygwin

Greetings, Corinna Vinschen!

> Hi Andrey,

> On Feb 10 03:05, Andrey Repin wrote:
>> [...]
>> 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.

> Do you feel up to the task to extend the FAQ entry

> https://cygwin.com/faq/faq.html#faq.using.startup-slow

> with a description of your solution?

Sure, if that was really a solution. I'd prefer to hear from Dennis first.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 12.02.2015, <22:44>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 20:05         ` Andrey Repin
@ 2015-02-12 20:40           ` Corinna Vinschen
  2015-02-12 23:17             ` Andrey Repin
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-12 20:40 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

On Feb 12 22:45, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> > Hi Andrey,
> 
> > On Feb 10 03:05, Andrey Repin wrote:
> >> [...]
> >> 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.
> 
> > Do you feel up to the task to extend the FAQ entry
> 
> > https://cygwin.com/faq/faq.html#faq.using.startup-slow
> 
> > with a description of your solution?
> 
> Sure, if that was really a solution. I'd prefer to hear from Dennis first.

Thanks.

There's also the patch in Cygwin which *might* help to fix this issue in
a default configuration without having to tweak /etc/nsswitch.conf.
That would be the preferred solution, I guess.  Just creating a test
release for that...


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 12:39       ` Achim Gratz
  2015-02-12 12:39         ` Corinna Vinschen
  2015-02-12 16:01         ` Eric Blake
@ 2015-02-12 23:06         ` Andrey Repin
  2 siblings, 0 replies; 65+ messages in thread
From: Andrey Repin @ 2015-02-12 23:06 UTC (permalink / raw)
  To: Achim Gratz, cygwin

Greetings, Achim Gratz!

> Andrey Repin <anrdaemon <at> yandex.ru> writes:
>> # getent passwd $(id -u) > /etc/passwd
> # mkpasswd -l >> /etc/passwd
>> # getent group $(id -G) > /etc/group
> # mkgroup -l >> /etc/group

You totally missed the point of my suggestion.
Like, absolutely.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 13.02.2015, <01:04>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 20:40           ` Corinna Vinschen
@ 2015-02-12 23:17             ` Andrey Repin
  0 siblings, 0 replies; 65+ messages in thread
From: Andrey Repin @ 2015-02-12 23:17 UTC (permalink / raw)
  To: Corinna Vinschen, cygwin

Greetings, Corinna Vinschen!

>> >> [...]
>> >> 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.
>> 
>> > Do you feel up to the task to extend the FAQ entry
>> 
>> > https://cygwin.com/faq/faq.html#faq.using.startup-slow
>> 
>> > with a description of your solution?
>> 
>> Sure, if that was really a solution. I'd prefer to hear from Dennis first.

> Thanks.

> There's also the patch in Cygwin which *might* help to fix this issue in
> a default configuration without having to tweak /etc/nsswitch.conf.
> That would be the preferred solution, I guess.  Just creating a test
> release for that...

I've seen that part of conversation, and I'm considering it in my writeup.
Already got an off-list confirmation from someone else, by the way.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 13.02.2015, <01:43>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-12 10:17       ` Corinna Vinschen
  2015-02-12 20:05         ` Andrey Repin
@ 2015-02-13  2:12         ` Andrey Repin
  2015-02-13  8:58           ` Corinna Vinschen
  1 sibling, 1 reply; 65+ messages in thread
From: Andrey Repin @ 2015-02-13  2:12 UTC (permalink / raw)
  To: Corinna Vinschen, cygwin

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

Greetings, Corinna Vinschen!

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

> Do you feel up to the task to extend the FAQ entry

> https://cygwin.com/faq/faq.html#faq.using.startup-slow

> with a description of your solution?

I took a liberty to reorder and rewrite it a little.
Please tell me, if I didn't lost anything in the process.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 13.02.2015, <02:59>

Sorry for my terrible english...

[-- Attachment #2: faq-4.2.html.gz --]
[-- Type: application/x-gzip, Size: 2462 bytes --]

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-13  2:12         ` Andrey Repin
@ 2015-02-13  8:58           ` Corinna Vinschen
  2015-02-13 11:45             ` Andrey Repin
                               ` (2 more replies)
  0 siblings, 3 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-13  8:58 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

On Feb 13 03:34, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> >> [...]
> >> 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.
> 
> > Do you feel up to the task to extend the FAQ entry
> 
> > https://cygwin.com/faq/faq.html#faq.using.startup-slow
> 
> > with a description of your solution?
> 
> I took a liberty to reorder and rewrite it a little.
> Please tell me, if I didn't lost anything in the process.

It reads nicely.  The paragraph starting with "The 1.7.35 release is
expected..." needs a tweak as soon as 1.7.35 goes release, of course,
but otherwise it's really neat.

The problem is this:  The source of the file is not in HTML but in XML,
see https://sourceware.org/viewvc/src/winsup/doc/faq-setup.xml?view=log

Any problem to rework for XML and sending as unified patch against the
latest version of the file from CVS?


Thanks a lot,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-13  8:58           ` Corinna Vinschen
@ 2015-02-13 11:45             ` Andrey Repin
  2015-02-13 22:38             ` Warren Young
  2015-02-15 21:50             ` Andrey Repin
  2 siblings, 0 replies; 65+ messages in thread
From: Andrey Repin @ 2015-02-13 11:45 UTC (permalink / raw)
  To: Corinna Vinschen, cygwin

Greetings, Corinna Vinschen!

> On Feb 13 03:34, Andrey Repin wrote:
>> Greetings, Corinna Vinschen!
>> 
>> >> [...]
>> >> 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.
>> 
>> > Do you feel up to the task to extend the FAQ entry
>> 
>> > https://cygwin.com/faq/faq.html#faq.using.startup-slow
>> 
>> > with a description of your solution?
>> 
>> I took a liberty to reorder and rewrite it a little.
>> Please tell me, if I didn't lost anything in the process.

> It reads nicely.  The paragraph starting with "The 1.7.35 release is
> expected..." needs a tweak as soon as 1.7.35 goes release, of course,
> but otherwise it's really neat.

> The problem is this:  The source of the file is not in HTML but in XML,
> see https://sourceware.org/viewvc/src/winsup/doc/faq-setup.xml?view=log

> Any problem to rework for XML and sending as unified patch against the
> latest version of the file from CVS?

That was my next question :)
I'll see what can be done.
It may take bit of time. A day or two. I've got a workload to push away
first. Sorry for inconvenience.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 13.02.2015, <13:16>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-13  8:58           ` Corinna Vinschen
  2015-02-13 11:45             ` Andrey Repin
@ 2015-02-13 22:38             ` Warren Young
  2015-02-13 23:50               ` Warren Young
  2015-02-15 10:00               ` Corinna Vinschen
  2015-02-15 21:50             ` Andrey Repin
  2 siblings, 2 replies; 65+ messages in thread
From: Warren Young @ 2015-02-13 22:38 UTC (permalink / raw)
  To: cygwin

> On Feb 13, 2015, at 1:55 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> It reads nicely.  The paragraph starting with "The 1.7.35 release is
> expected..." needs a tweak as soon as 1.7.35 goes release, of course,
> but otherwise it's really neat.

It also still has a bug from the original, where I didn’t fix a c:\cygwin64 -> c:\cygwin.

> Any problem to rework for XML and sending as unified patch against the
> latest version of the file from CVS?

I tried to check out a new copy of the Cygwin CVS tree to do the merge myself, but I got a public key denied complaint.  The key I tried to use *does* work with the new Git setup.exe repo.  Did the key configuration get changed when this piece got sliced off?
--
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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-13 22:38             ` Warren Young
@ 2015-02-13 23:50               ` Warren Young
  2015-02-15 10:02                 ` Corinna Vinschen
  2015-02-15 10:00               ` Corinna Vinschen
  1 sibling, 1 reply; 65+ messages in thread
From: Warren Young @ 2015-02-13 23:50 UTC (permalink / raw)
  To: The Cygwin Mailing List

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

> On Feb 13, 2015, at 2:32 PM, Warren Young <wyml@etr-usa.com> wrote:
> 
> I tried to check out a new copy of the Cygwin CVS tree to do the merge myself, but I got a public key denied complaint.

I folded Andrey’s changes in and made more of my own.

See the attached patch.



[-- Attachment #2: cygdll-start-slow.patch --]
[-- Type: application/octet-stream, Size: 8768 bytes --]

Index: faq-using.xml
===================================================================
RCS file: /cvs/src/src/winsup/doc/faq-using.xml,v
retrieving revision 1.59
diff -u -r1.59 faq-using.xml
--- faq-using.xml	11 Feb 2015 08:52:04 -0000	1.59
+++ faq-using.xml	13 Feb 2015 22:35:07 -0000
@@ -33,63 +33,120 @@
 <question><para>Starting a new terminal window is slow. What's going on?</para></question>
 <answer>
 
-<para>There are many possible causes for this. This answer is more a
-list of things to look into than a set of solutions.</para>
+<para>There are many possible causes for this.</para>
+
+<para>If your terminal windows suddenly began starting slowly after a
+Cygwin upgrade, it may indicate issues in the authentication
+setup.</para>
+
+<para>For almost all its lifetime, Cygwin has used Unix-like
+<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
+files to mirror the contents of the Windows SAM and AD databases.
+Although these files can still be used, since Cygwin 1.7.34, new
+installations now use the SAM/AD databases directly.</para>
+
+<para>To switch to the new method, move these two files out of the way
+and restart the Cygwin terminal. That runs Cygwin in its new default
+mode.</para>
+
+<para>If you are on a system that isn't using AD domain logins, this
+makes Cygwin use the native Windows SAM database directly, which may be
+faster than the old method involving <filename>/etc/passwd</filename>
+and such. At worst, it will only be a bit slower. (The speed difference
+you see depends on which benchmark you run.) For the AD case, it can be
+slower than the old method, since it is trading a local file read for a
+network request. Version 1.7.35 will reduce the number of AD server
+requests the DLL makes relative to 1.7.34, with the consequence that you
+will now have to alter <filename>/etc/nsswitch.conf</filename> in order
+to change your Cygwin home directory, instead of being able to change it
+from the AD configuration.</para>
+
+<para>If you are still experiencing very slow shell startups, there are
+a number of other things you can look into:</para>
 
 <orderedlist>
   <listitem>
-    <para>If your terminal windows suddenly began starting slowly after a
-    Cygwin upgrade, the most likely cause is that you have an outdated
-    authentication setup.</para>
-
-    <para>For almost all its lifetime, Cygwin has used Unix-like
-    <filename>/etc/passwd</filename> and <filename>/etc/group</filename> files
-    to mirror the contents of the Windows SAM and AD databases.  Although these
-    files can still be used, since Cygwin 1.7.34, new installations now use the
-    SAM/AD databases directly.</para>
-
-    <para>To switch to the new method, move these two files out of the way and
-    restart the Cygwin terminal. That runs Cygwin in its new default mode. If
-    you are on a system that isn't using AD domain logins, this makes Cygwin
-    use the native Windows SAM database directly, which may be faster than the
-    old method involving <filename>/etc/passwd</filename> and such. At worst,
-    it will only be a bit slower. (Which situation applies depends on the
-    benchmark you run.)</para>
-
-    <para>If you are on an AD system, a hybrid approach you might consider is
-    to re-run <command>mkpasswd</command> and <command>mkgroup</command>, then
-    put the following into <filename>/etc/nsswitch.conf</filename> to make
-    Cygwin treat these files as read-only local caches of your AD database:
-    </para>
-
-    <screen>
-    passwd: files
-    group:  files
-    </screen>
-
-    <para>By leaving out the "db" option, we are telling the Cygwin DLL not to
-    even <emphasis>try</emphasis> to do AD lookups. If your AD servers are
-    slow, this local cache will speed things up. The downside is the old stale
-    cache problem: any time the AD databases change, your local cache will go
-    out of date until you update the files manually.</para> 
+    <para>One common cause of slow Cygwin Terminal starts is a bad DNS
+    setup. This particularly affects AD clients, but there may be other
+    things in your Cygwin startup that depend on getting fast answers
+    back from a network server.</para>
+    
+    <para>Keep in mind that this may affect Cygwin even when the domain
+    controller is on the same machine as Cygwin, or is on a nearby
+    server. A bad DNS server IP can cause long delays while the local
+    TCP/IP stack times out on a connection to a server that simply isn't
+    there, for example.</para>
+
+  <listitem>
+    <para>Another cause for AD client system is slow DC replies,
+    commonly observed in configurations with remote DC access. The
+    Cygwin DLL queries information about every group you're in to
+    populate the local cache on startup. You may speed up this process a
+    little by caching your own information in local files. Run these
+    commands in a Cygwin terminal with write access to
+    <filename>/etc</filename>:
+
+    <screen>getent passwd $(id -u) > /etc/passwd
+getent group $(id -G) > /etc/group</screen>
+
+    <para>Also, set <filename>/etc/nsswitch.conf</filename> as
+    follows:</para>
+
+    <screen>passwd: files db
+group:  files db</screen>
+
+    <para>This will limit the need for Cygwin to contact the AD domain
+    controller (DC) while still allowing for additional information to
+    be retrieved from DC, such as when listing remote
+    directories.</para>
   </listitem>
 
   <listitem>
-    <para>Another common cause of slow Cygwin Terminal starts is a bad DNS
-    setup. Many things that occur during a Cygwin Terminal startup require
-    fast DNS lookups.</para>
+    <para>Either in addition to the previous item or instead of it, you
+    can run <ulink
+    url="https://cygwin.com/cygwin-ug-net/using-cygserver.html"><command>cygserver</command></ulink>
+    as a local caching service to speed up DC requests.</para>
+
+    <para>Cygwin programs will check with <command>cygserver</command>
+    before trying to query the DC directly.</para>
+  </listitem>
+
+  <listitem>
+    <para>A less preferable option is to create a static read-only cache
+    of the authentication data. This is the old-fashioned method of
+    making Cygwin integrate with AD, the only method available in
+    releases before 1.7.34. To do this, run <command>mkpasswd</command>
+    and <command>mkgroup</command>, then put the following into
+    <filename>/etc/nsswitch.conf</command> to make Cygwin treat these
+    files as the only sources of user and group information:</para>
+
+    <screen>passwd: files
+group:  files</screen>
+
+    <para>By leaving out the <computeroutput>db</computeroutput> option,
+    we are telling the Cygwin DLL not to even try to do AD lookups. If
+    your AD servers are slow, this local cache will speed things up. The
+    downside is that you open yourself up to the <ulink
+    url="http://en.wikipedia.org/wiki/Cache_(computing)">stale cache
+    problem</ulink>: any time the AD databases change, your local cache
+    will go out of date until you update the files manually.</para>
   </listitem>
 </orderedlist>
 
-<para>If none of the above helps, the best troubleshooting method is to run
-your startup scripts in debug mode. Right-click your Cygwin Terminal icon, go
-to Properties, and edit the command. It should be something like
-<command>C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -</command>.
-Assuming you are using Bash for your login shell, change it to
-<command>C:\cygwin64\bin\mintty /bin/bash -lx</command>. That will cause it to
-write out a line for every command it runs. A slow Cygwin Terminal launch
-usually means one or more of the many commands Cygwin runs when starting up
-will take a long time. That will be your clue as to what's going on.</para>
+<para>If none of the above helps, the best troubleshooting method is to
+run your startup scripts in debug mode. Right-click your Cygwin Terminal
+icon, go to Properties, and edit the command. It should be something
+like <command>C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico
+-</command>.  Assuming you are using Bash for your login shell, change
+it to <command>C:\cygwin\bin\mintty /bin/bash -lx</command> then try
+running Cygwin Terminal again. The <option>-x</option> option tells Bash
+to write every command it runs to the terminal before launching it. If
+the terminal immediately starts filling with lines of text but then
+pauses, the line where the output paused is your clue as to what's going
+on. The Cygwin DLL proper probably isn't the cause of the slowdown in
+this case, since those delays happen before the first line of text
+appears in the terminal.</para>
+
 </answer></qandaentry>
 
 <qandaentry id="faq.using.slow">

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-13 22:38             ` Warren Young
  2015-02-13 23:50               ` Warren Young
@ 2015-02-15 10:00               ` Corinna Vinschen
  2015-02-17 20:34                 ` Warren Young
  1 sibling, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-15 10:00 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Feb 13 14:32, Warren Young wrote:
> > On Feb 13, 2015, at 1:55 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> > 
> > It reads nicely.  The paragraph starting with "The 1.7.35 release is
> > expected..." needs a tweak as soon as 1.7.35 goes release, of course,
> > but otherwise it's really neat.
> 
> It also still has a bug from the original, where I didn’t fix a c:\cygwin64 -> c:\cygwin.
> 
> > Any problem to rework for XML and sending as unified patch against the
> > latest version of the file from CVS?
> 
> I tried to check out a new copy of the Cygwin CVS tree to do the merge
> myself, but I got a public key denied complaint.  The key I tried to
> use *does* work with the new Git setup.exe repo.  Did the key
> configuration get changed when this piece got sliced off?

Definitely not.  The key configuration in terms of your rights are bound
to your group membership.  The setup tool belonged to group
"cygwin-apps", while cygwin belongs to group "src".  If your key doesn't
work anymore, you might ask on the overseers list if they can help to
find out what the problem is.  From here I really can't tell and I'm
no sourceware admin.


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-13 23:50               ` Warren Young
@ 2015-02-15 10:02                 ` Corinna Vinschen
  2015-02-17 19:13                   ` Warren Young
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-15 10:02 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]

On Feb 13 15:38, Warren Young wrote:
> > On Feb 13, 2015, at 2:32 PM, Warren Young <wyml@etr-usa.com> wrote:
> > 
> > I tried to check out a new copy of the Cygwin CVS tree to do the merge myself, but I got a public key denied complaint.
> 
> I folded Andrey’s changes in and made more of my own.

Thanks.  Did you run make?  It doesn't build:

faq-using.xml:102: parser error : Opening and ending tag mismatch: para line 81 and listitem
  </listitem>
             ^
faq-using.xml:120: parser error : Opening and ending tag mismatch: filename line 120 and command
    <filename>/etc/nsswitch.conf</command> to make Cygwin treat these
                                          ^
faq-using.xml:134: parser error : Opening and ending tag mismatch: listitem line 80 and orderedlist
</orderedlist>
              ^
faq-using.xml:150: parser error : Opening and ending tag mismatch: listitem line 68 and answer
</answer></qandaentry>
         ^
faq-using.xml:150: parser error : Opening and ending tag mismatch: orderedlist line 67 and qandaentry
</answer></qandaentry>
                      ^
faq-using.xml:1333: parser error : Opening and ending tag mismatch: answer line 34 and qandadiv
</qandadiv>
           ^
faq-using.xml:1334: parser error : Premature end of data in tag qandaentry line 32

^
faq-using.xml:1334: parser error : Premature end of data in tag qandadiv line 5

^
faq.xml:16: element include: XInclude error : could not load faq-using.xml, and no fallback was found


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-13  8:58           ` Corinna Vinschen
  2015-02-13 11:45             ` Andrey Repin
  2015-02-13 22:38             ` Warren Young
@ 2015-02-15 21:50             ` Andrey Repin
  2015-02-16  9:35               ` Corinna Vinschen
  2 siblings, 1 reply; 65+ messages in thread
From: Andrey Repin @ 2015-02-15 21:50 UTC (permalink / raw)
  To: Corinna Vinschen, cygwin

Greetings, Corinna Vinschen!

>> >> 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.
>> 
>> > Do you feel up to the task to extend the FAQ entry
>> 
>> > https://cygwin.com/faq/faq.html#faq.using.startup-slow
>> 
>> > with a description of your solution?
>> 
>> I took a liberty to reorder and rewrite it a little.
>> Please tell me, if I didn't lost anything in the process.

> It reads nicely.  The paragraph starting with "The 1.7.35 release is
> expected..." needs a tweak as soon as 1.7.35 goes release, of course,
> but otherwise it's really neat.

> The problem is this:  The source of the file is not in HTML but in XML,
> see https://sourceware.org/viewvc/src/winsup/doc/faq-setup.xml?view=log

> Any problem to rework for XML and sending as unified patch against the
> latest version of the file from CVS?

I was unable to find relevant CVS tree. The winsup/doc appears to contain the
parts of /cygwin-ug-net/ but not the /faq/ part of the website.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 15.02.2015, <21:37>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-15 21:50             ` Andrey Repin
@ 2015-02-16  9:35               ` Corinna Vinschen
  2015-02-16 22:00                 ` Andrey Repin
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-16  9:35 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2329 bytes --]

On Feb 15 21:38, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> >> >> 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.
> >> 
> >> > Do you feel up to the task to extend the FAQ entry
> >> 
> >> > https://cygwin.com/faq/faq.html#faq.using.startup-slow
> >> 
> >> > with a description of your solution?
> >> 
> >> I took a liberty to reorder and rewrite it a little.
> >> Please tell me, if I didn't lost anything in the process.
> 
> > It reads nicely.  The paragraph starting with "The 1.7.35 release is
> > expected..." needs a tweak as soon as 1.7.35 goes release, of course,
> > but otherwise it's really neat.
> 
> > The problem is this:  The source of the file is not in HTML but in XML,
> > see https://sourceware.org/viewvc/src/winsup/doc/faq-setup.xml?view=log
> 
> > Any problem to rework for XML and sending as unified patch against the
> > latest version of the file from CVS?
> 
> I was unable to find relevant CVS tree. The winsup/doc appears to contain the
> parts of /cygwin-ug-net/ but not the /faq/ part of the website.

They do.  It's just the sh***y web interface of cvsweb, which only shows
up to 25 entries.

If you look at https://sourceware.org/viewvc/src/winsup/doc/ you'll
see a button "Go to:" and right of it a drop-down menu with the text
"Page 1: .cvsignore to ...".  Just change to the next page and press the
"Go to:" button.

Much easier (see https://cygwin.com/cvs.html):

  cvs -d :pserver:anoncvs@cygwin.com:/cvs/src checkout winsup

This checks out a directory called "src".  Just cd into src/winsup/doc
and all documentation is there.


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-16  9:35               ` Corinna Vinschen
@ 2015-02-16 22:00                 ` Andrey Repin
  0 siblings, 0 replies; 65+ messages in thread
From: Andrey Repin @ 2015-02-16 22:00 UTC (permalink / raw)
  To: Corinna Vinschen, cygwin

Greetings, Corinna Vinschen!

>> I was unable to find relevant CVS tree. The winsup/doc appears to contain the
>> parts of /cygwin-ug-net/ but not the /faq/ part of the website.

> They do.  It's just the sh***y web interface of cvsweb, which only shows
> up to 25 entries.

> If you look at https://sourceware.org/viewvc/src/winsup/doc/ you'll
> see a button "Go to:" and right of it a drop-down menu with the text
> "Page 1: .cvsignore to ...".  Just change to the next page and press the
> "Go to:" button.

> Much easier (see https://cygwin.com/cvs.html):

>   cvs -d :pserver:anoncvs@cygwin.com:/cvs/src checkout winsup

> This checks out a directory called "src".  Just cd into src/winsup/doc
> and all documentation is there.

Right. I was just unsure, if that's the same CVS. Will know now, thanks!


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 17.02.2015, <00:05>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-10  0:35     ` Andrey Repin
                         ` (2 preceding siblings ...)
  2015-02-12 12:39       ` Achim Gratz
@ 2015-02-17 14:50       ` Dennis Hagarty (dehagart)
  2015-02-17 16:33         ` Corinna Vinschen
                           ` (2 more replies)
  3 siblings, 3 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-17 14:50 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 14:50       ` Dennis Hagarty (dehagart)
@ 2015-02-17 16:33         ` Corinna Vinschen
  2015-02-18 12:20           ` Dennis Hagarty (dehagart)
  2015-02-17 17:59         ` Andrey Repin
  2015-02-18 11:27         ` Corinna Vinschen
  2 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-17 16:33 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]

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?


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 14:50       ` Dennis Hagarty (dehagart)
  2015-02-17 16:33         ` Corinna Vinschen
@ 2015-02-17 17:59         ` Andrey Repin
  2015-02-17 18:53           ` Dennis Hagarty (dehagart)
  2015-02-18 11:27         ` Corinna Vinschen
  2 siblings, 1 reply; 65+ messages in thread
From: Andrey Repin @ 2015-02-17 17:59 UTC (permalink / raw)
  To: Dennis Hagarty (dehagart), cygwin

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

> 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


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 17.02.2015, <13:35>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-17 17:59         ` Andrey Repin
@ 2015-02-17 18:53           ` Dennis Hagarty (dehagart)
  2015-02-18 11:18             ` Andrey Repin
  0 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-17 18:53 UTC (permalink / raw)
  To: cygwin

>> Apologies for my slow response - urgent RFI's.

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

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

Not sure why it was only a few. I've rerun it (took more than 5 mins) and I get quite a few more - about 
See below...

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

After I'd run the id -znG, it found 87 groups.
Then I did this (even with cygserver running)

~ getent passwd $(id -u) > /etc/passwd
~ getent group $(id -G) > /etc/group
      0 [main] getent 48156 transport_layer_pipes::connect: lost connection to cygserver, error = 2
~ wc -l /etc/group
58 /etc/group

Since it seems like cygserver stopped, it took a while to complete.
Anyway, with cygserver stopped, I ran the getent again elevated and got 83.
~ wc -l /etc/group
83 /etc/group

Not really sure how many groups I'm a member of (in another tool), but seems about right.

Hope that helps 
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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-15 10:02                 ` Corinna Vinschen
@ 2015-02-17 19:13                   ` Warren Young
  2015-02-17 21:33                     ` Corinna Vinschen
  0 siblings, 1 reply; 65+ messages in thread
From: Warren Young @ 2015-02-17 19:13 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

> On Feb 15, 2015, at 2:37 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> On Feb 13 15:38, Warren Young wrote:
>> 
>> I folded Andrey’s changes in and made more of my own.
> 
> Thanks.  Did you run make?

I tried, but I’ve retired the last Windows machine I used to build winsup previously, and I didn’t want to rebuild the Cygwin build environment on the VM that replaced it just to test the patch.

Anyway, I’ve fixed it now.  All it was is some unclosed tags.


[-- Attachment #2: cygdll-start-slow2.patch --]
[-- Type: application/octet-stream, Size: 8792 bytes --]

Index: faq-using.xml
===================================================================
RCS file: /cvs/src/src/winsup/doc/faq-using.xml,v
retrieving revision 1.59
diff -u -r1.59 faq-using.xml
--- faq-using.xml	11 Feb 2015 08:52:04 -0000	1.59
+++ faq-using.xml	17 Feb 2015 18:54:10 -0000
@@ -33,63 +33,121 @@
 <question><para>Starting a new terminal window is slow. What's going on?</para></question>
 <answer>
 
-<para>There are many possible causes for this. This answer is more a
-list of things to look into than a set of solutions.</para>
+<para>There are many possible causes for this.</para>
+
+<para>If your terminal windows suddenly began starting slowly after a
+Cygwin upgrade, it may indicate issues in the authentication
+setup.</para>
+
+<para>For almost all its lifetime, Cygwin has used Unix-like
+<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
+files to mirror the contents of the Windows SAM and AD databases.
+Although these files can still be used, since Cygwin 1.7.34, new
+installations now use the SAM/AD databases directly.</para>
+
+<para>To switch to the new method, move these two files out of the way
+and restart the Cygwin terminal. That runs Cygwin in its new default
+mode.</para>
+
+<para>If you are on a system that isn't using AD domain logins, this
+makes Cygwin use the native Windows SAM database directly, which may be
+faster than the old method involving <filename>/etc/passwd</filename>
+and such. At worst, it will only be a bit slower. (The speed difference
+you see depends on which benchmark you run.) For the AD case, it can be
+slower than the old method, since it is trading a local file read for a
+network request. Version 1.7.35 will reduce the number of AD server
+requests the DLL makes relative to 1.7.34, with the consequence that you
+will now have to alter <filename>/etc/nsswitch.conf</filename> in order
+to change your Cygwin home directory, instead of being able to change it
+from the AD configuration.</para>
+
+<para>If you are still experiencing very slow shell startups, there are
+a number of other things you can look into:</para>
 
 <orderedlist>
   <listitem>
-    <para>If your terminal windows suddenly began starting slowly after a
-    Cygwin upgrade, the most likely cause is that you have an outdated
-    authentication setup.</para>
-
-    <para>For almost all its lifetime, Cygwin has used Unix-like
-    <filename>/etc/passwd</filename> and <filename>/etc/group</filename> files
-    to mirror the contents of the Windows SAM and AD databases.  Although these
-    files can still be used, since Cygwin 1.7.34, new installations now use the
-    SAM/AD databases directly.</para>
-
-    <para>To switch to the new method, move these two files out of the way and
-    restart the Cygwin terminal. That runs Cygwin in its new default mode. If
-    you are on a system that isn't using AD domain logins, this makes Cygwin
-    use the native Windows SAM database directly, which may be faster than the
-    old method involving <filename>/etc/passwd</filename> and such. At worst,
-    it will only be a bit slower. (Which situation applies depends on the
-    benchmark you run.)</para>
-
-    <para>If you are on an AD system, a hybrid approach you might consider is
-    to re-run <command>mkpasswd</command> and <command>mkgroup</command>, then
-    put the following into <filename>/etc/nsswitch.conf</filename> to make
-    Cygwin treat these files as read-only local caches of your AD database:
-    </para>
-
-    <screen>
-    passwd: files
-    group:  files
-    </screen>
-
-    <para>By leaving out the "db" option, we are telling the Cygwin DLL not to
-    even <emphasis>try</emphasis> to do AD lookups. If your AD servers are
-    slow, this local cache will speed things up. The downside is the old stale
-    cache problem: any time the AD databases change, your local cache will go
-    out of date until you update the files manually.</para> 
+    <para>One common cause of slow Cygwin Terminal starts is a bad DNS
+    setup. This particularly affects AD clients, but there may be other
+    things in your Cygwin startup that depend on getting fast answers
+    back from a network server.</para>
+    
+    <para>Keep in mind that this may affect Cygwin even when the domain
+    controller is on the same machine as Cygwin, or is on a nearby
+    server. A bad DNS server IP can cause long delays while the local
+    TCP/IP stack times out on a connection to a server that simply isn't
+    there, for example.</para>
+  </listitem>
+
+  <listitem>
+    <para>Another cause for AD client system is slow DC replies,
+    commonly observed in configurations with remote DC access. The
+    Cygwin DLL queries information about every group you're in to
+    populate the local cache on startup. You may speed up this process a
+    little by caching your own information in local files. Run these
+    commands in a Cygwin terminal with write access to
+    <filename>/etc</filename>:</para>
+
+    <screen>getent passwd $(id -u) > /etc/passwd
+getent group $(id -G) > /etc/group</screen>
+
+    <para>Also, set <filename>/etc/nsswitch.conf</filename> as
+    follows:</para>
+
+    <screen>passwd: files db
+group:  files db</screen>
+
+    <para>This will limit the need for Cygwin to contact the AD domain
+    controller (DC) while still allowing for additional information to
+    be retrieved from DC, such as when listing remote
+    directories.</para>
   </listitem>
 
   <listitem>
-    <para>Another common cause of slow Cygwin Terminal starts is a bad DNS
-    setup. Many things that occur during a Cygwin Terminal startup require
-    fast DNS lookups.</para>
+    <para>Either in addition to the previous item or instead of it, you
+    can run <ulink
+    url="https://cygwin.com/cygwin-ug-net/using-cygserver.html"><command>cygserver</command></ulink>
+    as a local caching service to speed up DC requests.</para>
+
+    <para>Cygwin programs will check with <command>cygserver</command>
+    before trying to query the DC directly.</para>
+  </listitem>
+
+  <listitem>
+    <para>A less preferable option is to create a static read-only cache
+    of the authentication data. This is the old-fashioned method of
+    making Cygwin integrate with AD, the only method available in
+    releases before 1.7.34. To do this, run <command>mkpasswd</command>
+    and <command>mkgroup</command>, then put the following into
+    <filename>/etc/nsswitch.conf</filename> to make Cygwin treat these
+    files as the only sources of user and group information:</para>
+
+    <screen>passwd: files
+group:  files</screen>
+
+    <para>By leaving out the <computeroutput>db</computeroutput> option,
+    we are telling the Cygwin DLL not to even try to do AD lookups. If
+    your AD servers are slow, this local cache will speed things up. The
+    downside is that you open yourself up to the <ulink
+    url="http://en.wikipedia.org/wiki/Cache_(computing)">stale cache
+    problem</ulink>: any time the AD databases change, your local cache
+    will go out of date until you update the files manually.</para>
   </listitem>
 </orderedlist>
 
-<para>If none of the above helps, the best troubleshooting method is to run
-your startup scripts in debug mode. Right-click your Cygwin Terminal icon, go
-to Properties, and edit the command. It should be something like
-<command>C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -</command>.
-Assuming you are using Bash for your login shell, change it to
-<command>C:\cygwin64\bin\mintty /bin/bash -lx</command>. That will cause it to
-write out a line for every command it runs. A slow Cygwin Terminal launch
-usually means one or more of the many commands Cygwin runs when starting up
-will take a long time. That will be your clue as to what's going on.</para>
+<para>If none of the above helps, the best troubleshooting method is to
+run your startup scripts in debug mode. Right-click your Cygwin Terminal
+icon, go to Properties, and edit the command. It should be something
+like <command>C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico
+-</command>.  Assuming you are using Bash for your login shell, change
+it to <command>C:\cygwin\bin\mintty /bin/bash -lx</command> then try
+running Cygwin Terminal again. The <option>-x</option> option tells Bash
+to write every command it runs to the terminal before launching it. If
+the terminal immediately starts filling with lines of text but then
+pauses, the line where the output paused is your clue as to what's going
+on. The Cygwin DLL proper probably isn't the cause of the slowdown in
+this case, since those delays happen before the first line of text
+appears in the terminal.</para>
+
 </answer></qandaentry>
 
 <qandaentry id="faq.using.slow">


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-15 10:00               ` Corinna Vinschen
@ 2015-02-17 20:34                 ` Warren Young
  2015-02-17 21:39                   ` Corinna Vinschen
  0 siblings, 1 reply; 65+ messages in thread
From: Warren Young @ 2015-02-17 20:34 UTC (permalink / raw)
  To: cygwin

> On Feb 15, 2015, at 2:30 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> On Feb 13 14:32, Warren Young wrote:
>> 
>> I tried to check out a new copy of the Cygwin CVS tree to do the merge
>> myself, but I got a public key denied complaint.
> 
> If your key doesn't
> work anymore, you might ask on the overseers list

I figured out the problem.  The instructions on this page are incomplete:

  https://cygwin.com/cvs.html

In addition to replacing :pserver: with :ext: in CVSROOT, you also have to replace anoncvs with your Sourceware user name.

Do you want me to check the second pass at the FAQ patch in myself, then, or will you do it?
--
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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 19:13                   ` Warren Young
@ 2015-02-17 21:33                     ` Corinna Vinschen
  2015-02-17 22:51                       ` Warren Young
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-17 21:33 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

On Feb 17 11:57, Warren Young wrote:
> > On Feb 15, 2015, at 2:37 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> > 
> > On Feb 13 15:38, Warren Young wrote:
> >> 
> >> I folded Andrey’s changes in and made more of my own.
> > 
> > Thanks.  Did you run make?
> 
> I tried, but I’ve retired the last Windows machine I used to build
> winsup previously, and I didn’t want to rebuild the Cygwin build
> environment on the VM that replaced it just to test the patch.

You can build the entire Cygwin tree on Linux.  Yaakov provides
a cygwin cross toolchain for Fedora, and the mingw-w64 toolchain
is part of the Fedora packages anyway.

> Anyway, I’ve fixed it now.  All it was is some unclosed tags.

Thank you.  Please apply.  If something has to be changed later
on due to changes in 1.7.35 we can revisit it.


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 20:34                 ` Warren Young
@ 2015-02-17 21:39                   ` Corinna Vinschen
  0 siblings, 0 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-17 21:39 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]

On Feb 17 12:43, Warren Young wrote:
> > On Feb 15, 2015, at 2:30 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> > 
> > On Feb 13 14:32, Warren Young wrote:
> >> 
> >> I tried to check out a new copy of the Cygwin CVS tree to do the merge
> >> myself, but I got a public key denied complaint.
> > 
> > If your key doesn't
> > work anymore, you might ask on the overseers list
> 
> I figured out the problem.  The instructions on this page are incomplete:
> 
>   https://cygwin.com/cvs.html
> 
> In addition to replacing :pserver: with :ext: in CVSROOT, you also
> have to replace anoncvs with your Sourceware user name.

Yeah, the description is a bit flaky.  Doesn't matter, we're going to
switch to git RSN.

> Do you want me to check the second pass at the FAQ patch in myself,
> then, or will you do it?

I'm lazy...


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 21:33                     ` Corinna Vinschen
@ 2015-02-17 22:51                       ` Warren Young
  2015-02-17 23:22                         ` Corinna Vinschen
  0 siblings, 1 reply; 65+ messages in thread
From: Warren Young @ 2015-02-17 22:51 UTC (permalink / raw)
  To: cygwin

> On Feb 17, 2015, at 2:12 PM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> On Feb 17 11:57, Warren Young wrote:
>> 
>> 
>> I tried, but I’ve retired the last Windows machine I used to build
>> winsup previously, and I didn’t want to rebuild the Cygwin build
>> environment on the VM that replaced it just to test the patch.
> 
> You can build the entire Cygwin tree on Linux.

That misses the point.  I didn’t have a winsup build system in place, and didn’t want to spend the 1-2 hours it would have taken to reestablish one.

I tried building the manuals on Mac OS X before sending that first patch, but my package manager of choice doesn’t have dblatex yet.

I ended up rebuilding the environment on my Windows 10 test VM.  So, this problem hopefully won’t recur, since this test VM is likely to be promoted to the final version of 10 when it comes out.

> I'm lazy…

Yes, you are *such* a slug. :)

It’s applied.
--
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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 22:51                       ` Warren Young
@ 2015-02-17 23:22                         ` Corinna Vinschen
  0 siblings, 0 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-17 23:22 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

On Feb 17 15:40, Warren Young wrote:
> > On Feb 17, 2015, at 2:12 PM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> > 
> > On Feb 17 11:57, Warren Young wrote:
> >> 
> >> 
> >> I tried, but I’ve retired the last Windows machine I used to build
> >> winsup previously, and I didn’t want to rebuild the Cygwin build
> >> environment on the VM that replaced it just to test the patch.
> > 
> > You can build the entire Cygwin tree on Linux.
> 
> That misses the point.  I didn’t have a winsup build system in place, and didn’t want to spend the 1-2 hours it would have taken to reestablish one.
> 
> I tried building the manuals on Mac OS X before sending that first patch, but my package manager of choice doesn’t have dblatex yet.
> 
> I ended up rebuilding the environment on my Windows 10 test VM.  So, this problem hopefully won’t recur, since this test VM is likely to be promoted to the final version of 10 when it comes out.
> 
> > I'm lazy…
> 
> Yes, you are *such* a slug. :)

Yeah, that's me.

> It’s applied.

Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 18:53           ` Dennis Hagarty (dehagart)
@ 2015-02-18 11:18             ` Andrey Repin
  2015-02-18 11:56               ` Dennis Hagarty (dehagart)
  0 siblings, 1 reply; 65+ messages in thread
From: Andrey Repin @ 2015-02-18 11:18 UTC (permalink / raw)
  To: Dennis Hagarty (dehagart), cygwin

Greetings, Dennis Hagarty (dehagart)!

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

> After I'd run the id -znG, it found 87 groups.
> Then I did this (even with cygserver running)

> ~ getent passwd $(id -u) > /etc/passwd
> ~ getent group $(id -G) > /etc/group
>       0 [main] getent 48156 transport_layer_pipes::connect: lost connection to cygserver, error = 2

That prompts to repeat the previous question from Corinna: are you by chance
remote from your DC? (VPN connection?)

> ~ wc -l /etc/group
> 58 /etc/group

> Since it seems like cygserver stopped, it took a while to complete.
> Anyway, with cygserver stopped, I ran the getent again elevated and got 83.
> ~ wc -l /etc/group
> 83 /etc/group

83 vs. 87, still not the right number.

> Not really sure how many groups I'm a member of (in another tool), but seems about right.

Anyway, how was the results after these manipulations?


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 18.02.2015, <13:41>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-17 14:50       ` Dennis Hagarty (dehagart)
  2015-02-17 16:33         ` Corinna Vinschen
  2015-02-17 17:59         ` Andrey Repin
@ 2015-02-18 11:27         ` Corinna Vinschen
  2015-02-18 12:48           ` Dennis Hagarty (dehagart)
  2 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-18 11:27 UTC (permalink / raw)
  To: cygwin; +Cc: Dennis Hagarty (dehagart)

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

Hi Dennis,

On Feb 17 10:23, Dennis Hagarty (dehagart) wrote:
> >> 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.

You didn't reply to my suggestions.  But, anyway.  Due to the nice
report in https://cygwin.com/ml/cygwin/2015-02/msg00511.html I now
came up with a new Cygwin test release 1.7.35-0.3, see
https://cygwin.com/ml/cygwin-announce/2015-02/msg00133.html

Can you please try this test version without cygserver, and with
the passwd and group settings in /etc/nsswitch.conf set to

  passwd: db
  group: db

It would be very interesting to know if this improves the situation for
you.


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-18 11:18             ` Andrey Repin
@ 2015-02-18 11:56               ` Dennis Hagarty (dehagart)
  2015-02-18 14:25                 ` Andrey Repin
  0 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-18 11:56 UTC (permalink / raw)
  To: cygwin

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

>> After I'd run the id -znG, it found 87 groups.
>> Then I did this (even with cygserver running)

>> ~ getent passwd $(id -u) > /etc/passwd
>> ~ getent group $(id -G) > /etc/group
>>       0 [main] getent 48156 transport_layer_pipes::connect: lost connection to cygserver, error = 2

>That prompts to repeat the previous question from Corinna: are you by chance
>remote from your DC? (VPN connection?)

Yes - although it's pretty quick link (and not the other side of the world).
Seems to be a node called  \\ADC-AER1-C1-2 

Pinging adc-aer1-c1-2.cisco.com [173.xx.xxx.xxx] with 32 bytes of data:
Reply from 173.38.200.156: bytes=32 time=36ms TTL=124
Reply from 173.38.200.156: bytes=32 time=44ms TTL=124
Reply from 173.38.200.156: bytes=32 time=37ms TTL=124
Reply from 173.38.200.156: bytes=32 time=56ms TTL=124


>> ~ wc -l /etc/group
>> 58 /etc/group
>
>> Since it seems like cygserver stopped, it took a while to complete.
>> Anyway, with cygserver stopped, I ran the getent again elevated and got 83.
>> ~ wc -l /etc/group
>> 83 /etc/group
>
>83 vs. 87, still not the right number.
>
>> Not really sure how many groups I'm a member of (in another tool), but seems about right.

>Anyway, how was the results after these manipulations?

Performance now is good - as long as the cygserver is running.
With:
>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
12:13:43.53
12:13:43.65 = 0:00.12

Without:
C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
12:14:36.28
12:16:24.85 = 1:48.57

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-17 16:33         ` Corinna Vinschen
@ 2015-02-18 12:20           ` Dennis Hagarty (dehagart)
  0 siblings, 0 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-18 12:20 UTC (permalink / raw)
  To: cygwin

Hi Corinna,

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

I seem to get a couple of answers (see my response to Andrey).
I just ran it now and got 83 lines - it took a few mins.

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

About 1/10 of the second.

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

Ok, running 1.7.35-0.2

cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
12:31:08.46
12:31:09.93 = 0:01.47

Settings = Both = "db"
About 1.65 seconds

Settings = group = "db", passwd = "files db"
About 1.65 seconds

Settings = group = "files db", passwd = "db"
About 1.50 seconds

Settings = group = "files db", passwd = "files db"
About 1.45 seconds

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

Yes, I can do that.


^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-18 11:27         ` Corinna Vinschen
@ 2015-02-18 12:48           ` Dennis Hagarty (dehagart)
  2015-02-18 13:10             ` Corinna Vinschen
  0 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-18 12:48 UTC (permalink / raw)
  To: cygwin

Hi Corinna,

> You didn't reply to my suggestions.  But, anyway.  Due to the nice
>report in https://cygwin.com/ml/cygwin/2015-02/msg00511.html I now
>came up with a new Cygwin test release 1.7.35-0.3, see
>https://cygwin.com/ml/cygwin-announce/2015-02/msg00133.html

Sorry, maybe I got a bit confused - didn't mean to :-)
I replied to your previous entry just now.

It turns out that I can get the same info from Windows with:
Cmd> gpresult /R
And I have 83 items in my security group list - so 83 is correct.

>Can you please try this test version without cygserver, and with
>the passwd and group settings in /etc/nsswitch.conf set to
>
>  passwd: db
>  group: db

> It would be very interesting to know if this improves the situation for you.

Just did it for 1.7.35-0.2 - I haven't seen 0.3 turn up at a mirror site yet.

Cheers
Dennis



^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-18 12:48           ` Dennis Hagarty (dehagart)
@ 2015-02-18 13:10             ` Corinna Vinschen
  2015-02-19 10:56               ` Dennis Hagarty (dehagart)
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-18 13:10 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

On Feb 18 11:56, Dennis Hagarty (dehagart) wrote:
> Hi Corinna,
> 
> > You didn't reply to my suggestions.  But, anyway.  Due to the nice
> >report in https://cygwin.com/ml/cygwin/2015-02/msg00511.html I now
> >came up with a new Cygwin test release 1.7.35-0.3, see
> >https://cygwin.com/ml/cygwin-announce/2015-02/msg00133.html
> 
> Sorry, maybe I got a bit confused - didn't mean to :-)
> I replied to your previous entry just now.
> 
> It turns out that I can get the same info from Windows with:
> Cmd> gpresult /R
> And I have 83 items in my security group list - so 83 is correct.
> 
> >Can you please try this test version without cygserver, and with
> >the passwd and group settings in /etc/nsswitch.conf set to
> >
> >  passwd: db
> >  group: db
> 
> > It would be very interesting to know if this improves the situation for you.
> 
> Just did it for 1.7.35-0.2 - I haven't seen 0.3 turn up at a mirror site yet.

It's only just uploaded so it might take another while, depending
on your mirrors.  According to Roger's results in
https://cygwin.com/ml/cygwin/2015-02/msg00511.html and
https://cygwin.com/ml/cygwin/2015-02/msg00543.html, the real problem
hadn't been fixed in the 0.2 test release, so you might give 0.3
another chance.


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-18 11:56               ` Dennis Hagarty (dehagart)
@ 2015-02-18 14:25                 ` Andrey Repin
  2015-02-18 14:35                   ` Dennis Hagarty (dehagart)
  0 siblings, 1 reply; 65+ messages in thread
From: Andrey Repin @ 2015-02-18 14:25 UTC (permalink / raw)
  To: Dennis Hagarty (dehagart), cygwin

Greetings, Dennis Hagarty (dehagart)!

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

>>> After I'd run the id -znG, it found 87 groups.
>>> Then I did this (even with cygserver running)

>>> ~ getent passwd $(id -u) > /etc/passwd
>>> ~ getent group $(id -G) > /etc/group
>>>       0 [main] getent 48156 transport_layer_pipes::connect: lost connection to cygserver, error = 2

>>That prompts to repeat the previous question from Corinna: are you by chance
>>remote from your DC? (VPN connection?)

> Yes - although it's pretty quick link (and not the other side of the world).
> Seems to be a node called  \\ADC-AER1-C1-2 

> Pinging adc-aer1-c1-2.cisco.com [173.xx.xxx.xxx] with 32 bytes of data:
> Reply from 173.38.200.156: bytes=32 time=36ms TTL=124
> Reply from 173.38.200.156: bytes=32 time=44ms TTL=124
> Reply from 173.38.200.156: bytes=32 time=37ms TTL=124
> Reply from 173.38.200.156: bytes=32 time=56ms TTL=124


>>> ~ wc -l /etc/group
>>> 58 /etc/group
>>
>>> Since it seems like cygserver stopped, it took a while to complete.
>>> Anyway, with cygserver stopped, I ran the getent again elevated and got 83.
>>> ~ wc -l /etc/group
>>> 83 /etc/group
>>
>>83 vs. 87, still not the right number.
>>
>>> Not really sure how many groups I'm a member of (in another tool), but seems about right.

>>Anyway, how was the results after these manipulations?

> Performance now is good - as long as the cygserver is running.
> With:
>>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
> 12:13:43.53
> 12:13:43.65 = 0:00.12

> Without:
> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
> 12:14:36.28
> 12:16:24.85 = 1:48.57

Thank you. Not the results I was hoping for, but thank you anyway.
Please continue investigation with Corinna.
And be sure your help is much appreciated :)


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 18.02.2015, <16:40>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-18 14:25                 ` Andrey Repin
@ 2015-02-18 14:35                   ` Dennis Hagarty (dehagart)
  0 siblings, 0 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-18 14:35 UTC (permalink / raw)
  To: cygwin

Thanks for your assistance Andrey...

I/we use this tool every day and we really take for granted how much effort people put into making it work.

I'm checking the mirror every little while to see when .0.3 pops up.

Cheers
Dennis 

-----Original Message-----
From: Andrey Repin [mailto:anrdaemon@yandex.ru] 
Sent: Wednesday, 18 February 2015 14:42
To: Dennis Hagarty (dehagart); cygwin@cygwin.com
Subject: Re: Very slow Cygwin startup on Windows 7

Greetings, Dennis Hagarty (dehagart)!

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

>>> After I'd run the id -znG, it found 87 groups.
>>> Then I did this (even with cygserver running)

>>> ~ getent passwd $(id -u) > /etc/passwd
>>> ~ getent group $(id -G) > /etc/group
>>>       0 [main] getent 48156 transport_layer_pipes::connect: lost connection to cygserver, error = 2

>>That prompts to repeat the previous question from Corinna: are you by chance
>>remote from your DC? (VPN connection?)

> Yes - although it's pretty quick link (and not the other side of the world).
> Seems to be a node called  \\ADC-AER1-C1-2 

> Pinging adc-aer1-c1-2.cisco.com [173.xx.xxx.xxx] with 32 bytes of data:
> Reply from 173.38.200.156: bytes=32 time=36ms TTL=124
> Reply from 173.38.200.156: bytes=32 time=44ms TTL=124
> Reply from 173.38.200.156: bytes=32 time=37ms TTL=124
> Reply from 173.38.200.156: bytes=32 time=56ms TTL=124


>>> ~ wc -l /etc/group
>>> 58 /etc/group
>>
>>> Since it seems like cygserver stopped, it took a while to complete.
>>> Anyway, with cygserver stopped, I ran the getent again elevated and got 83.
>>> ~ wc -l /etc/group
>>> 83 /etc/group
>>
>>83 vs. 87, still not the right number.
>>
>>> Not really sure how many groups I'm a member of (in another tool), but seems about right.

>>Anyway, how was the results after these manipulations?

> Performance now is good - as long as the cygserver is running.
> With:
>>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
> 12:13:43.53
> 12:13:43.65 = 0:00.12

> Without:
> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
> 12:14:36.28
> 12:16:24.85 = 1:48.57

Thank you. Not the results I was hoping for, but thank you anyway.
Please continue investigation with Corinna.
And be sure your help is much appreciated :)


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 18.02.2015, <16:40>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-18 13:10             ` Corinna Vinschen
@ 2015-02-19 10:56               ` Dennis Hagarty (dehagart)
  2015-02-19 12:15                 ` Corinna Vinschen
  0 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-19 10:56 UTC (permalink / raw)
  To: cygwin

Hi Corinna,

>>>Can you please try this test version without cygserver, and with
>>>the passwd and group settings in /etc/nsswitch.conf set to
>>>
>>>  passwd: db
>>>  group: db
>> 
>>> It would be very interesting to know if this improves the situation for you.
>> 
>> Just did it for 1.7.35-0.2 - I haven't seen 0.3 turn up at a mirror site yet.

>It's only just uploaded so it might take another while, depending
>on your mirrors.  According to Roger's results in
>https://cygwin.com/ml/cygwin/2015-02/msg00511.html and
>https://cygwin.com/ml/cygwin/2015-02/msg00543.html, the real problem
>hadn't been fixed in the 0.2 test release, so you might give 0.3
>another chance.

BTW - I did try ADInsight, but it didn't show me anything (maybe because this is a 64 bit windows?)

Anyway, I ran it with 0.3 and nsswitch = db and the result is???

1.68-1.72 seconds

With nsswitch = files db it was 1.43-1.45 seconds.

With nsswitch = files it was 0.13-0.14 seconds

(It seems basically the same as 0.2)

Regards
Dennis


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-19 10:56               ` Dennis Hagarty (dehagart)
@ 2015-02-19 12:15                 ` Corinna Vinschen
  2015-02-20  0:30                   ` Dennis Hagarty (dehagart)
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-19 12:15 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

On Feb 19 09:49, Dennis Hagarty (dehagart) wrote:
> Hi Corinna,
> 
> >>>Can you please try this test version without cygserver, and with
> >>>the passwd and group settings in /etc/nsswitch.conf set to
> >>>
> >>>  passwd: db
> >>>  group: db
> >> 
> >>> It would be very interesting to know if this improves the situation for you.
> >> 
> >> Just did it for 1.7.35-0.2 - I haven't seen 0.3 turn up at a mirror site yet.
> 
> >It's only just uploaded so it might take another while, depending
> >on your mirrors.  According to Roger's results in
> >https://cygwin.com/ml/cygwin/2015-02/msg00511.html and
> >https://cygwin.com/ml/cygwin/2015-02/msg00543.html, the real problem
> >hadn't been fixed in the 0.2 test release, so you might give 0.3
> >another chance.
> 
> BTW - I did try ADInsight, but it didn't show me anything (maybe because this is a 64 bit windows?)
> 
> Anyway, I ran it with 0.3 and nsswitch = db and the result is???
> 
> 1.68-1.72 seconds

Hmm.  No offense, but are you sure you ran this with 0.3?

> With nsswitch = files db it was 1.43-1.45 seconds.
> 
> With nsswitch = files it was 0.13-0.14 seconds
> 
> (It seems basically the same as 0.2)

It would be pretty helpful to get an idea what's so slow in your case.
Either you get ADInsight working, or...  is it ok if I send you a link
to a debug-augmented DLL via PM?


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-19 12:15                 ` Corinna Vinschen
@ 2015-02-20  0:30                   ` Dennis Hagarty (dehagart)
  2015-02-20 16:30                     ` Corinna Vinschen
  2015-02-21 21:18                     ` Roger Orr
  0 siblings, 2 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-20  0:30 UTC (permalink / raw)
  To: cygwin

Hi Corinna,
 
>>>>>Can you please try this test version without cygserver, and with
>>>>>the passwd and group settings in /etc/nsswitch.conf set to
>>>>>
>>>>>  passwd: db
>>>>>  group: db
>>>> 
>>>>> It would be very interesting to know if this improves the situation for you.
>>>> 
>>>> Just did it for 1.7.35-0.2 - I haven't seen 0.3 turn up at a mirror site yet.
>> 
>>>It's only just uploaded so it might take another while, depending
>>>on your mirrors.  According to Roger's results in
>>>https://cygwin.com/ml/cygwin/2015-02/msg00511.html and
>>>https://cygwin.com/ml/cygwin/2015-02/msg00543.html, the real problem
>>>hadn't been fixed in the 0.2 test release, so you might give 0.3
>>>another chance.
>> 
>> BTW - I did try ADInsight, but it didn't show me anything (maybe because this is a 64 bit windows?)
>> 
>> Anyway, I ran it with 0.3 and nsswitch = db and the result is???
>> 
>> 1.68-1.72 seconds
>
>Hmm.  No offense, but are you sure you ran this with 0.3?

I knew you'd doubt me :-)
CYGWIN_NT-6.1 DEHAGART-WS02 1.7.35(0.286/5/3) 2015-02-18 11:32 x86_64 Cygwin

>> With nsswitch = files db it was 1.43-1.45 seconds.
>> 
>> With nsswitch = files it was 0.13-0.14 seconds
>> 
>> (It seems basically the same as 0.2)

>It would be pretty helpful to get an idea what's so slow in your case.
>Either you get ADInsight working, or...  is it ok if I send you a link
>to a debug-augmented DLL via PM?

Sure.

> Sysinternals "ADInsight" is a 32bit only tool and, in order to work on
> a 64bit Windows you seem to have to manually inject the DLL
> ADInsightDll.dll (which is extracted into %TEMP%) into the target
> (32-bit!) process.

So, it seems ADInsight seems a non-starter - for my skill level anyway.


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-20  0:30                   ` Dennis Hagarty (dehagart)
@ 2015-02-20 16:30                     ` Corinna Vinschen
  2015-02-20 19:56                       ` Andrey Repin
  2015-02-23 23:33                       ` Corinna Vinschen
  2015-02-21 21:18                     ` Roger Orr
  1 sibling, 2 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-20 16:30 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 4307 bytes --]

On Feb 19 19:04, Dennis Hagarty (dehagart) wrote:
> >It would be pretty helpful to get an idea what's so slow in your case.
> >Either you get ADInsight working, or...  is it ok if I send you a link
> >to a debug-augmented DLL via PM?
> 
> Sure.

Thanks for helping debugging, Dennis.

======================================================================
tl;dr synopsis:  There are new snaphots at https://cygwin.com/snapshots/
which introduce a restriction of the time fetching group information
at startup is allowed to take (300ms).  Please give'em a try.
======================================================================

I asked Dennis to run Cygwin's "echo" three times from CMD, no cygserver
running, to get some timing values and to be able to observer OS caching
effects.

First of all, the first call of echo took a bit longer than the followup
calls, because fetching the machine and domain info took longer.  The
info is supposed to be cached on the local machine, but the info is
refreshed in a 15 minute cycle or something like that.  This first call
to fetch this info took 0.3 secs, so maybe your local machine was just
in that refresh cycle.  The same thing in the followup echo calls only
took 9 and 7ms.  Clearly a caching effect.

However, fetching every single group from your token, information which
should be locally available or at least should be quickly available via
the global catalog, takes roughly 40 to 50 ms each.  This adds up quickly
to the 1.4 secs you see as delay running an echo here.

To explain, the idea to fetch all the group info from your user token
was to make sure that the first process in a process tree already had
the entire set of your groups available.  This was based on a complaint
that calling `id' could take a long time.

However, on second thought, this looks like a terrible idea.  40 to 50ms
per group is a hell of a lot of time when fetching lots of group info.
For comparison, in my tiny home network, fetching this info takes
between 2 and 5 ms per group :}

In a second test run I asked Dennis to give me the timing of a startup
and calling `id' with cygserver running.

The results:

- Without cygserver:

  Shell startup:       1.5s
  Calling `id':        0.1s
  Calling `id' again:  0.1s

- With cygserver:

  Shell startup:       0.1s
  Calling `id':        1.5s
  Calling `id' again:  0.1s

The reason for this behaviour is the difference in startup:

- When cygserver is not running, the startup fetches the information for
  all groups in the user token.  Thus the first process (mintty when
  clicking on the desktop icon) takes long, and followup processes have
  the cached information at their leisure.

- When cygserver is running, the startup does not fetch the group
  information (relying on cygserver instead).  Thus, the first call to
  `id' does it instead and takes the long time.  Afterwards, the
  information is cached in cygserver and the next call to `id' is fast.

The first idea was to stop fetching the group info at startup
completely.  But that has the side effect of having an always slow `id'
call, if cygserver isn't running, so it's not exactly clear to me if
that's not just frying pan ==> fire.

So what I did now for testing is to add a timer.  If cygserver is not
running, the startup procedure still fetches the group info from the
user's token... but if it couldn't finish the job within 300ms, it
just stops collecting this information and moves on.

That should have a "mixed" effect in slow scenarios.  The startup will
not take longer than about 300ms, so it's comparatively fast from a
human perspective, but it will not entirely give up on collecting group
information so subsequent calls fetching group info will be faster.

The value itself, 300ms, is disputable, of course.  I just chose it from
my gut feeling.  If this method is a usable compromise, maybe 400 or
500ms is good enough, I don't know.

I uploaded new developer snapshots containing this change to

  https://cygwin.com/snapshots/

Please give them a try.


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-20 16:30                     ` Corinna Vinschen
@ 2015-02-20 19:56                       ` Andrey Repin
  2015-02-20 20:31                         ` Corinna Vinschen
  2015-02-23 23:33                       ` Corinna Vinschen
  1 sibling, 1 reply; 65+ messages in thread
From: Andrey Repin @ 2015-02-20 19:56 UTC (permalink / raw)
  To: Corinna Vinschen, cygwin

Greetings, Corinna Vinschen!

> So what I did now for testing is to add a timer.  If cygserver is not
> running, the startup procedure still fetches the group info from the
> user's token... but if it couldn't finish the job within 300ms, it
> just stops collecting this information and moves on.

> That should have a "mixed" effect in slow scenarios.  The startup will
> not take longer than about 300ms, so it's comparatively fast from a
> human perspective, but it will not entirely give up on collecting group
> information so subsequent calls fetching group info will be faster.

> The value itself, 300ms, is disputable, of course.  I just chose it from
> my gut feeling.  If this method is a usable compromise, maybe 400 or
> 500ms is good enough, I don't know.

If this startup timer does not affect subsequent calls to the same facilities,
and only in effect during initial startup, it can be anything. 300 or 500ms,
not really relevant. I see how you can be a member of 200 groups, and I really
don't see it as bad thing, other than certain administrative tasks may be
slow, but in more common scenario we can expect lower number of groups and
faster response times in general.

> I uploaded new developer snapshots containing this change to

>   https://cygwin.com/snapshots/

> Please give them a try.

I should, like, REALLY get myself together to migrate to samba4 already >.<


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 20.02.2015, <20:43>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-20 19:56                       ` Andrey Repin
@ 2015-02-20 20:31                         ` Corinna Vinschen
  0 siblings, 0 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-20 20:31 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]

On Feb 20 20:50, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> > So what I did now for testing is to add a timer.  If cygserver is not
> > running, the startup procedure still fetches the group info from the
> > user's token... but if it couldn't finish the job within 300ms, it
> > just stops collecting this information and moves on.
> 
> > That should have a "mixed" effect in slow scenarios.  The startup will
> > not take longer than about 300ms, so it's comparatively fast from a
> > human perspective, but it will not entirely give up on collecting group
> > information so subsequent calls fetching group info will be faster.
> 
> > The value itself, 300ms, is disputable, of course.  I just chose it from
> > my gut feeling.  If this method is a usable compromise, maybe 400 or
> > 500ms is good enough, I don't know.
> 
> If this startup timer does not affect subsequent calls to the same facilities,
> and only in effect during initial startup, it can be anything. 300 or 500ms,
> not really relevant. I see how you can be a member of 200 groups, and I really
> don't see it as bad thing, other than certain administrative tasks may be
> slow, but in more common scenario we can expect lower number of groups and
> faster response times in general.
> 
> > I uploaded new developer snapshots containing this change to
> 
> >   https://cygwin.com/snapshots/
> 
> > Please give them a try.
> 
> I should, like, REALLY get myself together to migrate to samba4 already >.<

Or install a Windows 2012R2 DC using the evaluation version:

https://msdn.microsoft.com/en-us/evalcenter/dn205302.aspx


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-20  0:30                   ` Dennis Hagarty (dehagart)
  2015-02-20 16:30                     ` Corinna Vinschen
@ 2015-02-21 21:18                     ` Roger Orr
  1 sibling, 0 replies; 65+ messages in thread
From: Roger Orr @ 2015-02-21 21:18 UTC (permalink / raw)
  To: 'Dennis Hagarty (dehagart)', cygwin


> > Sysinternals "ADInsight" is a 32bit only tool and, in order to work on
> > a 64bit Windows you seem to have to manually inject the DLL
> > ADInsightDll.dll (which is extracted into %TEMP%) into the target
> > (32-bit!) process.

> So, it seems ADInsight seems a non-starter - for my skill level anyway.

In case it helps you, or another reader of the list, here is a simple
program that injects a named dll into a target process.

Example of using it to examine the ldap calls for cygwin's "echo.exe":

- Compile as a 32-bit program using *32bit* cygwin (as ADInsight is a 32bit
process): g++ inject.cpp -o inject.exe
- Start ADInsight from SysInternals
- Start Windows command shell
- Invoke: inject.exe %TEMP%\ADInsightDll.dll c:\cygwin\bin\echo.exe hello

Regards,
Roger.

----- inject.cpp -----
/*
NAME
    Inject.cpp

DESCRIPTION
    Inject a DLL into another process

COPYRIGHT
    Copyright (C) 2002,2015 by Roger Orr <rogero@howzatt.demon.co.uk>

    This software is distributed in the hope that it will be useful, but
    without WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Permission is granted to anyone to make or distribute verbatim
    copies of this software provided that the copyright notice and
    this permission notice are preserved, and that the distributor
    grants the recipient permission for further distribution as permitted
    by this notice.

    Comments and suggestions are always welcome.
    Please report bugs to rogero@howzatt.demon.co.uk.

EXAMPLE
    Inject MyDll fred.exe
*/

#include <windows.h>

#include <string>
#include <iostream>

//////////////////////////////////////////////////////////////////////////
// Local functions
int CreateProcessHelper(char ** it, char ** end, HANDLE & hProcess,
    HANDLE & hThread);
int InjectDLL(std::string const &dllName, HANDLE hProcess);

//////////////////////////////////////////////////////////////////////////
int main(int argc, char **argv)
{
    if (argc < 3)
    {
        std::cerr << "Syntax: inject <dllname> <progname>" << std::endl;
        return 1;
    }

    std::string const dllName = argv[1];
    std::string const progName = argv[2];

    HANDLE hProcess = 0;
    HANDLE hThread = 0;
    if (CreateProcessHelper(argv+2, argv+argc, hProcess, hThread) != 0)
    {
        return 1;
    }

    if (InjectDLL(dllName, hProcess) != 0)
    {
        TerminateProcess(hProcess, GetLastError());
        return 1;
    }

    // resume the created process once we've loaded the DLL
    if (::ResumeThread(hThread) == (DWORD)-1)
    {
        std::cout << "ResumeThread failed with " << GetLastError()
            << std::endl;
        return 1;
    }

    DWORD ret = ::WaitForSingleObject(hProcess, INFINITE);
    if (ret == WAIT_OBJECT_0)
    {
        DWORD exitCode;
        if (GetExitCodeProcess(hProcess, &exitCode))
        {
            std::cout << "Process " << progName << " terminated: "
                 "return code: " << exitCode << std::endl;
            ret = exitCode;
        }
        else
        {
            ret = GetLastError();
            std::cout << "Process terminated: return code unavailable: "
                << ret << std::endl;
        }
    }
    else if (ret == WAIT_FAILED)
    {
        std::cout << "Process wait failed: " << GetLastError() << std::endl;
    }
    else
    {
        std::cout << "Process wait failed: " << ret << std::endl;
    }

    return ret;
}

//////////////////////////////////////////////////////////////////////////
// Inject DLL 'dllName' into process 'hProcess'
int InjectDLL(std::string const &dllName, HANDLE hProcess)
{
    LPTHREAD_START_ROUTINE lpStartAddress = 0;

    // Create memory in target process
    LPVOID const chDllName = VirtualAllocEx(hProcess, 0, dllName.size() + 1,
        MEM_COMMIT, PAGE_READWRITE);
    if (chDllName == 0)
    {
        std::cerr << "VirtualAllocEx failed: " << GetLastError()
            << std::endl;
        return 1;
    }

    // Map into my process
    if (! WriteProcessMemory(hProcess, chDllName,
        dllName.c_str(), dllName.size()+1, 0))
    {
        std::cerr << "WriteProcessMemory failed: " << GetLastError()
            << std::endl;
        return 1;
    }

    lpStartAddress = (LPTHREAD_START_ROUTINE)LoadLibrary;

    // Start a remote thread, at LoadLibraryA in the target process
    // Note we assume KERNEL32 has a fixed load address
    DWORD threadId(0);
    HANDLE const hRemoteThread = CreateRemoteThread(hProcess, 0, 0,
        lpStartAddress, chDllName, 0, &threadId);
    if (hRemoteThread == 0)
    {
        std::cerr << "CreateRemoteThread failed: " << GetLastError()
            << std::endl;
        return 1;
    }

    WaitForSingleObject(hRemoteThread, 10000);
    DWORD exitCode;
    if (! GetExitCodeThread(hRemoteThread, &exitCode))
    {
        std::cerr << "GetExitCodeThread failed: " << GetLastError()
            << std::endl;
        return 1;
    }

    if (exitCode == STILL_ACTIVE)
    {
        std::cout << "Remote thread still running..." << std::endl;
        return 1;
    }
    else if (exitCode == 0)
    {
        std::cout << "Remote thread failed to load DLL" << std::endl;
        return 1;
    }

    // Tidy up the allocated memory.
    if (! VirtualFreeEx(hProcess, chDllName, 0, MEM_RELEASE))
    {
        std::cout << "Warning: unable to free memory in target process: "
            << GetLastError() << std::endl;
    }

    return 0;
}

//////////////////////////////////////////////////////////////////////////
// Wrapper for create process.
int CreateProcessHelper(
    char ** it,
    char ** end,
    HANDLE &hProcess,
    HANDLE &hThread)
{
    char * executable = *it;

    // Search for possible executable matching the program name
    char szFullName[ MAX_PATH ];
    if (0 != SearchPath(0, executable, ".exe",
        sizeof(szFullName), szFullName, 0))
        executable = szFullName;
    
    std::string cmdLine;
    for (; it != end; ++it)
    {
        std::string curr(*it);

        if (cmdLine.length())
            cmdLine += " ";

        if (curr.find(' ') != std::string::npos)
        {
            cmdLine += '"';
            cmdLine += curr;
            cmdLine += '"';
        }
        else
        {
            cmdLine += curr;
        }
    }

    STARTUPINFO startupInfo = { sizeof(startupInfo) };
    startupInfo.dwFlags = STARTF_USESHOWWINDOW;
    startupInfo.wShowWindow = SW_SHOWNORMAL; // Assist GUI programs
    PROCESS_INFORMATION procInfo;

    if (! CreateProcess(executable, const_cast<char*>(cmdLine.c_str()),
        0, 0, TRUE, CREATE_SUSPENDED, 0, 0, &startupInfo, & procInfo))
    {
        std::cout << "CreateProcess for " << executable << " failed: "
            << GetLastError() << std::endl;
        return 1;
    }

    hProcess = procInfo.hProcess;
    hThread = procInfo.hThread;
    return 0;
}
----- ends -----



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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-20 16:30                     ` Corinna Vinschen
  2015-02-20 19:56                       ` Andrey Repin
@ 2015-02-23 23:33                       ` Corinna Vinschen
  2015-02-24 13:30                         ` John Ruckstuhl
                                           ` (2 more replies)
  1 sibling, 3 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-23 23:33 UTC (permalink / raw)
  To: cygwin; +Cc: Dennis Hagarty (dehagart)

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

Hi Dennis,

On Feb 20 17:20, Corinna Vinschen wrote:
> On Feb 19 19:04, Dennis Hagarty (dehagart) wrote:
> > >It would be pretty helpful to get an idea what's so slow in your case.
> > >Either you get ADInsight working, or...  is it ok if I send you a link
> > >to a debug-augmented DLL via PM?
> > 
> > Sure.
> 
> Thanks for helping debugging, Dennis.

I have another one for testing.  I rewrote the function fetching all the
group information for the groups in your user token, the one which is
mainly responsible for the 1.4 secs startup time.

In theory the performance improvement should be pretty noticable, even
with /etc/nsswitch.conf only using the "db" setting for groups.  In a
bigger environment with a user token of 150 groups, the time this
function took was reduced from ~300ms to ~50ms so I have high hopes.

Can you test this again with the Cygwin DLL from the latest developer
snaphshot at https://cygwin.com/snapshots/ please? 


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-23 23:33                       ` Corinna Vinschen
@ 2015-02-24 13:30                         ` John Ruckstuhl
  2015-02-24 14:16                           ` Corinna Vinschen
  2015-02-24 15:20                         ` Dennis Hagarty (dehagart)
  2015-02-24 15:29                         ` Dennis Hagarty (dehagart)
  2 siblings, 1 reply; 65+ messages in thread
From: John Ruckstuhl @ 2015-02-24 13:30 UTC (permalink / raw)
  To: cygwin

Wow I really hoped to contribute with something that seemed -- to me
-- salient... an strace of my 5 minute bash startup under 1.7.34, due
to 70+ SLOW lookups w/ exceptions (all 4.0-4.1 seconds).
But for the life of me I can't get past the spamfilter.

([main] bash 8308 pwdgrp::fetch_account_from_windows: line: ...)

John

On Mon, Feb 23, 2015 at 1:15 PM, Corinna Vinschen <...> wrote:
> Hi Dennis,
>
> On Feb 20 17:20, Corinna Vinschen wrote:
>> On Feb 19 19:04, Dennis Hagarty (dehagart) wrote:
>> > >It would be pretty helpful to get an idea what's so slow in your case.
>> > >Either you get ADInsight working, or...  is it ok if I send you a link
>> > >to a debug-augmented DLL via PM?
>> >
>> > Sure.
>>
>> Thanks for helping debugging, Dennis.
>
> I have another one for testing.  I rewrote the function fetching all the
> group information for the groups in your user token, the one which is
> mainly responsible for the 1.4 secs startup time.
>
> In theory the performance improvement should be pretty noticable, even
> with /etc/nsswitch.conf only using the "db" setting for groups.  In a
> bigger environment with a user token of 150 groups, the time this
> function took was reduced from ~300ms to ~50ms so I have high hopes.
>
> Can you test this again with the Cygwin DLL from the latest developer
> snaphshot at https://cygwin.com/snapshots/ please?
>
>
> Thanks,
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Maintainer                 cygwin AT cygwin DOT com
> Red Hat

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-24 13:30                         ` John Ruckstuhl
@ 2015-02-24 14:16                           ` Corinna Vinschen
  0 siblings, 0 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-24 14:16 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

On Feb 23 20:33, John Ruckstuhl wrote:
> Wow I really hoped to contribute with something that seemed -- to me
> -- salient... an strace of my 5 minute bash startup under 1.7.34, due
> to 70+ SLOW lookups w/ exceptions (all 4.0-4.1 seconds).
> But for the life of me I can't get past the spamfilter.

Can you test 1.7.35-0.3 or, even better, the latest snapshot from
https://cygwin.com/snapshots/?  You don't need to send an strace, just
describe what's going on for a start.   For instance, what's your
environment look like?  4 secs per group asking your DC sounds rather
excessive, even for 1.7.34...


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-23 23:33                       ` Corinna Vinschen
  2015-02-24 13:30                         ` John Ruckstuhl
@ 2015-02-24 15:20                         ` Dennis Hagarty (dehagart)
  2015-02-24 15:22                           ` Corinna Vinschen
  2015-02-24 15:29                         ` Dennis Hagarty (dehagart)
  2 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-24 15:20 UTC (permalink / raw)
  To: cygwin

Hi Corinna,

Using x86_64/cygwin1-20150223.dll.xz??

~ uname -a
CYGWIN_NT-6.1 DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38 x86_64 Cygwin

~ cat /etc/nsswitch.conf
passwd: db
group: db

First manual start of bash shell *seemed* to take slightly longer than before and slightly longer than files db setting.
But anyway, the timed results show this:

cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"

C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:01.74	
14:22:02.56	00:00.82
	
C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:07.10	
14:22:07.27	00:00.17
	
C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:08.99	
14:22:09.16	00:00.17
	
C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:10.72	
14:22:10.89	00:00.17

I.e. significantly better.
Regards
Dennis

-----Original Message-----

Hi Dennis,

On Feb 20 17:20, Corinna Vinschen wrote:
> On Feb 19 19:04, Dennis Hagarty (dehagart) wrote:
> > >It would be pretty helpful to get an idea what's so slow in your case.
> > >Either you get ADInsight working, or...  is it ok if I send you a link
> > >to a debug-augmented DLL via PM?
> > 
> > Sure.
> 
> Thanks for helping debugging, Dennis.

I have another one for testing.  I rewrote the function fetching all the
group information for the groups in your user token, the one which is
mainly responsible for the 1.4 secs startup time.

In theory the performance improvement should be pretty noticable, even
with /etc/nsswitch.conf only using the "db" setting for groups.  In a
bigger environment with a user token of 150 groups, the time this
function took was reduced from ~300ms to ~50ms so I have high hopes.

Can you test this again with the Cygwin DLL from the latest developer
snaphshot at https://cygwin.com/snapshots/ please? 


Thanks,
Corinna

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-24 15:20                         ` Dennis Hagarty (dehagart)
@ 2015-02-24 15:22                           ` Corinna Vinschen
  2015-02-24 19:47                             ` Dennis Hagarty (dehagart)
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-24 15:22 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

On Feb 24 13:30, Dennis Hagarty (dehagart) wrote:
> Hi Corinna,
> 
> Using x86_64/cygwin1-20150223.dll.xz??
> 
> ~ uname -a
> CYGWIN_NT-6.1 DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38 x86_64 Cygwin
> 
> ~ cat /etc/nsswitch.conf
> passwd: db
> group: db
> 
> First manual start of bash shell *seemed* to take slightly longer than before and slightly longer than files db setting.
> But anyway, the timed results show this:
> 
> cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
> 
> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
> 14:22:01.74	
> 14:22:02.56	00:00.82
> 	
> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
> 14:22:07.10	
> 14:22:07.27	00:00.17
> 	
> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
> 14:22:08.99	
> 14:22:09.16	00:00.17
> 	
> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
> 14:22:10.72	
> 14:22:10.89	00:00.17
> 
> I.e. significantly better.

Excellent!  Is that something you can live with, including the
occassional longer time(*)?

(*) Which is probably some background effect, probably mostly to do with
    OS caching stuff.


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-23 23:33                       ` Corinna Vinschen
  2015-02-24 13:30                         ` John Ruckstuhl
  2015-02-24 15:20                         ` Dennis Hagarty (dehagart)
@ 2015-02-24 15:29                         ` Dennis Hagarty (dehagart)
  2015-02-24 18:37                           ` Corinna Vinschen
  2 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-24 15:29 UTC (permalink / raw)
  To: cygwin

Hi,

With Roger's very patient help, I was able to get ADInsight capturing information.

I did a run with the original dll under 32 bit Cygwin running a 32 bit program (echo).

Output and all possible reports (in html) from the tool are here:
https://dl.dropboxusercontent.com/u/33069639/ADInsight.tar.gz 

This 32 bit version is the original slower version (takes a few mins to open a window):
CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.34(0.285/5/3) 2015-02-04 12:12 i686 Cygwin 

So I downloaded the snapshot DLL for 32 bits and did it again:
CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38 i686 Cygwin

But this time I wasn't able to get any output on the ADInsight (scratches head)
But the task runs within a second rather than the many minutes from the original version.

Thanks and Regards
Dennis

-----Original Message-----
Hi Corinna,

Using x86_64/cygwin1-20150223.dll.xz??

~ uname -a
CYGWIN_NT-6.1 DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38 x86_64 Cygwin

~ cat /etc/nsswitch.conf
passwd: db
group: db

First manual start of bash shell *seemed* to take slightly longer than before and slightly longer than files db setting.
But anyway, the timed results show this:

cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"

C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:01.74	
14:22:02.56	00:00.82
	
C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:07.10	
14:22:07.27	00:00.17
	
C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:08.99	
14:22:09.16	00:00.17
	
C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
14:22:10.72	
14:22:10.89	00:00.17

I.e. significantly better.
Regards
Dennis

-----Original Message-----

Hi Dennis,

On Feb 20 17:20, Corinna Vinschen wrote:
> On Feb 19 19:04, Dennis Hagarty (dehagart) wrote:
> > >It would be pretty helpful to get an idea what's so slow in your case.
> > >Either you get ADInsight working, or...  is it ok if I send you a link
> > >to a debug-augmented DLL via PM?
> > 
> > Sure.
> 
> Thanks for helping debugging, Dennis.

I have another one for testing.  I rewrote the function fetching all the
group information for the groups in your user token, the one which is
mainly responsible for the 1.4 secs startup time.

In theory the performance improvement should be pretty noticable, even
with /etc/nsswitch.conf only using the "db" setting for groups.  In a
bigger environment with a user token of 150 groups, the time this
function took was reduced from ~300ms to ~50ms so I have high hopes.

Can you test this again with the Cygwin DLL from the latest developer
snaphshot at https://cygwin.com/snapshots/ please? 


Thanks,
Corinna

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-24 15:29                         ` Dennis Hagarty (dehagart)
@ 2015-02-24 18:37                           ` Corinna Vinschen
  2015-02-25 15:17                             ` J. David Boyd
  0 siblings, 1 reply; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-24 18:37 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]

On Feb 24 14:46, Dennis Hagarty (dehagart) wrote:
> Hi,
> 
> With Roger's very patient help, I was able to get ADInsight capturing
> information.
> 
> I did a run with the original dll under 32 bit Cygwin running a 32 bit
> program (echo).
> 
> Output and all possible reports (in html) from the tool are here:
> https://dl.dropboxusercontent.com/u/33069639/ADInsight.tar.gz 
> 
> This 32 bit version is the original slower version (takes a few mins
> to open a window): CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.34(0.285/5/3)
> 2015-02-04 12:12 i686 Cygwin 
> 
> So I downloaded the snapshot DLL for 32 bits and did it again:
> CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38
> i686 Cygwin
> 
> But this time I wasn't able to get any output on the ADInsight
> (scratches head)

Perfectly normal.  When fetching group info, it does not request any
LDAP info now.  In fact, a single LsaLookupSids call for all groups
in your token is all that's required now :)


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* RE: Very slow Cygwin startup on Windows 7
  2015-02-24 15:22                           ` Corinna Vinschen
@ 2015-02-24 19:47                             ` Dennis Hagarty (dehagart)
  0 siblings, 0 replies; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-24 19:47 UTC (permalink / raw)
  To: cygwin

Yep - absolutely.

>> Using x86_64/cygwin1-20150223.dll.xz??
>> 
>> ~ uname -a
>> CYGWIN_NT-6.1 DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38 x86_64 Cygwin
>> 
>> ~ cat /etc/nsswitch.conf
>> passwd: db
>> group: db
>> 
>> First manual start of bash shell *seemed* to take slightly longer than before and slightly longer than files db setting.
>> But anyway, the timed results show this:
>> 
>> cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"
>> 
>> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
>> 14:22:01.74	
>> 14:22:02.56	00:00.82
>> 	
>> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
>> 14:22:07.10	
>> 14:22:07.27	00:00.17
>> 	
>> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
>> 14:22:08.99	
>> 14:22:09.16	00:00.17
>> 	
>> C:\Users\dehagart>cmd /v:on /c "echo !TIME! & C:\cygwin64\bin\mintty.exe /bin/echo "test" & echo !TIME!"	
>> 14:22:10.72	
>> 14:22:10.89	00:00.17
>> 
>> I.e. significantly better.
>
>Excellent!  Is that something you can live with, including the
>occassional longer time(*)?
>
> (*) Which is probably some background effect, probably mostly to do with
>   OS caching stuff.


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-24 18:37                           ` Corinna Vinschen
@ 2015-02-25 15:17                             ` J. David Boyd
  2015-02-25 15:20                               ` Corinna Vinschen
  0 siblings, 1 reply; 65+ messages in thread
From: J. David Boyd @ 2015-02-25 15:17 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen <corinna-cygwin@cygwin.com> writes:

> On Feb 24 14:46, Dennis Hagarty (dehagart) wrote:
>> Hi,
>> 
>> With Roger's very patient help, I was able to get ADInsight capturing
>> information.
>> 
>> I did a run with the original dll under 32 bit Cygwin running a 32 bit
>> program (echo).
>> 
>> Output and all possible reports (in html) from the tool are here:
>> https://dl.dropboxusercontent.com/u/33069639/ADInsight.tar.gz 
>> 
>> This 32 bit version is the original slower version (takes a few mins
>> to open a window): CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.34(0.285/5/3)
>> 2015-02-04 12:12 i686 Cygwin 
>> 
>> So I downloaded the snapshot DLL for 32 bits and did it again:
>> CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38
>> i686 Cygwin
>> 
>> But this time I wasn't able to get any output on the ADInsight
>> (scratches head)
>
> Perfectly normal.  When fetching group info, it does not request any
> LDAP info now.  In fact, a single LsaLookupSids call for all groups
> in your token is all that's required now :)
>
>
> Corinna

I was having slow slow Cygwin startups the last bit of time, then I read
something about using cygserv since that caches something. (I know, very
imprecise, sorry)

Anyway, grabbed cygserv, started it.  Now cygwin starts almost instantly
again.  Might not be what you are talking about, didn't read back through all
these messages.  Just my 2 cents.

Dave



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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-25 15:17                             ` J. David Boyd
@ 2015-02-25 15:20                               ` Corinna Vinschen
  0 siblings, 0 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-25 15:20 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1866 bytes --]

On Feb 25 09:04, J. David Boyd wrote:
> Corinna Vinschen <corinna-cygwin@cygwin.com> writes:
> 
> > On Feb 24 14:46, Dennis Hagarty (dehagart) wrote:
> >> Hi,
> >> 
> >> With Roger's very patient help, I was able to get ADInsight capturing
> >> information.
> >> 
> >> I did a run with the original dll under 32 bit Cygwin running a 32 bit
> >> program (echo).
> >> 
> >> Output and all possible reports (in html) from the tool are here:
> >> https://dl.dropboxusercontent.com/u/33069639/ADInsight.tar.gz 
> >> 
> >> This 32 bit version is the original slower version (takes a few mins
> >> to open a window): CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.34(0.285/5/3)
> >> 2015-02-04 12:12 i686 Cygwin 
> >> 
> >> So I downloaded the snapshot DLL for 32 bits and did it again:
> >> CYGWIN_NT-6.1-WOW DEHAGART-WS02 1.7.35s(0.286/5/3) 20150223 21:02:38
> >> i686 Cygwin
> >> 
> >> But this time I wasn't able to get any output on the ADInsight
> >> (scratches head)
> >
> > Perfectly normal.  When fetching group info, it does not request any
> > LDAP info now.  In fact, a single LsaLookupSids call for all groups
> > in your token is all that's required now :)
> >
> >
> > Corinna
> 
> I was having slow slow Cygwin startups the last bit of time, then I read
> something about using cygserv since that caches something. (I know, very
> imprecise, sorry)
> 
> Anyway, grabbed cygserv, started it.  Now cygwin starts almost instantly
> again.  Might not be what you are talking about, didn't read back through all
> these messages.  Just my 2 cents.

Is not what I'm talking about.  Try the 1.7.35-0.4 test release without
cygserver.  It should be noticably faster now.


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
@ 2015-02-13  8:57 Houder
  0 siblings, 0 replies; 65+ messages in thread
From: Houder @ 2015-02-13  8:57 UTC (permalink / raw)
  To: cygwin

> Greetings, Corinna Vinschen!
[snip[

>> Do you feel up to the task to extend the FAQ entry
>
>> https://cygwin.com/faq/faq.html#faq.using.startup-slow
>
>> with a description of your solution?
>
> I took a liberty to reorder and rewrite it a little.
> Please tell me, if I didn't lost anything in the process.
...

> Andrey Repin (anrdaemon@yandex.ru) 13.02.2015, <02:59>

faq-4.2.html.gz?

Hint: I had to decompress twice ... before legible text appeared.

Henri


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

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Very slow Cygwin startup on Windows 7
  2015-02-09 11:12 Dennis Hagarty (dehagart)
@ 2015-02-09 13:47 ` Corinna Vinschen
  0 siblings, 0 replies; 65+ messages in thread
From: Corinna Vinschen @ 2015-02-09 13:47 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1747 bytes --]

On Feb  9 11:12, Dennis Hagarty (dehagart) wrote:
> Hi,
> 
> I've been a long-time Cygwin user and become quite dependent on it.
> 
> So, I'm in a bit of a pickle since I did an update from a mirror site today, and now my Cygwin window startup takes about 3-4 MINUTES (it was < 2 seconds before).
> 
> I'd been using it and all was well, and then the update seemed to 'do' something which results in this behaviour (there were quite a few updates).
> 
> I have been through the archives and tried what I could find - It's certainly nothing to do with bash completion.
> 
> Login from a remote machine to my Cygwin-enabled device is normal.
> 
> Also, I can start multiple minitty sessions from one Cygwin window and it's almost instantaneous.
> 
> But clicking on the desktop icons requires a multi-minute wait.
> 
> Any ideas where to start?
> The daemons/services seem to be fine. 
> There are no entries in the event log.
> There are no resources being consumed.
> I've taken out my .rc and profiles files and no difference.
> 
> I'm happy to go digging, but I need a pointer of where to dig.

Does changing /etc/nsswitch.conf help?  If the file doesn't exist,
what if you create it and then set the passwd and grouip entries
to

  passwd: files
  group: files

Then start another mintty via the desktop shortcut and see if it
starts faster.

If that's the problem, you seem to have a slow or unusable connection to
your DC.  Unfortunately you stripped almost all usable information from
your cygcheck output, like environment variables, etc.


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Very slow Cygwin startup on Windows 7
@ 2015-02-09 11:12 Dennis Hagarty (dehagart)
  2015-02-09 13:47 ` Corinna Vinschen
  0 siblings, 1 reply; 65+ messages in thread
From: Dennis Hagarty (dehagart) @ 2015-02-09 11:12 UTC (permalink / raw)
  To: cygwin

Hi,

I've been a long-time Cygwin user and become quite dependent on it.

So, I'm in a bit of a pickle since I did an update from a mirror site today, and now my Cygwin window startup takes about 3-4 MINUTES (it was < 2 seconds before).

I'd been using it and all was well, and then the update seemed to 'do' something which results in this behaviour (there were quite a few updates).

I have been through the archives and tried what I could find - It's certainly nothing to do with bash completion.

Login from a remote machine to my Cygwin-enabled device is normal.

Also, I can start multiple minitty sessions from one Cygwin window and it's almost instantaneous.

But clicking on the desktop icons requires a multi-minute wait.

Any ideas where to start?
The daemons/services seem to be fine. 
There are no entries in the event log.
There are no resources being consumed.
I've taken out my .rc and profiles files and no difference.

I'm happy to go digging, but I need a pointer of where to dig.

Here is the output of my cygcheck:

~ cygcheck --sysinfo

Cygwin Configuration Diagnostics
Current System Time: Sat Feb 07 12:59:46 2015

Windows 7 Enterprise Ver 6.1 Build 7601 Service Pack 1

Path:   C:\cygwin64\usr\local\bin
        C:\cygwin64\bin
        C:\Program Files (x86)\WebEx\Productivity Tools
        C:\Windows\system32
        C:\Windows
        C:\Windows\System32\Wbem
        C:\Windows\System32\WindowsPowerShell\v1.0
        C:\Windows\System32\WindowsPowerShell\v1.0
        C:\Program Files (x86)\QuickTime\QTSystem
        C:\Program Files (x86)\GNU\GnuPG\pub

Output from C:\cygwin64\bin\id.exe
UID: 178617(dehagart)               GID: 10513(Domain Users)
10513(Domain Users)                 0(root)
545(Users)                          4(INTERACTIVE)
66049(CONSOLE LOGON)                11(Authenticated Users)
15(This Organization)               4095(CurrentSession)
<<snipped>>
405504(High Mandatory Level)

SysDir: C:\Windows\system32
WinDir: C:\Windows

USER = 'dehagart'
PWD = '/home/dehagart'
HOME = '/home/dehagart'

Use '-r' to scan registry

obcaseinsensitive set to 1

Cygwin installations found in the registry:
  System: Key: e022582115c10879 Path: C:\cygwin64

c:  hd  NTFS    243897Mb  81% CP CS UN PA FC     System
d:  fd  FAT32     1882Mb   5% CP    UN           HAGARTY
f:  cd  UDF         24Mb 100% CP CS UN           WD Unlocker
g:  hd  NTFS    715370Mb  54% CP CS UN PA FC     Blue Passport

C:\cygwin64      /          system  binary,auto
C:\cygwin64\bin  /usr/bin   system  binary,auto
C:\cygwin64\lib  /usr/lib   system  binary,auto
cygdrive prefix  /cygdrive  user    binary,posix=0,auto

Found: C:\cygwin64\bin\awk
 -> C:\cygwin64\bin\gawk.exe
Found: C:\cygwin64\bin\bash.exe
Found: C:\cygwin64\bin\cat.exe
Found: C:\cygwin64\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: C:\cygwin64\bin\find.exe
Found: C:\Windows\system32\find.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin64\bin\grep.exe
Found: C:\cygwin64\bin\kill.exe
Not Found: ld
Found: C:\cygwin64\bin\ls.exe
Not Found: make
Found: C:\cygwin64\bin\mv.exe
Not Found: patch
Found: C:\cygwin64\bin\perl.exe
Found: C:\cygwin64\bin\rm.exe
Found: C:\cygwin64\bin\sed.exe
Found: C:\cygwin64\bin\ssh.exe
Found: C:\cygwin64\bin\sh.exe
Found: C:\cygwin64\bin\tar.exe
Found: C:\cygwin64\bin\test.exe
Found: C:\cygwin64\bin\vi.exe
Not Found: vim

   38k 2013/07/19 C:\cygwin64\bin\cygargp-0.dll
  510k 2014/03/20 C:\cygwin64\bin\cygasn1-8.dll
   16k 2013/03/26 C:\cygwin64\bin\cygattr-1.dll
  179k 2014/12/01 C:\cygwin64\bin\cygblkid-1.dll
   64k 2013/03/07 C:\cygwin64\bin\cygbz2-1.dll
   11k 2014/12/24 C:\cygwin64\bin\cygcharset-1.dll
   12k 2014/06/09 C:\cygwin64\bin\cygcom_err-2.dll
    9k 2013/03/07 C:\cygwin64\bin\cygcrypt-0.dll
 1752k 2015/01/08 C:\cygwin64\bin\cygcrypto-1.0.0.dll
 1526k 2013/03/08 C:\cygwin64\bin\cygdb-5.3.dll
  111k 2013/03/08 C:\cygwin64\bin\cygdb_cxx-5.3.dll
  472k 2013/03/08 C:\cygwin64\bin\cygdb_sql-5.3.dll
  154k 2013/10/20 C:\cygwin64\bin\cygedit-0.dll
   26k 2015/01/11 C:\cygwin64\bin\cygffi-6.dll
   55k 2014/12/30 C:\cygwin64\bin\cygformw-10.dll
   69k 2015/01/29 C:\cygwin64\bin\cyggcc_s-seh-1.dll
   40k 2014/05/27 C:\cygwin64\bin\cyggdbm-4.dll
   13k 2014/05/27 C:\cygwin64\bin\cyggdbm_compat-4.dll
  520k 2015/01/26 C:\cygwin64\bin\cyggmp-10.dll
  198k 2014/03/20 C:\cygwin64\bin\cyggssapi-3.dll
  253k 2014/09/19 C:\cygwin64\bin\cyggssapi_krb5-2.dll
   14k 2014/03/20 C:\cygwin64\bin\cygheimbase-1.dll
   24k 2014/03/20 C:\cygwin64\bin\cygheimntlm-0.dll
   29k 2013/03/14 C:\cygwin64\bin\cyghistory7.dll
  236k 2014/03/20 C:\cygwin64\bin\cyghx509-5.dll
   77k 2014/08/10 C:\cygwin64\bin\cygICE-6.dll
 1002k 2014/12/24 C:\cygwin64\bin\cygiconv-2.dll
   39k 2014/11/18 C:\cygwin64\bin\cygintl-8.dll
  179k 2014/09/19 C:\cygwin64\bin\cygk5crypto-3.dll
   23k 2014/03/20 C:\cygwin64\bin\cygkafs-0.dll
  403k 2014/03/20 C:\cygwin64\bin\cygkrb5-26.dll
  701k 2014/09/19 C:\cygwin64\bin\cygkrb5-3.dll
   35k 2014/09/19 C:\cygwin64\bin\cygkrb5support-0.dll
    6k 2015/02/04 C:\cygwin64\bin\cyglsa64.dll
  128k 2015/01/15 C:\cygwin64\bin\cyglzma-5.dll
  107k 2014/10/29 C:\cygwin64\bin\cygmagic-1.dll
  158k 2014/08/12 C:\cygwin64\bin\cygman-2-6-7.dll
   29k 2014/12/30 C:\cygwin64\bin\cygmenuw-10.dll
  334k 2015/01/26 C:\cygwin64\bin\cygmpfr-4.dll
   52k 2014/12/30 C:\cygwin64\bin\cygncurses++w-10.dll
  296k 2014/12/30 C:\cygwin64\bin\cygncursesw-10.dll
  220k 2014/10/19 C:\cygwin64\bin\cygp11-kit-0.dll
   14k 2014/12/30 C:\cygwin64\bin\cygpanelw-10.dll
  280k 2014/12/08 C:\cygwin64\bin\cygpcre-1.dll
 1580k 2013/03/11 C:\cygwin64\bin\cygperl5_14.dll
   38k 2014/05/12 C:\cygwin64\bin\cygpipeline-1.dll
   41k 2013/10/21 C:\cygwin64\bin\cygpopt-0.dll
  193k 2013/03/14 C:\cygwin64\bin\cygreadline7.dll
   57k 2014/03/20 C:\cygwin64\bin\cygroken-18.dll
   28k 2014/01/14 C:\cygwin64\bin\cygSM-6.dll
   88k 2014/12/01 C:\cygwin64\bin\cygsmartcols-1.dll
  750k 2015/01/30 C:\cygwin64\bin\cygsqlite3-0.dll
  142k 2014/11/09 C:\cygwin64\bin\cygssh2-1.dll
  382k 2015/01/08 C:\cygwin64\bin\cygssl-1.0.0.dll
   12k 2015/01/29 C:\cygwin64\bin\cygssp-0.dll
  941k 2015/01/29 C:\cygwin64\bin\cygstdc++-6.dll
   64k 2014/11/13 C:\cygwin64\bin\cygtasn1-6.dll
   52k 2014/12/30 C:\cygwin64\bin\cygticw-10.dll
   15k 2014/12/01 C:\cygwin64\bin\cyguuid-1.dll
  161k 2014/03/20 C:\cygwin64\bin\cygwind-0.dll
   30k 2013/11/15 C:\cygwin64\bin\cygwrap-0.dll
 1121k 2014/10/21 C:\cygwin64\bin\cygX11-6.dll
   12k 2013/06/06 C:\cygwin64\bin\cygXau-6.dll
  102k 2014/05/20 C:\cygwin64\bin\cygxcb-1.dll
   21k 2013/03/13 C:\cygwin64\bin\cygXdmcp-6.dll
   56k 2014/08/10 C:\cygwin64\bin\cygXext-6.dll
   85k 2014/01/15 C:\cygwin64\bin\cygXmu-6.dll
   35k 2013/06/14 C:\cygwin64\bin\cygXrender-1.dll
  320k 2014/08/10 C:\cygwin64\bin\cygXt-6.dll
   80k 2014/11/19 C:\cygwin64\bin\cygz.dll
 3182k 2015/02/04 C:\cygwin64\bin\cygwin1.dll
    Cygwin DLL version info:
        DLL version: 1.7.34
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 285
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix:
        Build date:
        Shared id: cygwin1S5


Service             : sshd
Display name        : CYGWIN sshd
Current State       : Running
Controls Accepted   : Stop
Command             : /usr/sbin/sshd -D


Cygwin Package Information
Package                  Version            Status
_autorebase              001002-1           OK
_update-info-dir         00372-1            OK
alternatives             1.3.30c-10         OK
autossh                  1.4d-1             OK
base-cygwin              3.6-1              OK
base-files               4.2-3              OK
bash                     4.1.17-9           OK
bzip2                    1.0.6-2            OK
ca-certificates          2.2-1              OK
coreutils                8.23-4             OK
csih                     0.9.8-4            OK
cygrunsrv                1.62-1             OK
cygutils                 1.4.14-1           OK
cygwin                   1.7.34-6           OK
dash                     0.5.8-3            OK
diffutils                3.3-2              OK
editrights               1.03-1             OK
file                     5.20-1             OK
findutils                4.5.12-1           OK
gawk                     4.1.1-1            OK
getent                   2.18.90-4          OK
grep                     2.21-2             OK
groff                    1.22.2-2           OK
gzip                     1.6-1              OK
hostname                 3.13-1             OK
info                     5.2-3              OK
ipc-utils                1.0-2              OK
less                     458-1              OK
libargp                  20110921-2         OK
libasn1_8                1.5.3-1            OK
libattr1                 2.4.46-1           OK
libblkid1                2.25.2-1           OK
libbz2_1                 1.0.6-2            OK
libcharset1              1.14-2             OK
libcom_err2              1.42.10-1          OK
libcrypt0                1.1-1              OK
libdb5.3                 5.3.21-1           OK
libedit0                 20130712-1         OK
libffi6                  3.2.1-1            OK
libgcc1                  4.9.2-2            OK
libgdbm4                 1.11-1             OK
libgmp10                 6.0.0a-2           OK
libgssapi3               1.5.3-1            OK
libgssapi_krb5_2         1.12.2-1           OK
libheimbase1             1.5.3-1            OK
libheimntlm0             1.5.3-1            OK
libhx509_5               1.5.3-1            OK
libICE6                  1.0.9-1            OK
libiconv                 1.14-2             OK
libiconv2                1.14-2             OK
libintl8                 0.19.3-1           OK
libk5crypto3             1.12.2-1           OK
libkafs0                 1.5.3-1            OK
libkrb5_26               1.5.3-1            OK
libkrb5_3                1.12.2-1           OK
libkrb5support0          1.12.2-1           OK
liblzma5                 5.0.8-1            OK
libmpfr4                 3.1.2-2            OK
libncursesw10            5.9-20141227-1     OK
libopenssl100            1.0.1k-1           OK
libp11-kit0              0.20.7-1           OK
libpcre1                 8.36-1             OK
libpipeline1             1.3.0-3            OK
libpopt0                 1.16-1             OK
libreadline7             6.2-1              OK
libroken18               1.5.3-1            OK
libSM6                   1.2.2-1            OK
libsmartcols1            2.25.2-1           OK
libsqlite3_0             3.8.8.2-1          OK
libssh2_1                1.4.3-1            OK
libssp0                  4.9.2-2            OK
libstdc++6               4.9.2-2            OK
libtasn1_6               4.2-1              OK
libuuid1                 2.25.2-1           OK
libwind0                 1.5.3-1            OK
libwrap0                 7.6-22             OK
libX11_6                 1.6.2-2            OK
libXau6                  1.0.8-1            OK
libxcb1                  1.10-1             OK
libXdmcp6                1.1.1-1            OK
libXext6                 1.3.3-1            OK
libXmu6                  1.1.2-1            OK
libXrender1              0.9.8-1            OK
libXt6                   1.1.4-2            OK
login                    1.11-1             OK
lynx                     2.8.7-2            OK
man                      2.6.7-2            OK
man-db                   2.6.7-2            OK
mintty                   1.2-beta1-1        OK
openssh                  6.7p1-2            OK
openssl                  1.0.1k-1           OK
p11-kit                  0.20.7-1           OK
p11-kit-trust            0.20.7-1           OK
perl                     5.14.4-1           OK
perl_autorebase          001001-1           OK
popt                     1.16-1             OK
rebase                   4.4.1-1            OK
rsh                      0.17-2             OK
run                      1.3.3-1            OK
sed                      4.2.2-3            OK
tar                      1.27.1-1           OK
terminfo                 5.9-20141227-1     OK
texinfo                  5.2-3              OK
tftp                     5.2-1              OK
tzcode                   2014j-1            OK
util-linux               2.25.2-1           OK
vim-minimal              7.4.582-1          OK
which                    2.20-2             OK
windows-default-manifest 6.4-1              OK
xeyes                    1.1.1-1            OK
xz                       5.0.8-1            OK
zlib0                    1.2.8-3            OK
Use -h to see help about each section

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

^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2015-02-25 14:10 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 17:36 Very slow Cygwin startup on Windows 7 Dennis Hagarty (dehagart)
2015-02-09 17:47 ` Achim Gratz
2015-02-09 18:18   ` Dennis Hagarty (dehagart)
2015-02-09 18:51     ` Corinna Vinschen
2015-02-09 19:18       ` Dennis Hagarty (dehagart)
2015-02-09 19:38     ` Achim Gratz
2015-02-10  0:35     ` Andrey Repin
2015-02-12  6:05       ` Dennis Hagarty (dehagart)
2015-02-12 10:17       ` Corinna Vinschen
2015-02-12 20:05         ` Andrey Repin
2015-02-12 20:40           ` Corinna Vinschen
2015-02-12 23:17             ` Andrey Repin
2015-02-13  2:12         ` Andrey Repin
2015-02-13  8:58           ` Corinna Vinschen
2015-02-13 11:45             ` Andrey Repin
2015-02-13 22:38             ` Warren Young
2015-02-13 23:50               ` Warren Young
2015-02-15 10:02                 ` Corinna Vinschen
2015-02-17 19:13                   ` Warren Young
2015-02-17 21:33                     ` Corinna Vinschen
2015-02-17 22:51                       ` Warren Young
2015-02-17 23:22                         ` Corinna Vinschen
2015-02-15 10:00               ` Corinna Vinschen
2015-02-17 20:34                 ` Warren Young
2015-02-17 21:39                   ` Corinna Vinschen
2015-02-15 21:50             ` Andrey Repin
2015-02-16  9:35               ` Corinna Vinschen
2015-02-16 22:00                 ` Andrey Repin
2015-02-12 12:39       ` Achim Gratz
2015-02-12 12:39         ` Corinna Vinschen
2015-02-12 16:01         ` Eric Blake
2015-02-12 19:59           ` Andrey Repin
2015-02-12 23:06         ` Andrey Repin
2015-02-17 14:50       ` Dennis Hagarty (dehagart)
2015-02-17 16:33         ` Corinna Vinschen
2015-02-18 12:20           ` Dennis Hagarty (dehagart)
2015-02-17 17:59         ` Andrey Repin
2015-02-17 18:53           ` Dennis Hagarty (dehagart)
2015-02-18 11:18             ` Andrey Repin
2015-02-18 11:56               ` Dennis Hagarty (dehagart)
2015-02-18 14:25                 ` Andrey Repin
2015-02-18 14:35                   ` Dennis Hagarty (dehagart)
2015-02-18 11:27         ` Corinna Vinschen
2015-02-18 12:48           ` Dennis Hagarty (dehagart)
2015-02-18 13:10             ` Corinna Vinschen
2015-02-19 10:56               ` Dennis Hagarty (dehagart)
2015-02-19 12:15                 ` Corinna Vinschen
2015-02-20  0:30                   ` Dennis Hagarty (dehagart)
2015-02-20 16:30                     ` Corinna Vinschen
2015-02-20 19:56                       ` Andrey Repin
2015-02-20 20:31                         ` Corinna Vinschen
2015-02-23 23:33                       ` Corinna Vinschen
2015-02-24 13:30                         ` John Ruckstuhl
2015-02-24 14:16                           ` Corinna Vinschen
2015-02-24 15:20                         ` Dennis Hagarty (dehagart)
2015-02-24 15:22                           ` Corinna Vinschen
2015-02-24 19:47                             ` Dennis Hagarty (dehagart)
2015-02-24 15:29                         ` Dennis Hagarty (dehagart)
2015-02-24 18:37                           ` Corinna Vinschen
2015-02-25 15:17                             ` J. David Boyd
2015-02-25 15:20                               ` Corinna Vinschen
2015-02-21 21:18                     ` Roger Orr
  -- strict thread matches above, loose matches on Subject: below --
2015-02-13  8:57 Houder
2015-02-09 11:12 Dennis Hagarty (dehagart)
2015-02-09 13:47 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).