Similar issue here (hopefully not hijacking the topic).  I have a small-ish
playbook that runs a handful of roles that distribute files, set passwords,
cron jobs, etc.  On a single host it runs in about 35 seconds.  With
Ansible 2.4 I could run it across about 1000 hosts and it would complete in
just under 30 minutes.  With Ansible 2.5 it takes 56 minutes and Ansible
2.6 it takes about 63 minutes.  A longer playbook we run nightly across the
same number of hosts in 3 and a half hours with Ansible 2.4 now takes 8 and
a half hours with 2.6.

We've resorted to tricks to speed things up such as running the playbook in
a wrapper that cuts the host list up into groups of 100 for each playbook
run (running the big playbook with free strategy on 1000 hosts is a good
way to exhaust all of the memory on our Ansible server).

Tips to identify the bottlenecks would be great.

--
Steve

On Mon, Aug 6, 2018, 6:46 PM Pshem Kowalczyk <[email protected]> wrote:

> Hi,
>
> We have a scenario where we pre-generate a lot of configuration on the
> controller host (targets are generally network devices, so not capable of
> running python).
> Typical generation process involves pulling data from a number odelef
> different systems (over APIs), running some local modules - mostly
> 'template'. A typical run for a single devices can have up to 500-700
> tasks.
>
> A single device can be done under 5 minutes in most cases (including
> deployment). All the generation already runs with "strategy: free". Once we
> go to bigger deployments - 10-15 devices the time that's need gets
> significantly longer (40-50 minutes is not unusual). We tried throwing CPUs
> at the problem, but it looks like only one-two CPUs get ever to 100% whilst
> the rest of them seems to be near-idle (regardless of "fork" values).
> There's plenty of RAM too (utilisation hardly ever goes over 3-4GB).
>
> Is there a way for Ansible to utilise all the CPUs? I realise this might
> not be a typical case, but we're looking now at deployments that have 30-40
> devices and waiting 3h for completion is not something we'd want to see.
>
> kind regards
> Pshem
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAEaZiRV1pLwu-F-%3D4uzx6_zOy78HaXP-XC2G634c1s66t2x3rw%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAEaZiRV1pLwu-F-%3D4uzx6_zOy78HaXP-XC2G634c1s66t2x3rw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFbiokdDVosUsmVOx4jYXe_BVPGWBBXET9C7xaEnHkOYBYhb_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to