Perforce checkout is insanely slow.

Hi folks,

  I'm trying to set up a build server at work, using TeamCity, Perforce, NUnit and MSBuild.
  However, I seem to be encountering massive difficulties with the perforce integration within TeamCity:

  Every time I want to run a build, TeamCity does a full checkout of the entire workspace (~400Meg).
  This would not be a huge issue if it wasn't for the fact that this checkout takes about TWO HOURS!

  Is this a known issue with TeamCity, or have I set something up wrong? The perforce server is literally next to the build server, and checkout normally takes ~ 1 minute when done via P4V.

  Any help would be much appreciated!

  Cheers, Ed

9 comments

quick screenshot showing the transfer speed here:



Attachment(s):
teamcity.jpg
0

Hello Ed,

  TeamCity uses another way to perform checkout from Perforce than it is done in P4V command.
  But still, it is much too slow in your case.

  What version of P4 server do you use? Is it installed on Windows or Linux?

  Kind regards,
  KIR

0

Kirill,

Thanks for the swift reply:

I checked using the p4.exe as well, and it seems to be suffering from the same issue (fine on cmd, slow via TS).

Our perforce is version P4D/NTX86/2007.2/122958 running on Windows Server 2003.

Cheers, Ed.

0

Hello Ed,

  Could you please explain why do you need to perform full checkout on each build? Do you have a corresponding option enabled in your build configuration settings?

  Another question is - are there chances that you have any antivirus on the TeamCity server which could slow down checkout process?

  Could you please attach TeamCity/logs/teamcity-vcs.log.

  Regards,
  KIR

0

Kirill,

   I'm sorry, it seems that the full checkout was taking place due to a configuration issue breaking the build just after checkout.
   If I manually assign the working directory of the Build Agent it does not need to repeatedly check out, so this is no longer as much of as issue: incremental changes are reasonably fast (still not comparable to p4.exe, but fast enough).

   The log is attached: I'm not massively worried about this issue anymore, as the repeated checkouts are no longer a problem, but it'd be nice if I didn't have to wait two hours next time I add a new project to TC !

   Thanks, Ed



Attachment(s):
teamcity-vcs.log.zip
0

Hi Kir,

Speaking of anti-virus, are there known issues with Perforce checkout and AV? Any particular AV packages and workarounds?

Thanks,

Oleg.

0

Hello Oleg,

  Upon checkout, TeamCity may create many temporary files. In a case of active antivirus, this process can be slow because antivirus will verify checked out files.

  On the other hand, we know about a case when antivirus found an infected file which was placed to VCS repository and wasn't checked out because of antivirus check.

  So, from position of performance, it may be better to disable antivirus checks for temporary files created by TeamCity. From position of better safety, don't do this

  Regards,
  KIR

0

Hello Ed,

  You may also want to know that we started working on Perforce checkout on agent feature, and this feature will use usual p4 sync command to obtain sources.
  Please watch the issue: http://youtrack.jetbrains.net/issue/TW-2103

  Kind regards,
  KIR

0

Makes sense, thanks for the explanation!

0

Please sign in to leave a comment.