Slow clone transfer speed on Windows Server 2008

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

Git clones are slow due to lower transfer speeds (typically less than 200 KB/s), especially on higher latency connections.

診断

環境

  • Windows Server 2008

Diagnostic Steps

  • The clone speed can be tested outside of Bitbucket Server by using git daemon to host the repository with the Git protocol. The same clone speed should be seen this way as well.
  • If Git pushes are slow, it's also possible to be running into Git push operations extremely slow on Windows

原因

The slow clones are caused by the size of the TCP packets being limited to 9,000 bytes or below. This is likely due to the architectural behavior of the Windows Socket API in Windows Server 2008. More details on this can be found at Slow performance occurs when you copy data to a TCP server by using a Windows Sockets API program.

回避策

Clone speeds can be improved by using the blocking Java connector and adjusting the socketBuffer in Tomcat. In $BITBUCKET_HOME/shared/server.xml make the following changes:

  1. Change the protocol to org.apache.coyote.http11.Http11Protocol
  2. Add the socketBuffer parameter
server.xml
<Connector port="7990" protocol="org.apache.coyote.http11.Http11Protocol"
                   connectionTimeout="20000"
                   useBodyEncodingForURI="true"
                   redirectPort="8443"
                   compression="on"
                   socketBuffer="65000"
                   socket.rxBufSize="65000"
                   socket.txBufSize="65000"
                   compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />

This workaround will not be viable in Bitbucket Server 5.0+ due to the blocking connector being removed from Tomcat 8.5.

ソリューション

Upgrade to Windows Server 2012 or migrate to Linux, see Migrating Bitbucket Data Center to another server for details.

Linux is the recommended option for larger instances.

最終更新日 2017 年 4 月 5 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.