Hi Everyone,
A little about my environment. We run TeamCity 7.1.1 on Windows Server 2003 and have about 20 build agents, mostly Windows 7 x64 VMs. We run the build agents in the console.
I've been encouraged to optimize our build agents in order to deliver faster builds and to provide a better CI environment. I determined our disk system might be a bottleneck and started playing around with putting the build agent working directories on RAM disks and SSDs. I saw some improvements, 10 - 15% faster times, however I still wasn't getting the performance I thought I should.
Investigating what processes might be consuming I/O from the builds, I noticed that the java.exe process for the build agent was running with its Base Priority (CPU) set to "idle" and its I/O priority set to "very low". I saw this using a couple different process monitors such as ProcessHacker and Process Lasso. After increasing the Java process base and I/O priorities to "normal", build times descreased substantially. I've included an example of the build times for one of our configs:
Build Time Report Base Priority Set to Idle - I/O Priority set to very low (default setting)
----------------------------------------------------------------------
SetEnvVariables 00:00:00.0318016
Compile 00:04:07.6677416
Build Time Report Base Priority set to Normal - I/O Priority set to very low
----------------------------------------------------------------------
SetEnvVariables 00:00:00.0230479
Build Time Report Base Priority set to Normal - I/O Priority set to Normal
----------------------------------------------------------------------
SetEnvVariables 00:00:00.0205526
As you can see, the build with CPU and I/O priorities set to Normal ran 5m:20s faster! This build agent was on an SSD so I/O priority seemed to have a larger impact.
Now my question is, why is the java process priority set to idle and I/O priority set to very low? Is this only when running the agent in the console? We have one Windows 2003 BA that runs the agent as a service and the java process runs under a normal priority.
Is there any way to change this in TeamCity? Maybe when launching the build agent? For now, I'm using ProcessLasso to force all java.exe processes to normal CPU and I/O priorities.
Dylan