Ansible Performance

From tannerjc wiki
Jump to: navigation, search

areas of performance

Every layer of the stack as described in is potentially a source of performance issues.


getting started

many tasks

many hosts

many groups

many vars



Duration is a measurement of time. There are multiple facets of "duration" when observing Ansible.

  • total duration of a playbook
  • total duration of a task
  • total duration of a host within a task
  • total duration of an ssh call for a host within a task
  • total duration of wating for a sudo password prompt
  • total duration of executing python on the remote host
  • total duration of processing the results for a host/worker

cpu utilization

Aka CPU time. Many tools exist to measure cpu time / utilization and it's important to understand the various metrics each provides.

An important metric for basic ansible cpu utilization is the "b" (aka "blocked) column from vmstat.

Multiple factors could cause the number of blocked processes to accumulate.

  • not enough cpu cores
    • setting ansible's fork count too high
  • not enough memory
    • too many hosts returning too much data for the controller to handle
  • not enough disk IOPs

memory utilization

disk utilization

network utilization




additional reading