On Wed, 27 Nov 2013, Jerome Wagner wrote:
thank you for your help !
Jerome
--
*test procedure :*
* a simple playbook repeating 10 times a simple task on all hosts (3 remote
hosts: cheap ovh vm)
* connection to remotes via ssh keys
* 2 runs only keep the values for the second run.
- hosts: all
gather_facts: no
tasks:
- debug: msg="ping"
.. repeated 10 times
*results:*
*10 x debug: msg="ping" *
* ssh : 0.8 seconds
* accelerate : 1.5 seconds
*10 x script: echo.sh *(the script only does echo "ping")
* ssh: 15 seconds
* accelerate: 10 seconds
*10 x command: echo "ping"*
* ssh : 41 seconds
* accelerate : 33.8 seconds
Comparing performance between debug, raw, command, shell and script may
give you a good view on the different overhead of both SSH,
SSH+python, SSH+python+shell, SSH+python+upload+shell.
When using -vvv you can see exactly what the SSH related overhead is. The
fact tha Ansible only starts with the next task before the previous has
finished (for all hosts) does not make it very fast, but is perfect for
orchestration and predictability. If you don't need this, see async to
speed it up. Or run ansible in more "slices" with less systems per
"slice".
Personally, I think there's some merit in optimizing the paramiko
transport, because Ansible knows best when a channel is going to be
reused, and when it can be closed. So not adding this layer to reuse
SSH-connections in Ansible/paramiko is a lost opportunity to have a
great out-of-the-box experience.
Besides, in large enterprises, it is easier to use a newer paramiko
library from a different python library path (or ship it with ansible ?!)
rather then expecting a current openssh on the system.
(No for security reasons we are not going to update to a different openssh
on RHEL, especially not for a system that gives access to our complete
datacenter ;-))
--
-- dag wieers, d...@wieers.com, http://dag.wieers.com/
-- dagit linux solutions, cont...@dagit.net, http://dagit.net/
[Any errors in spelling, tact or fact are transmission errors]
--
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.
For more options, visit https://groups.google.com/groups/opt_out.