<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ansible slow execution in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4954381#M3216</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/964504"&gt;@Torbjørn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;adding async 60 and pool 0 to the script reduced time execution to about 4 minutes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the&amp;nbsp;drawback of this method is the result display all tasks in changed state &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2023 16:50:47 GMT</pubDate>
    <dc:creator>mzouggagh</dc:creator>
    <dc:date>2023-11-06T16:50:47Z</dc:date>
    <item>
      <title>ansible slow execution</title>
      <link>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953816#M3211</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;we wrote ansible script to create 200 vlan pool in ACI APIC, but execution is too slow. it take more than one hour to finish the job!&lt;/P&gt;
&lt;P&gt;With postman it take 2 minutes to create 200 vlan pool.&lt;/P&gt;
&lt;P&gt;how can we improve ansible time execution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 13:19:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953816#M3211</guid>
      <dc:creator>mzouggagh</dc:creator>
      <dc:date>2023-11-05T13:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: ansible slow execution</title>
      <link>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953820#M3212</link>
      <description>&lt;P&gt;Can you post your ansible playbook and ansible.cfg?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 13:35:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953820#M3212</guid>
      <dc:creator>Torbjørn</dc:creator>
      <dc:date>2023-11-05T13:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: ansible slow execution</title>
      <link>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953855#M3213</link>
      <description>&lt;P&gt;yes&lt;/P&gt;
&lt;P&gt;for config file&lt;/P&gt;
&lt;P&gt;#ansible --version&lt;BR /&gt;ansible [core 2.14.4]&lt;BR /&gt;config file = None&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 15:19:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953855#M3213</guid>
      <dc:creator>mzouggagh</dc:creator>
      <dc:date>2023-11-05T15:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: ansible slow execution</title>
      <link>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953880#M3214</link>
      <description>&lt;P&gt;Not sure why the execution takes so long, it shouldn't take an hour to complete. Can you post the output when you run the playbook with -vvv ?&lt;/P&gt;&lt;P&gt;You can probably speed up your playbook using async to execute the task in parallel. See the attached file for what that could look like. I am unable to test it ATM, so it might not work - will debug it later if there are errors.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 16:37:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4953880#M3214</guid>
      <dc:creator>Torbjørn</dc:creator>
      <dc:date>2023-11-05T16:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: ansible slow execution</title>
      <link>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4954323#M3215</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/272658"&gt;@mzouggagh&lt;/a&gt;&amp;nbsp;there is a couple of way this can be sped up which i used in the past (this was with switches and routers)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Async mode.&amp;nbsp;This will allow Ansible to run multiple tasks simultaneously, which can significantly improve performance, especially for large tasks, such as this one&lt;/LI&gt;&lt;LI&gt;Parallel mode.&amp;nbsp;This is similar to async mode, but it will run tasks in parallel on multiple hosts. This can be even faster than async mode, but it does requires that you have multiple hosts available fyi&lt;/LI&gt;&lt;LI&gt;Caching.&amp;nbsp;Ansible can cache the results of tasks, which can avoid having to re-execute the same task multiple times. This can be especially useful for tasks that are slow to execute&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Also try using modules that are optimized for speed, did find some Ansible modules are optimized for speed, while others are not. Like for example, the&amp;nbsp;aci_fabric&amp;nbsp;module is optimized for speed, while the&amp;nbsp;aci_vlan&amp;nbsp;module is not. I think the reason for the diff in speed here is&amp;nbsp;Postman is a single-threaded application, while Ansible is a multi-threaded application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 15:34:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4954323#M3215</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-11-06T15:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: ansible slow execution</title>
      <link>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4954381#M3216</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/964504"&gt;@Torbjørn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;adding async 60 and pool 0 to the script reduced time execution to about 4 minutes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;the&amp;nbsp;drawback of this method is the result display all tasks in changed state &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 16:50:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/ansible-slow-execution/m-p/4954381#M3216</guid>
      <dc:creator>mzouggagh</dc:creator>
      <dc:date>2023-11-06T16:50:47Z</dc:date>
    </item>
  </channel>
</rss>

