diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index ddc92c928..ea20f7dac 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,7 @@ +2015-02-11 Warren Young + + * faq-using.xml (faq.using.startup-slow): New entry. + 2015-02-06 Corinna Vinschen * posix.xml (std-susv4): Move cabsl, cimagl, creall, hypotl, sqrtl here diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml index 522a06551..9593c3bea 100644 --- a/winsup/doc/faq-using.xml +++ b/winsup/doc/faq-using.xml @@ -29,6 +29,69 @@ it to other missing DLLs and identify their containing packages, see + +Starting a new terminal window is slow. What's going on? + + +There are many possible causes for this. This answer is more a +list of things to look into than a set of solutions. + + + + If your terminal windows suddenly began starting slowly after a + Cygwin upgrade, the most likely cause is that you have an outdated + authentication setup. + + For almost all its lifetime, Cygwin has used Unix-like + /etc/passwd and /etc/group 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. + + 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 /etc/passwd and such. At worst, + it will only be a bit slower. (Which situation applies depends on the + benchmark you run.) + + If you are on an AD system, a hybrid approach you might consider is + to re-run mkpasswd and mkgroup, then + put the following into /etc/nsswitch.conf to make + Cygwin treat these files as read-only local caches of your AD database: + + + + passwd: files + group: files + + + By leaving out the "db" 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 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. + + + + 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. + + + +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 +C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -. +Assuming you are using Bash for your login shell, change it to +C:\cygwin64\bin\mintty /bin/bash -lx. 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. + + Why is Cygwin suddenly so slow?