windows - 与 GitHub 相比,Windows 文件共享上的 Git 速度慢

标签 windows performance git samba

我们决定在内部 Windows Server 共享上托管我们共享的 Git 存储库。然后所有开发人员通过 VPN 连接访问此共享,以推送/pull 更改。

而且效果很好。

但我们怀疑它比正常情况慢,即。与 GitHub 相比 - 所以我们决定进行一些速度测试,并在本地文件共享和 Github 上设置相同的项目。

结果很可怕:Fileshare Git 存储库比使用 GitHub 慢 5-7 倍。

谁能给我任何线索,说明谁在速度上存在巨大差异?

Windows 文件共享位于公平的 Windows Server 2003 上,它基本上只作为文件服务器使用,并且服务器不忙或类似情况。

所有开发者都从 Mac OSX 访问此共享。

最佳答案

如果“文件共享”是指您正在使用“local protocol”(即远程存储库位于磁盘上的另一个目录中——这里是 remote),那么这是正常的: SSH 或基于 http 的智能解决方案会更快。

The Cons

[...] If you want to push from your laptop when you’re at home, you have to mount the remote disk, which can be difficult and slow compared to network-based access.

It’s also important to mention that this isn’t necessarily the fastest option if you’re using a shared mount of some kind.
A local repository is fast only if you have fast access to the data.
A repository on NFS is often slower than the repository over SSH on the same server, allowing Git to run off local disks on each system.

由于 GitHub 提供两种访问方式(SSH 或智能 HTTP),因此它比文件共享更快。

参见 8 ways to share your Git repo了解共享您的中央仓库的其他方式。

关于windows - 与 GitHub 相比,Windows 文件共享上的 Git 速度慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6166751/

相关文章:

用于维护不同版本的 Git 分支模型

linux - 操作系统内核是所有其他程序的解释器吗?

windows - ffmpeg 标准化视频的响度

c++ - _beginthreadex 内存不足

performance - xarray 对于性能关键代码来说太慢了

html - 浏览器如何部分加载DOM和CSSOM?

git - 将 .gitignore 转换为ignore.conf

git - 在我的终端中并排着色的内联 git diff 输出

windows - 可执行文件的名称中是否应包含版本号?

在性能方面,是否值得为生产重命名每个 mongo 键名?