CPU utilization

Hi Team,

This mail is regarding the CPU utilization of the Ansible

I have a Centos (version 8) Machine where Ansible is installed ( 4CPU and 16GB RAM) Executing 2 to 3 parallel calls takes up to 100% CPU

Help us to know if any optimization can be done here

Setup details

Machine where Ansible is installed

Centos 8

Ansible version

ansible [core 2.11.12]

config file = None

configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]

ansible python module location = /usr/local/lib/python3.7/site-packages/ansible

ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections

executable location = /usr/local/bin/ansible

python version = 3.7.16 (default, May 3 2023, 10:58:47) [GCC 11.2.1 20220219]

jinja version = 3.1.2

libyaml = False

pywinRM version

pywinrm==0.4.3

remote host details

windows 2019 4CPU and 16 GB RAM

Command used to Execute

ansible-playbook -i /tmp/ansible_adapter/inventory/hostinventory ./helloworld.yaml -vvv

we use NTLM way of Authentication to Windows host

Play book is written like this

Play book is written like this

  • hosts: all
    tasks:
  • name: Execute the executable
    win_command: helloworld.exe
    register: host_output
  • set_fact:
    result: “{{ host_output.stdout }}”
    err_details: “{{ host_output.stderr }}”
    cacheable: yes
  • debug:
    var: host_output.stdout_lines

Thanks

mohan