Unable to render embedded object: File (TeamCity48.png) not found.

TeamCity 2018.x Documentation

Documentation for Previous Versions


You are viewing the documentation of TeamCity 2018.x, which is not the most recently released version of TeamCity.
View this page in the latest documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.


Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • the 32-bit JVM can reliably work with up to 1Gb heap memory (-Xmx1024m). (This can be increased to -Xmx1200m, but JVM under Windows might crash occasionally with this setting.) If more memory is necessary, the 64-bit JVM should be used with not less than 2.5Gb assigned (-Xmx2500m). Unless the TeamCity server runs with more than 100 agents or serves very active builds / thousands of users, it's unlikely that you will need to dedicate more than 4Gb of memory to the TeamCity process.
  • A rule of thumb is that the 64-bit JVM should be assigned twice as much memory as the 32-bit for the same application. If you switch to the 64-bit JVM, make sure you adjust the memory setting ( -Xmx) accordingly. It does not make sense to switch to 64 bit if you dedicate less than the double amount of memory to the application.
  • Large TeamCity installations might benefit from more fine tuning of the memory settings. The amount of memory dedicated to TeamCity server JVM should not regularly exceed 60% of the total available physical memory on the machine (to allow for nested process and OS-level caches usage). Also, with heaps (–Xmx) set to more than 8Gb, if the machine has many CPU cores (e.g. more than 8) and current CPU usage is below 60%, enabling G1 JVM garbage collector via "-XX:+UseG1GC" JVM option might reduce the length of stop-the-world GC pauses.

The recommended approach is to start with initial settings and monitor for the percentage of used memory using the Administration | Diagnostics page. If the server uses more than 80% of memory consistently without drops for tens of minutes, that is probably a sign to increase the -Xmx memory value by another 20%.

Wiki Markup

If you run TeamCity via {{runAll}} or {{teamcity-server}} scripts or via Windows service installed during TeamCity installation, the default setting of 512 Mb for the heap and 150 Mb for the PermGen are used. If you need to change the settings, please refer to [Configuring TeamCity Server Startup Properties|Configuring TeamCity Server Startup Properties#JVMProperties]. If you run TeamCity using .war distribution please refer to the manual of the application server to change the memory settings. The actual memory consumption will be (e.g. 100Mb) higher since JVM itself uses memory too.