General guidelines for improving Elastic Agent startup times

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

As a baseline, a Bamboo Elastic agent running on the Stock Linux AMI on a m5.large takes about 2 minutes to start and connect to the Bamboo Server. If it is taking much longer than that, here are some general guidelines on improving it.

It is understood that Windows Elastic Agents take longer to start than Linux agents:

  • BAM-12459 - Getting issue details... STATUS


Solution

Instance type

Use an EC2 Instance Type which has more compute and compare the startup time to see if it improves by much. Avoid instance types with 1 vCPU such as m3.medium. Moving from a m3.medium to a m3.large improved start-up times from 10 minutes to 3 minutes.

Increase heap memory for the agent

If you are running third-party apps, some may require more heap to initialize. For example, Artifactory for Bamboo requires more memory than the default heap configuration and can cause excessive GC and thus prolonged start times. You can increase elastic agent heap size from the default of either 256m or 512m (depending on Bamboo version) to 1024m to counteract this:

Note, by doing this, you'll be using more total memory for the agent which means there will be less available for build processes and the operating system. Balance this accordingly with total system memory.

Custom AMI snapshot

If using a custom AMI, ensure the snapshot of the AMI is taken after the agent has connected for the first time so that caches are populated.

Remove unneeded plugins

Remove any unneeded third-party apps/plugins from the Bamboo Administration >> Manage apps as each plugin must be synced to the agent and initialized.

Startup script

Optimize your Instance startup script if you have one configured at Bamboo Administration >> Image Configurations >> Edit >> Instance startup script as a long running script can prolong agent start


Last modified on Mar 3, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.