Kim Carlsen

Hi

When we call tf edit on one specific file it's very slow.

tf edit abc.sln takes 13 seconds.

Doing it from the GUI takes less than 1 second.

It's not very productive, so can anyone help

Regards

Kim



Re: Team Foundation Server - Version Control tf command very slow

Riham - MSFT

Hello, do you have SP1 installed on the client or the server




Re: Team Foundation Server - Version Control tf command very slow

Michal Malecki - MSFT

A couple more questions - is it the same file both in the command line and GUI - same on the server and local drive (the same workspace). What GUI we are talking about - Source Control Explorer, Solution explorer

It's really hard to explain how command line can be slower - it's doing much less than GUI has to do.






Re: Team Foundation Server - Version Control tf command very slow

Kim Carlsen

Hi

There's SP1 on both client and server.

We are having the problem on more than one client. Haven't seen one that is fast.

This morning I tryed again as the first thing with nothing else open. and it took 30 sec. then I did and undo 5 sec. a second edit 5 sec.

It's the same file I try to edit with tf and from Source Control Explorer within Visual studio( no solution open).

Regards

Kim





Re: Team Foundation Server - Version Control tf command very slow

Michal Malecki - MSFT

Hello,

could you enable tracing for tf.exe (Ed described how to do this here: http://blogs.msdn.com/edhintz/archive/2007/03/30/tfs-client-tracing.aspx) and post here total time that takes tf.exe to execute and just the web service call (from the trace file or from the perf dialog).

I hope that this way we will understand if the problem is on the server side (which is the same for the SCE, so it wouldn't make any sense) or on the client side (which is strange as well).






Re: Team Foundation Server - Version Control tf command very slow

Kim Carlsen

H

Here's log:

Regads

Kim

31-05-2007 09:00:41 (pid 3452, tid 3844, 156 ms) Begin: 31-05-2007 09:00:41 ================================
31-05-2007 09:00:41 (pid 3452, tid 3844, 187 ms) Command line: tf edit sysadm.sln
31-05-2007 09:00:41 (pid 3452, tid 3844, 187 ms) Current directory: D:\ss\Captia\Source

31-05-2007 09:00:41 (pid 3452, tid 3844, 187 ms) CommandLine Assembly.Location: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\TF.exe
31-05-2007 09:00:41 (pid 3452, tid 3844, 187 ms) VersionControlServer Assembly.Location: C:\WINDOWS\assembly\GAC_32\Microsoft.TeamFoundation.VersionControl.Client\8.0.0.0__b03f5f7f11d50a3a\Microsoft.TeamFoundation.VersionControl.Client.dll
31-05-2007 09:00:41 (pid 3452, tid 3844, 203 ms) CommandLine Assembly.Version: 8.0.0.0
31-05-2007 09:00:41 (pid 3452, tid 3844, 437 ms) VersionControlServer Assembly.Version: 8.0.0.0

31-05-2007 09:00:41 (pid 3452, tid 3844, 453 ms) Command: edit
31-05-2007 09:00:41 (pid 3452, tid 3844, 468 ms) Using cache file path C:\Documents and Settings\kca\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config
31-05-2007 09:00:41 (pid 3452, tid 3844, 484 ms) Session ID: d8fa4a28-b2ca-4158-91b1-0a11cbe2e138
31-05-2007 09:00:41 (pid 3452, tid 3844, 484 ms) Using cache file path C:\Documents and Settings\kca\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config
31-05-2007 09:00:48 (pid 3452, tid 3844, 6828 ms) ConnectionLimit = 32, BypassProxyOnLocal = False, EnableCompression = True, DefaultTimeout = 300000
31-05-2007 09:00:48 (pid 3452, tid 3844, 6875 ms) User agent: Team Foundation (TF.exe, 8.0.50727.762)
31-05-2007 09:01:01 (pid 3452, tid 3844, 20125 ms) Web method running: [http://crush:8080/Services/v1.0/Registration.asmx] GetRegistrationEntries[Ser]
31-05-2007 09:01:02 (pid 3452, tid 3844, 21015 ms) Web method response: [http://crush:8080/Services/v1.0/Registration.asmx] GetRegistrationEntries[Ser] 1042 ms
31-05-2007 09:01:02 (pid 3452, tid 3844, 21281 ms) Time spent getting service URL ISCCProvider: 20540 ms
31-05-2007 09:01:02 (pid 3452, tid 3844, 21281 ms) CreateWebRequest() -- Uri: http://crush:8080/VersionControl/v1.0/repository.asmx
31-05-2007 09:01:02 (pid 3452, tid 3844, 21296 ms) request.AutomaticDecompression: GZip
31-05-2007 09:01:02 (pid 3452, tid 3844, 21328 ms) Write: 497
31-05-2007 09:01:02 (pid 3452, tid 3844, 21328 ms) < xml version="1.0" encoding="utf-8" >
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/ClientServices/03" xmlnsTongue Tiedoap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<PendChanges>
<workspaceName>WSKCA</workspaceName>
<ownerName>SCANJOUR\kca</ownerName>
<changes>
<ChangeRequest req="Edit">
<item item="D:\ss\Captia\Source\sysadm.sln" />
</ChangeRequest>
</changes>
</PendChanges>
</soap:Body>
</soap:Envelope>
31-05-2007 09:01:02 (pid 3452, tid 3844, 21328 ms) Web method running: [VersionControl/] PendChanges[Ver]
31-05-2007 09:01:06 (pid 3452, tid 3844, 24859 ms) HTTP headers:
Content-Encoding:
Vary: Accept-Encoding
Transfer-Encoding: chunked
Cache-Control: private, max-age=0
Content-Type: application/soap+xml; charset=utf-8
Date: Thu, 31 May 2007 07:01:07 GMT
Server: Microsoft-IIS/6.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET

31-05-2007 09:01:06 (pid 3452, tid 3844, 24859 ms) Web method response: [VersionControl/] PendChanges[Ver] 3524 ms
31-05-2007 09:01:06 (pid 3452, tid 3844, 24859 ms)
Write:
31-05-2007 09:01:06 (pid 3452, tid 3844, 24921 ms) Read: 965
31-05-2007 09:01:06 (pid 3452, tid 3844, 24921 ms) < xml version="1.0" encoding="utf-8" >
<soap:Envelope xmlnsTongue Tiedoap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<PendChangesResponse xmlns="http://schemas.microsoft.com/TeamFoundation/2005/06/VersionControl/ClientServices/03">
<PendChangesResult>
<GetOperation type="File" itemid="16004" slocal="D:\ss\Captia\Source\Sysadm.sln" tlocal="D:\ss\Captia\Source\Sysadm.sln" titem="$/Captia/Source/Sysadm.sln" sver="13133" lver="13133" chg="Edit" pcid="-82421" durl="sfid=120155,0,0,0,0,0,0,0,0,0&amp;ts=633162780677590992&amp;s=ZyAc%2FR6dpDxMZKvkTGeiHtyPTOf4ZLHLVaXixaVKxKvCGZwFlMPCiRrpFglDXQDr5jwvITbQYGLBN2n5QINmdL789eBxmsqSwiz5UtOJXoKpTNHUgUeyg0U%2B%2Fg02NCXsAlN3zW4nY8tf0QUCiLoS4iteFINWLCA7APkxMXped0U%3D&amp;fid=120155">
<HashValue>vUUNDdLzsXt4yf1FpGgmIA==</HashValue>
</GetOperation>
</PendChangesResult>
<failures />
</PendChangesResponse>
</soap:Body>
</soap:Envelope>
31-05-2007 09:01:06 (pid 3452, tid 3844, 24937 ms) ProcessOperation() -- processing operation: GetOperation instance 40041277
HashValue: [16]189, 69, 13, 13, 210, 243, 177, 123, 120, 201, 253, 69, 164, 104, 38, 32
ItemType: File
ItemId: 16004
SourceLocalItem: D:\ss\Captia\Source\Sysadm.sln
TargetLocalItem: D:\ss\Captia\Source\Sysadm.sln
TargetServerItem: $/Captia/Source/Sysadm.sln
VersionServer: 13133
VersionLocal: 13133
DeletionId: 0
ChangeType: Edit
LockLevel: None
IsLatest: True
PendingChangeId: -82421
HasConflict: False
ConflictingChangeType: None
ConflictingItemId: 0
DownloadUrl: sfid=120155,0,0,0,0,0,0,0,0,0&ts=633162780677590992&s=ZyAc%2FR6dpDxMZKvkTGeiHtyPTOf4ZLHLVaXixaVKxKvCGZwFlMPCiRrpFglDXQDr5jwvITbQYGLBN2n5QINmdL789eBxmsqSwiz5UtOJXoKpTNHUgUeyg0U%2B%2Fg02NCXsAlN3zW4nY8tf0QUCiLoS4iteFINWLCA7APkxMXped0U%3D&fid=120155

31-05-2007 09:01:06 (pid 3452, tid 3844, 24953 ms) Recording OperationStatus.Getting for $/Captia/Source/Sysadm.sln
31-05-2007 09:01:06 (pid 3452, tid 3844, 24984 ms) DownloadFiles: 59 ms
31-05-2007 09:01:06 (pid 3452, tid 3844, 24984 ms) Acknowledgements: 0 ms
31-05-2007 09:01:06 (pid 3452, tid 3844, 24984 ms) End: 25088 ms
31-05-2007 09:01:06 (pid 3452, tid 3844, 24984 ms) Process time stats: 1218,75 ms total, 671,875 ms user code, 546,875 ms OS code





Re: Team Foundation Server - Version Control tf command very slow

Michal Malecki - MSFT

Hello,

it's definitely nothing that I've seen before Smile Does it take the same amount of time if you run the same command a few times in a row, e.g. "tf dir ." or "tf properties sysadm.sln".

What happens if you run in @ mode:

tf @<enter>

properties sysadmin.sln<enter>

properties sysadmin.sln<enter>

properties sysadmin.sln<enter>

Does each properties command takes the same amount of time then If not could you share the trace log

Just to make sure - you are not specifying any credentials when running this command

Thanks






Re: Team Foundation Server - Version Control tf command very slow

Kim Carlsen

Hi

No I don't provide any credentials.

the commands that I tried in order:

tf properties sysadm.sln 38 sec

tf properties sysadm.sln 3 sec

tf properties sysadm.sln 14 sec

tf properties sysadm.sln 3 sec

tf properties sysadm.sln 3 sec

tf properties sysadm.sln 14 sec

tf properties sysadm.sln 3 sec

enter console mode tf @

properties sysadm.sln 15 sec

properties sysadm.sln >1 sec

Then the rest of the commands in console mode runs less than one second. dir and properties, even on other files.

it's very strange. I can send you the log file, if you're want to.

Regards

Kim





Re: Team Foundation Server - Version Control tf command very slow

Michal Malecki - MSFT

Well,

it's not suprising that "Tf @" mode is faster - this is the main reason to use it in first place, when you run scripts or multiple commands. However your first test is interesting - you write that first call to "tf properties" took 38 seconds but the following one were much quicker (14 is still much less than 38). Is it possible that this first call was executed when server was not active, after restart etc. How long you need to wait to make tf properties that slow (38 s) again






Re: Team Foundation Server - Version Control tf command very slow

Kim Carlsen

Hi

I tested this in the morning. I know that there's other people(2 persons) connected with visual studio.

After power on(client) I start a command prompt and doing

tf properties sysadm.sln. 28 sec.

tf properties sysadm.sln 3 sec.

Reboot client

tf properties sysadm.sln 38 sec.

tf properties sysadm.sln 3 sec.

So it looks like something with the client, but the problem exist on all clients, so that points to problems with the server

/kim





Re: Team Foundation Server - Version Control tf command very slow

Kim Carlsen

Hi

Anything new in this

regards

Kim





Re: Team Foundation Server - Version Control tf command very slow

Bill Tutt - MSFT

What kind of client machine do you have i.e. CPU speed, memory in PC, etc...

Thanks,

Bill






Re: Team Foundation Server - Version Control tf command very slow

Kim Carlsen

Hi

Sure

Client it's a P4 3.0GHz. 1Gb of RAM. 100Mbit network on same subnet as the VSTS servers. OS: Win XP sp2 with all hotfixes from MS update installed.

DB tier: AMD opeteron 2.25 GHz. 2Gb of Ram. 1GBit LAN. OS: Win 2003 R2 x64 sp2 with all hotfixes from MS Update installed

App tier: Intel Xeon 3.0GHz Win 2003 R2 3.5Gb of RAM. 1Gbit LAN. OS: win 2003 R2 sp2 with all hotfixes from MS Update installed

The servers are only used for VSTS.

Regards

Kim





Re: Team Foundation Server - Version Control tf command very slow

Buck Hodges

I'm fairly certain I know what's going on here. The .NET framework network classes use your LAN connection settings from IE by default. I'm virtually certain the problem here is that the request is hitting your network proxy (e.g., ISA). This snippet of the trace is the give away (because I know what part of the code it's timing, not because it should be obvious in general).

31-05-2007 09:00:41 (pid 3452, tid 3844, 484 ms) Using cache file path C:\Documents and Settings\kca\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\VersionControl.config
31-05-2007 09:00:48 (pid 3452, tid 3844, 6828 ms) ConnectionLimit = 32, BypassProxyOnLocal = False, EnableCompression = True, DefaultTimeout = 300000
31-05-2007 09:00:48 (pid 3452, tid 3844, 6875 ms) User agent: Team Foundation (TF.exe, 8.0.50727.762)
31-05-2007 09:01:01 (pid 3452, tid 3844, 20125 ms) Web method running: [http://crush:8080/Services/v1.0/Registration.asmx] GetRegistrationEntries[Ser]
31-05-2007 09:01:02 (pid 3452, tid 3844, 21015 ms) Web method response: [http://crush:8080/Services/v1.0/Registration.asmx] GetRegistrationEntries[Ser] 1042 ms
31-05-2007 09:01:02 (pid 3452, tid 3844, 21281 ms) Time spent getting service URL ISCCProvider: 20540 ms

Before we do anything with the call to the server, only 484 ms have elapsed. By the time we make the first call to the registration service, 20 seconds have elapsed! One of the things that happens is that the .NET network code will look up your LAN connection settings and call the proxy if one is specified and then evaluate the rules. That can be quite a slow process.

Here's how to fix the problem: http://blogs.msdn.com/buckh/archive/2005/12/12/503015.aspx. To guarantee that the problem doesn't come back (and tweaking your IE settings could cause you other issues, depending on your corporate network), you might want to go with the registry setting described at the end of the section.

Check LAN connection settings (applies now and for RTM)

First, check your LAN connection settings in Internet Explorer (Tools -> Internet Options -> Connections -> LAN Settings). Often, the best settings are either to have no boxes checked or to have both of the bottom two checkboxes checked, "Use a proxy server" and "Bypass proxy server for local addresses." The reason is that the .NET 2.0 framework network code gets its settings from the settings in IE. Prior to the December CTP, there was no way to override this.

How much difference does it make It makes a 1 - 2 second difference per tf.exe execution on our network. Of course, these settings may not work on your network, either for tf.exe or IE, depending upon your network configuration; you'll need to test it.

Beginning with the December CTP, there is an optional registry setting that you can use to tell the Team Foundation client to bypass the proxy server without changing your IE settings. In HKCU (per user) or HKLM (global), you can create the registry entry Software\Microsoft\VisualStudio\8.0\TeamFoundation\RequestSettings\BypassProxyOnLocal of type string with the value "true" to get the improved performance.

Buck






Re: Team Foundation Server - Version Control tf command very slow

Kim Carlsen

Hi

Thanks.

The .Net is not the most clever thing...

We tried it with the reg setting(HKLM) with no luck.

But if we disable proxy settings in IE it works.

So now the problem is only how do we disable it only for TF and not the entire system

Kim