# ansible 1.6.2 -\> 1.8.1 huge increase in "startup" time

**URL:** <https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940>\
**Category:** Ansible Project\
**Created:** [December 2, 2014, 7:43pm UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940 "2014-12-02T19:43:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brent\_Langston1](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brent\_Langston1](https://forum.ansible.com/u/Brent_Langston1)\
**Post date:** [December 2, 2014, 7:43pm UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/1 "2014-12-02T19:43:42Z")

</div>

Hi guys,

I’m hoping I’ve just overlooked an option, but here’s the situation:

After updating from ansible 1.6.2 to 1.8.1, I noticed our ansible runs take much much longer to actually make contact with the servers. Here is a really simple comparison:

[https://gist.github.com/brentley/7c644614e5dc3aae045d](https://gist.github.com/brentley/7c644614e5dc3aae045d)

The first run is on 1.8.1, the 2nd is the same system on 1.6.2.

This is using the ec2.py dynamic inventory, and both runs had precached inventory.

When I straced the process, I noticed the 1.8.1 run was doing this:

```auto

lstat("/etc/ansible/host_vars/[10.10.7.20](http://10.10.7.20)", 0x7fff243bbe60) = -1 ENOENT (No such file or directory)

lstat("/etc/ansible/host_vars/10.10.7.20.yml", 0x7fff243bbe60) = -1 ENOENT (No such file or directory)

lstat("/etc/ansible/host_vars/10.10.7.20.yaml", 0x7fff243bbe60) = -1 ENOENT (No such file or directory)

lstat("/etc/ansible/host_vars/10.10.7.20.json", 0x7fff243bbe60) = -1 ENOENT (No such file or directory)

but iterating over our entire inventory. There was an additional block for /etc/ansible/group_vars/<inventory_name>.* also.

Is there a configuration option or other way to disable this behavior?

```

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [December 3, 2014, 12:01am UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/2 "2014-12-03T00:01:38Z")

</div>

Inventory gets processed on startup time a bit more now – that’s good for various reasons as it would do it later anyway and that data can be needed – but I’m curious if you could provide info about what “much longer” means? Such as before and after numbers, and numbers of hosts in your inventory?

---

<div class="post-metadata">

**Author:** ![Brent\_Langston1](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brent\_Langston1](https://forum.ansible.com/u/Brent_Langston1)\
**Post date:** [December 3, 2014, 4:15am UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/3 "2014-12-03T04:15:24Z")

</div>

Check the gist. I left an example of the timing difference.

---

<div class="post-metadata">

**Author:** ![Mirko\_Friedenhagen](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Post date:** [December 3, 2014, 1:03pm UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/4 "2014-12-03T13:03:26Z")

</div>

Brent,

in your gist the realtime seems to have actually _decreased_ from 46 to 44 seconds from 1.6 to 1.8. I see values like this for ping as well connecting via DSL (10mbit) and VPN instead of standard Ethernet in the office. I may ping 50 hosts in 30 seconds via DSL which takes 2 seconds via Ethernet.

---

<div class="post-metadata">

**Author:** ![Mirko\_Friedenhagen](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mirko\_Friedenhagen](https://forum.ansible.com/u/Mirko_Friedenhagen)\
**Post date:** [December 3, 2014, 1:08pm UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/5 "2014-12-03T13:08:15Z")

</div>

Oops,

I really should learn to read digits, so it’s going up from less than 1second to 44 seconds. Do you run this from the same machine?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [December 3, 2014, 1:19pm UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/6 "2014-12-03T13:19:02Z")

</div>

Yeah please see my other questions too.

Since they probably detail your infrastructure with more information than you might care to share here, feel free to share off list.

(We’re probably going to want to see if we can get a copy of your inventory files).

Thanks!

---

<div class="post-metadata">

**Author:** ![Brent\_Langston1](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@Brent\_Langston1](https://forum.ansible.com/u/Brent_Langston1)\
**Post date:** [December 3, 2014, 7:53pm UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/7 "2014-12-03T19:53:52Z")

</div>

Following up on this, it looks like that server had a pretty old version of ec2.py as the inventory script. When I replaced it with the currently linked one from github, it behaved much better:

# time ansible tag\_environment\_development -m ping --list-hosts

10.10.5.157  
10.10.4.221  
10.10.7.202  
10.10.5.10  
10.10.4.92  
10.10.4.170  
10.10.4.153  
10.10.6.32  
10.10.6.226  
10.10.5.91  
10.10.5.149  
10.10.5.29  
10.10.16.137  
10.10.7.174  
10.10.4.145  
10.10.5.118  
10.10.4.45  
10.10.19.217  
10.10.7.36  
10.10.0.138  
10.10.6.250  
10.10.4.190

real 0m0.802s  
user 0m0.662s  
sys 0m0.141s

I still have the old copy of ec2.py if you are interested in digging in further, but This is probably really a non-issue.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [December 3, 2014, 9:50pm UTC](https://forum.ansible.com/t/ansible-1-6-2-1-8-1-huge-increase-in-startup-time/16940/8 "2014-12-03T21:50:36Z")

</div>

Possibly could have been that the old ec2.py didn’t do the “\_meta” trick (see developer docs on inventory plugins).

Thanks!
