High CPU usage with Ansible 2.0.0.2

788 views
Skip to first unread message

Budric Bundy

unread,
Jan 29, 2016, 3:22:43 PM1/29/16
to Ansible Project
Hi,

After upgrading to 2.0.0.2 I notice that there are 2 python processes "python /usr/bin/ansible-playbook stress.yml" taking up ~20% of the CPU each on the host machine that ran the playbook.  Eating up resources like this for a long running playbook (I use playbooks to backup, and do virus scanning on a bunch of machines which can take hours) is not ideal.  This didn't happen with 1.9.2.

Here's a basic playbook I used to reproduce this using gnu stress utility
---
- hosts: stress
  tasks:
    - name: test
      shell: stress --cpu 8 --timeout 30s

Or command line:  ansible stress -m shell -a "stress --cpu 8 --timeout 30s"

I notice this error on Ubuntu 15.10, Python 2.7.10.  I'm using default ansible.cfg installed from PPA, with uncommeted "become=True" and "become_method=sudo".

Can anyone confirm the behavior?  Any way I can fix this with configuration?  Is this a bug?

Brian Coca

unread,
Jan 29, 2016, 5:20:05 PM1/29/16
to Ansible Project
I would not call it a bug nor expected behavior but this is something
we should improve on, open a ticket on github using teh template and
minimal examples for us to reproduce.


--
Brian Coca

Budric

unread,
Jan 29, 2016, 5:51:12 PM1/29/16
to Ansible Project

Mirko Friedenhagen

unread,
Jan 31, 2016, 6:16:41 AM1/31/16
to ansible-project
I stated this in the issue as well: I saw an increase in the sum of
user+sys time of 300%, so with 1.9.4 I hardly noticed a playbook run
on my Macbook and now it feels sluggish.
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/
> --
> 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-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/7a6d9748-d493-4101-a619-582328282b92%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages