Enabling automatic scaling of the number of agents

1 minute readScalability

By default, the CloudBees Build Acceleration installer configures a fixed number of agents. You can take it a step further by configuring the agent service to automatically start the number of agents according to the number of CPUs on the host.

A main benefit of this functionality is that this facilitates using a single image (such as an Amazon AMI, Azure image , or GCP image ) that you use for cloud bursting as a template across many different instance types, regardless of the CPU count on each type, to get the ideal number of agents.

Enabling this feature requires manual modification of agent configuration settings as described below.

Linux hosts

  • Open the /etc/sysconfig/ecagent.conf file.

  • Set the values of AGENT_NUMBER and SHARED_AGENT_NUMBER to auto.

  • Restart the agent service by entering:

    sudo /etc/init.d/ecagent restart

Windows hosts

  • Open Registry Editor.

  • In the following registry path:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ElectricAgent\Parameters

    set the value of the agentCount registry key to auto .

  • Open the Services control panel, right-click the CloudBees Build Acceleration Agent service, and choose Restart.

On Windows platforms, you cannot start more agents automatically than were set during installation. If you plan to use auto, you should set the number of agents during installation to ensure enough agents for this feature.