Do you have a lot of vaulted vars?
which python version are you using?
Might be worth using the profile_tasks callbacks to see where the time is being spent. Is every task just taking 6 times longer, or is it specific tasks.
| full inventory minimal inventory| (9000 groups) (1 group + _meta)---------------+------------------------------------ ------ansible 2.1 | 12m45s 4m59s 2.6xansible 1.9.4 | 3m34s 2m26s 1.5x1 Play, 148 hosts, 22 tasks
task_includes_static = yeshandler_includes_static = yes
Hey, thanks for this.Seeing this thread again has reminded me that I was curious about the number of groups you have in relation to the number of hosts. If I read the above right you have nearly 9000 groups but 'a couple of thousand' of hosts. So hosts are members of multiple groups.
I'm interested to know what problems organising groups and hosts in this way solves - or perhaps its the only way to deal with whatever you are dealing with. Partly I'm just curious as you are clearly operating at a scale that I'm nowhere near, and partly just to see if the collective brains round here might have another way to organise things that might speed stuff up for you.
--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Some work was recently started looking into some performance issues around inventory that may provide improvements. See https://github.com/ansible/ansible/compare/fix_inv_vars_loading
At first when the inventory is read, the groups and their members are evaluated and every member host packed into a Host object. And then later for every host in get_vars() the global list of groups is iterated over again to generate the 'groups' magic variable. So each group is unpacked, the Host objects looked at and their name extracted in that list comprehension. And we do this over and over again, for a hash that should be global and unique!
Have you noticed any improvement on this front? I'm still on 1.9.4 because of these issues.
Thanks,
Igor
Hi Tobias,Have you noticed any improvement on this front? I'm still on 1.9.4 because of these issues.
An "apply common stuff" playbook with --check over 164 hosts.
Ansible 1.9.4: 9 Minutes
Ansible 2.1-stable branch: 51 Minutes !
Ansible devel: stuck somewhere in the middle, no progress two hours later, but using CPU nonetheless: