What is a Jenkins Executor and how can I best utilize my executors

Issue

I’d like to understand what is a Jenkins executor, and how to best manage executors

Environment

  • CloudBees Jenkins Enterprise
  • CloudBees Jenkins Operations Center

Resolution

A Jenkins executor is one of the basic building blocks which allow a build to run on a node/slave (e.g. build server). Think
of an executor as a single “process ID”, or as the basic unit of resource that Jenkins executes on your machine to run a
build. Please see Jenkins Terminology for more details regarding
executors, nodes/slaves, as well as other foundational pieces of Jenkins.

CloudBees Jenkins Operations Center (CJOC) has six licensing options.
In most cases, the “License (no dedicated executors)” option is recommended, as this allows CJOC to manage the total pool of
executors, allocating to each of the CloudBees Jenkins Enterprise (CJE) instances as needed.

Using CJOC is the most efficient approach to making the most use of your available executors (and node/slave resources as
well). If Shared Slaves or
Shared Cloud resources are
defined at the parent CJOC level, the children CJE instances can scale up/down as needed to make the best use of the total
resources. It is a more efficient approach to define Shared slave resources using a total allocation of 40 executors at the
CJOC level, than it is to define local slaves attached to 4 JE instances with each consuming 10 executors - a scenario that
is much more likely to result in queued builds due to Executor Starvation.

Default Jenkins Behavior
explains how executors function on available nodes. CloudBees Jenkins Enterprise includes some features to help manage and
make the best use of your executors, to prevent the common issue of Executor Starvation.
Please see the Even Loading Strategy and Even Scheduler Plugin for more details.

If you are only running one CJE instance (without CJOC), it is recommended to allocate executors
to slave machines, rather than on the Jenkins master - to avoid potential security vulnerabilities,
Out-Of-Memory and other performance issues.
To do this, configure the “# of executors” to ‘0’ on the “master” node (by default this setting is ‘2’)

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.