Le mercredi 5 août 2015 15:58:23 UTC+2, Brian Coca a écrit :
>
>
> @florent, seems like you are hitting resource constraints on your 
> ansible machine, try lower number of forks. 
>
> -- 
> Brian Coca 
>

What type of resource constraint would be we be talking of?

Using wireshark, it seems ansible is not firing up enough DNS requests from 
the beginning (and only small batchs of requests during the whole execution 
after that) so that it would honor "forks" simultaneous SSH connections.

So I went down the hypothesis that something is wrong about DNS resolution 
or dealing with unreachable hosts: I added ansible_ssh_host=<IP> for each 
host, removed unreachable hosts from the inventory and ran a ping again:

$ time ansible all -i inventory_test -m ping --forks 5
real    0m21.618s
user    0m3.762s
sys    0m1.391s


$ time ansible all -i inventory_test -m ping --forks 20
real    0m17.872s
user    0m5.063s
sys    0m1.840s

$ time ansible all -i inventory_test -m ping --forks 100
real    0m17.341s
user    0m7.701s
sys    0m2.968s

Ok, there could be a very slow DNS resolver here on my side, but that 
wouldn't prevent ansible to put "forks" requests at a time. The good point 
is that we can see that forks=100 is faster that forks=5 for 73 hosts, 
which is expected.

Is the handling of DNS requests by ansible "costly" in term of resources, 
that would imply reducing "--forks" on the control machine? 
Is it something that would alter the code path and induced some sort of 
lock or degrade parallelism compared to the same tasks/modules calls when 
dealing directly with IP addresses in inventory?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/861d2bdf-9e90-4477-8f7f-b143a4e0c161%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to