On 12.12.2018 11:22, pradeep.hk wrote:
The requirement is to be able to launch a playbook on receiving a
request
(ie on demand). So, if 100 requests are received, it will result in 100
playbooks being executed parallely.
You mentioned - Ansible uses about 50MB of memory per playbook. Is
there
something that can be done to optimize on that ?
50MB is just the minimum, it might be a lot more depending on playbook.
I highly doubt there is much that can be done.
Just a Hello World in python uses 7MB
$ /usr/bin/time -f %M python -c 'print "Hello World"'
Hello World
Mem used in kB: 7316
An Ansible equivalent Hello World uses 48MB
$ /usr/bin/time -f "Mem used in kB: %M" ansible-playbook test.yml
PLAY [localhost]
***********************************************************
TASK [debug]
***************************************************************
ok: [localhost] => {}
MSG:
Hello World
PLAY RECAP
*****************************************************************
localhost : ok=1 changed=0 unreachable=0
failed=0
Mem used in kB: 48316
If you use Ansible dynamic inventory you can easily change the inventory
depending on the dynamic demand.
--
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/80702613db1fbd53e07976621c7a5a8c%40olstad.com.
For more options, visit https://groups.google.com/d/optout.