VSTS代理从本地网络共享下载工件的速度非常慢 [英] VSTS agent very slow to download artifacts from local network share

查看:84
本文介绍了VSTS代理从本地网络共享下载工件的速度非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行带有两个代理的本地TFS实例.代理1具有一个本地路径,我们在其中存储我们的工件.代理2必须通过网络路径(\ agent1 \ artifacts ...)访问该路径.

I'm running an on-prem TFS instance with two agents. Agent 1 has a local path where we store our artifacts. Agent 2 has to access that path over a network path (\agent1\artifacts...).

从代理1下载工件需要20到30秒.从代理2下载工件需要4-5分钟.如果我从代理2使用资源管理器复制文件,则大约需要20-30秒.

Downloading the artifacts from agent 1 takes 20-30 seconds. Downloading the artifacts from agent 2 takes 4-5 minutes. If from agent 2 I copy the files using explorer, it takes about 20-30 seconds.

我尝试在其他计算机上添加其他代理.在下载工件时,它们的性能都同样差,但是在手动复制时,它们的速度很快.

I've tried adding other agents on other machines. All of them perform equally poorly when downloading the artifacts but quick when copying manually.

其他任何人都可能会遇到这种情况或提供一些想法来解决此问题?

Anyone else experience this or offer some ideas of what might work to fix this?

推荐答案

是的,绝对是导致问题的v2.

Yes It's definitely the v2 that's causing the problem.

我们的下载工件步骤从2分钟缩短到了36分钟.这是完全不能接受的.我将尝试代理v2.120.2,看看效果是否更好...

Our download artifacts step has gone from 2mins to 36mins. Which is completely unacceptable. Im going to try out agent v2.120.2 to see if that's any better...

代理v2.120.2

我认为这是由于工件中的文件数量所致,我们在2,604个文件夹中的12,042个文件中拥有3.71GB的空间!

I think it's because of the amount of files in our artifacts, we have 3.71GB across 12,042 files in 2,604 Folders!

另一个选择是我将它压缩或为每个公共工件创建一个nuget包,然后放下后解压缩!不是理想的解决方案,但是我在需要使用RoboCopy之前已经做过的事情,这显然是此版本的代理所使用的.

The other option I will look into it zipping or creating a nuget package for each public artifact and then after the drop, unzipping! Not the ideal solution but something I've done before when needing to use RoboCopy which is apparently what this version of the Agent uses.

RoboCopy不能很好地处理许多小文件,并且必须为网络上的每个文件创建一个句柄会增加很多开销!

RoboCopy is not great at handling lots of small files, and having to create a handle for each file across the network adds a lot of overhead!

更改为最新版本没有影响.我们已决定采用其他方法,并使用服务器" 的工件类型,而不是将文件共享" 从26分钟加速到4.5分钟的工件类型.

The change to the newest version made no difference. We've decided to go a different route and use an Artifact type of "Server" rather than "File Share" which has sped it up from 26 minutes to 4.5 minutes.

这篇关于VSTS代理从本地网络共享下载工件的速度非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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