# Ansible 2.0.0.2 is slow compared to 1.9.4 ?

**URL:** <https://forum.ansible.com/t/ansible-2-0-0-2-is-slow-compared-to-1-9-4/20297>\
**Category:** Ansible Project\
**Created:** [January 20, 2016, 10:25pm UTC](https://forum.ansible.com/t/ansible-2-0-0-2-is-slow-compared-to-1-9-4/20297 "2016-01-20T22:25:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phonthip\_Namkaew](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@Phonthip\_Namkaew](https://forum.ansible.com/u/Phonthip_Namkaew)\
**Post date:** [January 20, 2016, 10:25pm UTC](https://forum.ansible.com/t/ansible-2-0-0-2-is-slow-compared-to-1-9-4/20297/1 "2016-01-20T22:25:01Z")

</div>

Hi,

I tried to compare Ansible 2.0.0.2 to 1.9.4 on this VM

client01:/data/ansible # cat /etc/os-release  
NAME=openSUSE  
VERSION=“13.2 (Harlequin)”  
VERSION\_ID=“13.2”  
PRETTY\_NAME=“openSUSE 13.2 (Harlequin) (i586)”  
ID=opensuse  
ANSI\_COLOR=“0;32”  
CPE\_NAME=“cpe:/o:opensuse:opensuse:13.2”  
BUG\_REPORT\_URL=“[https://bugs.opensuse.org](https://bugs.opensuse.org)”  
HOME\_URL=“[https://opensuse.org/](https://opensuse.org/)”  
ID\_LIKE=“suse”  
client01:/data/ansible #

using git checkouts as described in

[https://groups.google.com/forum/#!searchin/ansible-project/checkout|sort:date/ansible-project/nrQFcW8X1WU/QR7ksJEvBQAJ](https://groups.google.com/forum/#!searchin/ansible-project/checkout%7Csort:date/ansible-project/nrQFcW8X1WU/QR7ksJEvBQAJ)

I am not a git expert, so probably something went terrible wrong while dealing with git and I broke 2.0.0.2 as it seems  
to be slow and failed to run the modul setup:

a)  
Run \< ansible localhost -a “ls -al /etc/hosts” \>  
Result: 1.9.4 takes 1.09s, 2.0.0.2 takes 10.3s.

Ansible version: 1.9.4

client01:/data/ansible # time ansible localhost -a “ls -al /etc/hosts”  
localhost | success | rc=0 \>\>  
-rw-r–r-- 1 root root 642 Dec 8 2014 /etc/hosts

real 0m1.091s  
user 0m0.380s  
sys 0m0.344s  
client01:/data/ansible #

client01:/data/ansible # ansible --version

ansible 1.9.4 (detached HEAD 5af1cda7c9) last updated 2016/01/20 22:33:43 (GMT +200)  
lib/ansible/modules/core: (detached HEAD 206a1247d9) last updated 2016/01/20 22:34:13 (GMT +200)  
lib/ansible/modules/extras: (detached HEAD 882ec41e12) last updated 2016/01/20 22:34:29 (GMT +200)  
configured module search path = None  
client01:/data/ansible #

Ansible version: 2.0.0.2

client01:/data/ansible # time ansible localhost -a “ls -al /etc/hosts”  
localhost | SUCCESS | rc=0 \>\>  
-rw-r–r-- 1 root root 642 Dec 8 2014 /etc/hosts

real 0m10.329s  
user 0m0.744s  
sys 0m9.440s  
client01:/data/ansible #

client01:/data/ansible # ansible --version  
ansible 2.0.0.2 (detached HEAD 7de237c5a1) last updated 2016/01/20 22:14:06 (GMT +200)  
lib/ansible/modules/core: (detached HEAD ce6619bf5d) last updated 2016/01/20 22:15:12 (GMT +200)  
lib/ansible/modules/extras: (detached HEAD 29af26884e) last updated 2016/01/20 22:15:23 (GMT +200)  
config file = /data/ansible/ansible.cfg  
configured module search path = Default w/o overrides  
client01:/data/ansible #

b)  
Run \< time ansible localhost -m setup \>  
Result: 1.9.4 takes 17.17s, 2.0.0.2 fails after 54.21s

Ansible version: 1.9.4

client01:/data/ansible # time ansible localhost -m setup

\< truncated \>

real 0m17.167s  
user 0m0.692s  
sys 0m1.092s  
client01:/data/ansible #

Ansible version: 2.0.0.2

client01:/data/ansible # time ansible localhost -m setup

localhost | FAILED! =\> {  
“changed”: false,  
“cmd”: “/usr/bin/lsblk -ln --output UUID /dev/sda2”,  
“failed”: true,  
“msg”: “Traceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1453327446.44-256372683696005/setup", line 1983, in run\_command\n cmd = subprocess.Popen(args, \*\*kwargs)\n File "/usr/lib/python2.7/subprocess.py", line 710, in **init** \n errread, errwrite)\n File "/usr/lib/python2.7/subprocess.py", line 1308, in \_execute\_child\n data = \_eintr\_retry\_call(os.read, errpipe\_read, 1048576)\n File "/usr/lib/python2.7/subprocess.py", line 476, in \_eintr\_retry\_call\n return func(\*args)\n File "/root/.ansible/tmp/ansible-tmp-1453327446.44-256372683696005/setup", line 2156, in \_handle\_timeout\n raise TimeoutError(error\_message)\nTimeoutError: Timer expired\n”,  
“rc”: 257  
}

real 0m54.207s  
user 0m2.404s  
sys 0m46.716s  
client01:/data/ansible #

The ansible command fails due to a timeout in “cmd”: “/usr/bin/lsblk -ln --output UUID /dev/sda2”

This command runs fine on the cli:

client01:/data/ansible # time /usr/bin/lsblk -ln --output UUID /dev/sda2  
b77dc505-6528-4b8b-8942-f4f6a48d702c

real 0m0.027s  
user 0m0.000s  
sys 0m0.020s  
client01:/data/ansible #
