Categories

Category cover

Automation
155 posts

Category cover

Learning paths
119 posts

Category cover

CISO
22 posts

Category cover

Security
20 posts

Category cover

Notes
19 posts

Category cover

Personal Security
18 posts

Category cover

Infrastructure
12 posts

Category cover

OT/ICS
5 posts

Category cover

Books
3 posts

Category cover

UNetLab
3 posts

Category cover

Write-up
3 posts

Category cover

OSInt
2 posts

Category cover

My life
1 posts

Boosting Ansible performance

Andrea Dainese
November 13, 2024
Post cover

While Ansible is an ideal choice in terms of accessibility, it’s certainly not the best choice for those seeking performance. Let’s look at

While Ansible is an ideal choice in terms of accessibility, it’s certainly not the best choice for those seeking performance.

Let’s look at some specific configurations that allow us to improve performance in a simple way.

Parallelism (fork)

The first configuration concerns the number of forks, which are the parallel processes that interact with devices. In general, it should be a number proportional to the number of processors, however, it’s important to consider that much of the playbook time is actually spent waiting for the device to execute a specific command. The optimal value for forks could therefore be double the number of available processors, but it can be further increased. Obviously, the value of forks improves performance only if the playbook is executed in parallel on multiple nodes. Otherwise, it has no influence.

[defaults]
forks = 8

Dependency (strategy)

The second value concerns the execution strategy (strategy). There are two types of strategies: linear and free.

Continue reading the post on Patreon .