Skip to main content

How many agents a node runs

A node has no fixed number of agents it can run. What decides how many fit is the work the agents do there, not the agents themselves. This page explains what uses a node's memory and CPU, how to tell when a node is full, and how the different kinds of node can work side by side.

What uses a node's memory and CPU​

An agent (a runner) is light. Each one uses about 300 to 500 MB of memory and about a tenth of one CPU core while its task runs. Ten agents need about 5 GB of memory and less than one core; a hundred need ten times that.

The heavy part is what each agent runs for its task: building the project, starting its app (the stack in each slot, when the project runs one) and running its automated tests. That is why two projects of the same size can need very different nodes. A small project with many heavy tests can need more than a large project with few or fast tests.

An agent exists only while its task runs. A node with no running tasks runs no agents and uses almost nothing.

How many tasks one node takes​

A node takes a new task whenever it has a free worktree for the task's project. Three things can hold a task back even then:

A task that can't start waits in Queued until there is room. Nothing crashes when you reach a limit; new work waits. A good starting point for one node is one task for every 8 GB of memory or every 2 CPUs, whichever runs out first. The hint on Max running tasks suggests this number for each node.

When to add a node​

Each node's load shows on Directory › Machines: its Load bars turn yellow, then red, as CPU, memory or disk fill up. Jaah spreads tasks across your nodes, preferring the least busy.

Add capacity when nodes stay in the red, or when tasks wait in Queued for a node while your plan and model accounts still have room. You can also make the work lighter: faster or fewer tests free a node as much as a bigger machine does. To read a node's busiest week, see Check whether a node is big enough; to find what is heavy, see Find what is overloading a node.

Shared and Dedicated nodes​

You can rent two kinds of node from Jaah in Billing:

  • A Shared node is a virtual node on one of Jaah's servers, which several organizations use, each kept apart. While the server is quiet, your node can use the whole server, often several times the power of a cloud machine at the same price. When other organizations are busy on the same server at the same time, it gets slower.
  • A Dedicated node is a machine for your organization alone. Its speed doesn't depend on anyone else. It is worth it when you will keep it busy most of the time, much as with web hosting.

See Buy a hosted node.

Mixing kinds of node​

One organization can use many nodes, up to your plan's Nodes limit, and they can be of any kinds at once: Shared and Dedicated nodes rented from Jaah, machines launched in your own cloud account, and machines you run yourself. They all appear on Machines and take tasks the same way.

Every project runs on all your enabled nodes unless you choose otherwise. To keep a project on certain nodes, for example a project with heavy tests on a Dedicated node, use node groups: see Run a project on some nodes only.