0 Replies Last post: Jan 18, 2013 4:00 AM by dylan charleston  
dylan charleston Newbie 1 posts since
Jan 18, 2013
Currently Being Moderated

Jan 18, 2013 4:00 AM

Java.exe Windows base priority for build Agents

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
Package         00:08:32.7553923
Deploy          00:00:01.8093662
Finish          00:00:01.8180569
Total:          00:12:42.6997737
Build Time Report Base Priority set to Normal - I/O Priority set to very low
----------------------------------------------------------------------
SetEnvVariables 00:00:00.0230479
Compile         00:02:23.1678666
Package         00:08:54.9456761
Deploy          00:00:01.7453866
Finish          00:00:01.7533541
Total:          00:11:20.2380578
Build Time Report Base Priority set to Normal - I/O Priority set to Normal
----------------------------------------------------------------------
SetEnvVariables 00:00:00.0205526
Compile         00:00:19.7414318
Package         00:07:08.3123055
Deploy          00:00:01.5362373
Finish          00:00:01.5425122
Total:          00:07:29.9775496
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

More Like This

  • Retrieving data ...