> > On Tuesday, August 4, 2015 at 8:57:49 PM UTC+5:30, Brian Coca wrote: 
>> >> 
>> >> to be more specific, all hosts will complete in the time of your 
>> >> slowest host, as they wait for it on each task. 
>> >> 
>> -- 
>> Brian Coca 
>>
>
I have a similar issue. I've take out of the picture the playbooks I 
usually use, and get to simply use the ping module to isolate the issue. 
Execution context: 

   - my inventory has less than  100 hosts, with only their name in it 
   - ssh connection by default to "smart", but with public key 
   authentication
   - SSH ControlMaster feature is disabled to be able to get constant 
   connection time.

What I expect: when getting Forks > Number of machines, as you said, the 
total execution time should be equal to the slowest host, or to the 
connection timeout (I've intentionnally left unreachable hosts in my 
inventory).

What I have:


# time ansible all -i inventory.yml -m ping --forks 5

real    2m40.552s
user    0m3.989s
sys    0m1.760s


# time ansible all -i inventory.yml -m ping --forks 100

real    3m6.231s
user    0m8.267s
sys    0m4.404s


This is 100% reproducible, forks = 100 is always slower than forks = 5 or 
less. Control machine (laptop i5/8Go RAM) is not having RAM or CPU issue 
while the command runs, and it happens in a ansible dedicated virtual 
machine too.

Whith forks set to 100, the output highly suggest some kind of sequential 
bottleneck (very slow output, 1 host at a time), while with forks = 2 I can 
see results displayed 2 by 2 with, each step taking at maximum the 
connection timeout for unreachable hosts.


If you have any suggestion concerning any detail I could/should dig deeper, 
please share :)

-- 
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/70256ca1-4452-4978-a86f-2013c63cfd42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to