Help documentation

 

Performance Tuning

Capacity Planning

This section provides recommendations to evaluate server hardware and memory requirements for your Go server. It also highlights some configurations which need to be taken care of when scaling Go.

Minimum server requirements

The minimum requirements for a Go server can be found here

Scaling Go

As the number of pipelines, agents and concurrent users increase in your setup, Go server may have to be scaled up by adding more memory and cores.

If you have questions or have custom requirements, please contact support@thoughtworks.com to help with capacity planning for Go server

Things to Remember

  • Do not run any other CPU intensive applications on the same box as the Go Server.
  • When the Go server is being scaled up to run with larger number of pipeline, agents and materials, ensure that the JVM has been allocated appropriate heap sizes. The default values for the Go server are -Xms512m (minimum) and -Xmx1024m (maximum). These values can be increased by setting the environment variables SERVER_MEM (for minimum) and SERVER_MAX_MEM (for maximum).
  • For linux/unix users: If more than 100 agents are being used, an exception might be seen in go-server.log mentioning "Too many open files". This may be an indication that there is a need to increase the number of file descriptors on the machine where Go Server is installed. On linux the command 'ulimit -n' can be used to check the total number of file descriptors. To bump up the total number for file descriptors user and system, follow these steps:
    1. Edit /etc/security/limits.conf and add the lines: * soft nofile 1024 * hard nofile 65535
    2. Edit /etc/pam.d/login, adding the line: session required /lib/security/pam_limits.so
    3. The system file descriptor limit can be increased by setting "fs.file-max" in the file "/etc/sysctl.conf". To set the limit to 65535 use echo "fs.file-max = 65535" >> /etc/sysctl.conf
  • Tuning your JVM

    Ensure that the latest JVM is used always, as there are major performance improvements with every release.

  • The minimum and maximum JVM heap space allocated to the Go server affects its performance. Go uses default values of 512m and 1024m for minimum and maximum JVM heap sizes respectively. However, for production environments, we recommend setting the minimum and maximum values to an identical value.
  • The default heap settings mentioned above are for a 32-bit JVM. But if the Go server is facing performance issues we recommend doubling the values in the heap settings and measuring performance. If its seen that more than 3 GB of heap memory is needed, we recommend a switch to 64-bit JVM. Our tests show that Go server performs much better on a 64 bit JVM than a 32 bit JVM provided the heap memory has been increased appropriately. This is needed because 64-bit JVM makes use of 64-bit addresses instead of 32bits, allowing it to use more memory.
  • Start with the default settings and increase the heap memory incrementally to suit your application.
  • Storage

  • For optimal performance in artifact transfer Go would need storage with good disk I/O throughput. We recommend local storage for Go database and artifacts. Disk space can be reclaimed through deletion of historical artifacts.
  • If using network storage is preferred, ensure that the speeds and throughput are good.
  • Use RAID Configuration for higher throughput if the Go Server is expected to be an intensive setup. If you expect to have large artifacts you could use use different RAID configurations for Go database and artifacts. For example, 2 drives on RAID1 can be be used for the Go database (for redundancy), 3+ hard drives on RAID5 can be used for artifacts so that access to database and artifacts is optimized.
  • Troubleshooting