Is it feasible to run multiple Jenkins agents on a 2-in-1 laptop?

Hi everyone,

I’m considering setting up a Jenkins environment and am curious about the practicality of running multiple Jenkins agents on a 2-in-1 laptop. I’ve seen varying opinions on this topic, and I’d love to hear your experiences and insights.

Here are some points I’m particularly interested in:

Do you think a typical 2 in 1 laptop has enough resources (CPU, RAM) to efficiently run multiple Jenkins agents? What specs should I be looking for?

What specific configurations are necessary to set up multiple agents on a 2-in-1? Are there any best practices for managing resources?

How should I configure network settings for the agents to ensure smooth communication with the Jenkins controller? Are there any common pitfalls?

If you’ve successfully set up multiple Jenkins agents on a 2-in-1 laptop, could you share your setup and any challenges you faced?

If running multiple agents proves to be too resource-intensive, what alternatives would you suggest?

I’m excited to dive into this project and appreciate any guidance or insights you can provide. Looking forward to your thoughts!

Thanks in advance!

The required resources strongly depend on what you’re doing on an agent.
The java process of an agent itself doesn’t need much resources usually (although I’ve seen it happening that working with a huge git repo required a lot of memory because it tried to read in the changes since last build which was an older state).
But what you start will usually require more resources, e.g. compiling a bigger C/C++ project.
I’ve also run 2 agents on the same machine before, one agent (only 1 executor) for a heavyweight build process and a second agent for running small, fast scripts (several executors).
Make sure the 2 agents have different working directories and usually you want to give them different labels.