Thanks a lot. That worked
On Wednesday, December 12, 2018 at 3:09:32 PM UTC+5:30, Kai Stian Olstad wrote: > > On 12.12.2018 07:53, pradeep.hk wrote: > > I have a requirement to run lots of playbooks parallely on localhost. > > When I run 100 playbooks parallely (a simple one that executes the a > > shell > > command - date) , I see that > > it consumes lot of resources (memory ~ 7GiB and CPU ~ 200%) > > Is this on expected lines ? > > It sound about right. > > For small execution Ansible uses about 50MB of memmory, 50MB * 100 is > about 5GB. > > > But since you are running the same playbook on the same host you could > instead do this > > In inventory add > > [testgroup] > testhost[001:100 > > And in ansible.cfg set fork=100 > > And the playbook > > - hosts: testgruop > connection: local > gather_facts: no > tasks: > - name: Get date > shell: date > register: result > > - debug: > var: result.stdout > > > This will only use a little over 50MB and not GB of memory and a lot > less CPU. > > > Your test case seams to me not very relevant, but if it is, let Ansible > fork and not the OS. > > -- > Kai Stian Olstad > -- 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/ba898f9e-78d1-4e69-8677-3803fb84474c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.