Why So Slow?

Trying Ansible for app deployment. It’s nice but why so slow? This below involves copying four files and it takes minutes !!! I am running on Solaris 11.

  • name: Populate conf directory

copy: src=“{{ item }}” dest=/tcpcore/conf

with_fileglob: /commutil/conf/*

That’s pretty crazy and not typical.

Please supply your ansible version, what OS you are running from, and what connection type we are using.

Also have you tried accelerated mode, ControlPersist or pipelining yet?

I assume these are smallish files and that shouldn’t matter. It will just be doing sftp/scp by default, so … not sure what may be a factor on your end but let’s start with that and explore.

I am using Ansible 1.6.6 on Solaris 10. Target system is Solaris 11 in a VM, that is mostly idle; both in the company LAN.

I am just getting started. I don’t think Solaris takes ControlPersist. I had to make ssh_args = “”

I can’t use unarchive either, it seems, as it uses the wrong tar, I tried changing the PATH throught .bashrc so /usr/gnu/bin comes before /usr/bin, but it does not seem to source it. I’ve got issues…

Thanks

In the past, I’ve seen ssh connections into Solaris machines take a long time because the Solaris ssh daemon was doing a reverse DNS lookup on the connecting machine and there was no DNS for the machine. 30 seconds later, the DNS lookup timed out, and the connection continued.

If you have root on the target system, a quick way to confirm/deny this is to create an /etc/hosts entry with the IP address and hostname of your Ansible machine. (create the /etc/hosts line on the target machine, not the Ansible machine).

-Greg

I have seen reverse DNS lookup issues before, that can be a thing, so +1 Greg!

If using SSH without ControlPersist do also turn on pipelining.

Thank you for your replies.

I just tried that, no effect. Turned on pipelining, same.

It does seem like a 30 sec or so wait at least before it transfers each file.

It’s not useless, but it’s going to slow playbook development.

I forget what other network issues could exist at this time, though should be able to discover from general network and SSH type debugging.

(Make sure you turned off that check on the remote, not the control machine, if not already)