Ansible 2.4.0 (rc4 or rc5) seems significantly slower than Ansible 2.3.2

Any reasons for a significative slowdown ?

For the playbook used for my early 2.a testing, this almost double the execution time

running:
time ansible-playbook […]

with the same playbook against the same target system (same configuration file, inventory, same callback plugin code, …)

when running with 2.3.2 (a packged version for Fedora)

ansible-playbook 2.3.2.0
config file = /home/eveque/.ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Sep 5 2017, 08:53:59) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]

=>

real 0m14.466s
user 0m3.302s
sys 0m1.508s

when running with the rc4 (idem or rc5) checkout I got:

ansible-playbook 2.4.0.0 (detached HEAD d25106e387) last updated 2017/09/18 15:12:29 (GMT +200)
config file = /home/eveque/.ansible.cfg
configured module search path = [u’/home/eveque/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /home/eveque/workspace/ansible/lib/ansible
executable location = /home/eveque/workspace/ansible/bin/ansible-playbook
python version = 2.7.13 (default, Sep 5 2017, 08:53:59) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]
Using /home/eveque/.ansible.cfg as config file

=>

real 0m26.365s
user 0m5.776s
sys 0m3.282s

Please see https://github.com/ansible/ansible/blob/stable-2.4/CHANGELOG.md for the changes

I would suggest you check that “pipelining = True” vs the default of False.

Thanks for the suggestion.

Based on previous cli output one can see the config file is /home/eveque/.ansible.cfg for both runs
and it do have “pipelining = True”.

Also confirmed when in 2.4.0 environment with ansible-config (thanks for pointing ansible-config)

ansible-config dump | grep SSH_PIPELINING
ANSIBLE_SSH_PIPELINING(/home/eveque/.ansible.cfg) = True

so something else at play here I think

Open a ticket about performance, so we can track and fix any inefficiencies.

One factor is probably inventory, for some cases it will be much
faster (lots of group/host_vars are now read on demand) for others it
is probably a bit slower, as the new plugin system is not as efficient
as 'everything hardcoded inline'.

see https://github.com/ansible/ansible/issues/30519