从具有快速网络连接的虚拟机克隆git存储库时,我的瓶颈是什么? [英] What is my bottleneck when cloning a git repository from a virtual machine with a fast network connection?

查看:98
本文介绍了从具有快速网络连接的虚拟机克隆git存储库时,我的瓶颈是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的一个情况是,相对较大的git存储库位于我的本地网络上一台较慢的慢主机上的虚拟机中,这需要很长时间才能完成初始克隆.

I have a situation with a relatively large git repository located in a virtual machine on an elderly, slow host on my local network where it takes quite a while to do the initial clone.

ravn@bamboo:~/git$ git clone gitosis@gitbox:git00
Initialized empty Git repository in /home/ravn/git/git00/.git/
remote: Counting objects: 89973, done.
remote: Compressing objects: 100% (26745/26745), done.
remote: Total 89973 (delta 50970), reused 85013 (delta 47798)
Receiving objects: 100% (89973/89973), 349.86 MiB | 2.25 MiB/s, done.
Resolving deltas: 100% (50970/50970), done.
Checking out files: 100% (11722/11722), done.
ravn@bamboo:~/git$

在gitosis中没有git特定的配置更改.

There is no git specific configuration changes in gitosis.

有什么方法可以将接收比特加速到网络所能达到的水平吗?

Is there any way of speeding up the receiving bit up to what the network is capable of?

我需要新的存储库与上游存储库正确连接.据我了解,这需要git进行克隆,因此无法在git外部进行原始位复制.

I need the new repositories to be properly connected with the upstream repository. To my understanding this require git to do the cloning, and thus raw bit copying outside of git will not work.

推荐答案

在意识到数据传输速度的上限是git的外部"建立的ssh连接之后,我做了一些实验,发现由于正确选择了河豚加密方案,因此使用pcsp(Putty scp)的上限为3.0 MB/s.原始ftp的控制实验表明,传输速度为3.1 MB/s,因此表明这是网络的上限.

After realizing that the upper limit to the transfer speed of data, is the ssh connection which is established "outside" of git I did some experiments, and found that the upper limit of using pcsp (Putty scp) was 3,0 MB/s as the blowfish encryption scheme was properly chosen. A control experiment with raw ftp showed that the transfer speed was 3.1 MB/s, so it indicated that this was the upper bound of the network.

这是在vmware虚拟机管理程序中运行的,并且由于执行网络I/O的进程几乎使用了100%的CPU,这表明瓶颈是Ubuntu网卡驱动程序.然后,我发现即使安装了vmware工具,由于某种原因,内核仍使用vlance驱动程序(模拟带有IRQ和所有功能的10 MBps网卡)而不是vmxnet驱动程序(直接与管理程序对话).现在等待更改服务窗口.

This runs inside a vmware hypervisor, and as the process doing network I/O utilized almost 100% cpu it indicated that the bottleneck was the Ubuntu network card driver. I then found that even though vmware tools were installed, for some reason the kernel still used the vlance driver (emulating a 10 MBps network card with IRQ's and all) instead of the vmxnet driver (which speaks directly to the hypervisor). This now awaits a service window to be changed.

换句话说,问题不在于git,而在于底层的硬件".

In other words, the problem was not with git but the underlying "hardware".

这篇关于从具有快速网络连接的虚拟机克隆git存储库时,我的瓶颈是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆