Cygwin's MinTTY takes about a minute to start up

When I open MinTTY from outside an existing MinTTY, the new terminal window takes about a minute to show up. My Windows shortcut is set to run C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -. The equivalent command /cygdrive/c/cygwin64/bin/mintty.exe -i /Cygwin-Terminal.ico - inside an already open MinTTY window, opens up the new window instantly. This does not happen on my other computer with essentially the same setup. What could be slowing it down?

  • OS: Windows 7
  • Processor: Xeon
  • RAM: 8GB

From the Cygwin FAQs:

  1. 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 /etc:

    getent passwd $(id -u) > /etc/passwd
    getent group $(id -G) > /etc/group
    

    Also, set /etc/nsswitch.conf as follows:

    passwd: files db
    group:  files db
    

    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.

  2. Either in addition to the previous item or instead of it, you can run cygserver as a local caching service to speed up DC requests.

    Cygwin programs will check with cygserver before trying to query the DC directly.

  3. 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 mkpasswd and mkgroup, then put the following into /etc/nsswitch.conf to make Cygwin treat these files as the only sources of user and group information:

    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 that you open yourself up to the stale cache problem: any time the AD databases change, your local cache will go out of date until you update the files manually.

Option #2 fixed the problem for me.


Installing cygwin as local administrator user fixed the issue for me.