# Windows put\_file performance (please test!)

**URL:** <https://forum.ansible.com/t/windows-put-file-performance-please-test/19598>\
**Category:** Ansible Developer\
**Tags:** windows, aws\
**Created:** [October 23, 2015, 10:25pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598 "2015-10-23T22:25:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [October 23, 2015, 10:25pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/1 "2015-10-23T22:25:44Z")

</div>

Chris Church and I have been kicking around a major Windows performance fix for awhile now- I finally got around to merging our efforts together and working some of the bugs out. The result is available here: [https://github.com/nitzmahone/ansible/tree/winrm\_put\_file](https://github.com/nitzmahone/ansible/tree/winrm_put_file) . This should increase Windows module push performance by an order of magnitude, and win\_copy performance by several orders of magnitude (as well as removing the restriction on the size of files that can be pushed).

Some quick n’ dirty benchmarks on this code (win\_copy):

Mac-\>Local VM (vagrant/virtualbox), 2k/100k/1M/420M file sizes (times in seconds):  
1.9.2: 4.3/15.6/74.5/(fail)  
2.0.0 (this branch): 1.5/1.9/2.8/53.3

Mac-\>AWS-hosted (t2.micro), 2k/100k/1M/420M file sizes (times in seconds):  
1.9.2: 11.8/62/553/(fail)  
2.0.0 (this branch): 8.3/8.5/13.7/1244

The numbers are even better if you use the pywinrm 0.1.0 RC at [https://github.com/diyan/pywinrm/tree/v0.1.x](https://github.com/diyan/pywinrm/tree/v0.1.x) - I made a fix there that significantly improves Basic auth perf. These numbers will also improve even more once we’re using requests in pywinrm, since it supports connection keepalive. I think a big chunk of our slow WAN performance is due to renegotiating the connection on each WinRM operation.

This code still isn’t perfect (error handling and reporting, logging could be improved), but I think it’s a lot stronger than what we’re shipping now. Could I trouble some of the Windows community to try it out and give me some feedback before I shoot for a PR?

Thanks,

-Matt

---

<div class="post-metadata">

**Author:** ![Corwin\_Brown](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Corwin\_Brown](https://forum.ansible.com/u/Corwin_Brown)\
**Post date:** [October 26, 2015, 7:08pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/2 "2015-10-26T19:08:41Z")

</div>

I tried it out (As I’ve suffered from the windows performance issues), and it bombed out on me. Here’s the stack trace:

> 

> 

> 

> PLAY: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> An exception occurred during task execution. The full traceback is:
> 
> Traceback (most recent call last):
> 
> File “/opt/ansible-improved-winrm/lib/ansible/executor/process/worker.py”, line 118, in run
> 
> executor\_result = TaskExecutor(host, task, job\_vars, new\_connection\_info, self.\_new\_stdin, self.\_loader, shared\_loader\_obj).run()
> 
> File “/opt/ansible-improved-winrm/lib/ansible/executor/task\_executor.py”, line 111, in run
> 
> res = self.\_execute()
> 
> File “/opt/ansible-improved-winrm/lib/ansible/executor/task\_executor.py”, line 218, in \_execute
> 
> self.\_handler = self.\_get\_action\_handler(connection=self.\_connection, templar=templar)
> 
> File “/opt/ansible-improved-winrm/lib/ansible/executor/task\_executor.py”, line 425, in \_get\_action\_handler
> 
> shared\_loader\_obj=self.\_shared\_loader\_obj,
> 
> File “/opt/ansible-improved-winrm/lib/ansible/plugins/ **init**.py”, line 284, in get
> 
> obj = getattr(self.\_module\_cache[path], self.class\_name)(\*args, \*\*kwargs)
> 
> File “/opt/ansible-improved-winrm/lib/ansible/plugins/action/ **init**.py”, line 64, in **init**
> 
> self.\_shell = shell\_loader.get(shell\_type)
> 
> File “/opt/ansible-improved-winrm/lib/ansible/plugins/ **init**.py”, line 274, in get
> 
> path = self.find\_plugin(name)
> 
> File “/opt/ansible-improved-winrm/lib/ansible/plugins/ **init**.py”, line 246, in find\_plugin
> 
> if not name.startswith(‘\_’):
> 
> AttributeError: ‘ShellModule’ object has no attribute ‘startswith’
> 
> fatal: [[b-svd1-3.25.svd1.maxpointinteractive.com](http://b-svd1-3.25.svd1.maxpointinteractive.com)]: FAILED! =\> {“failed”: true, “stdout”: “”}
> 
> NO MORE HOSTS LEFT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> [b-svd1-3.25.svd1.maxpointinteractive.com](http://b-svd1-3.25.svd1.maxpointinteractive.com) : ok=0 changed=0 unreachable=0 failed=1

I also am having some odd errors when trying to run your fork – but I’m not convinced that isn’t something weird with my environment. Notably my group\_vars don’t appear to get loaded.

Super excited for this!

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [October 27, 2015, 4:44pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/3 "2015-10-27T16:44:17Z")

</div>

Hmm, that’s pretty far away from where this code change is- looks like you just have a broken 2.0 setup (the connection plugin hasn’t even loaded yet).

---

<div class="post-metadata">

**Author:** ![Michael\_Perzel](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Michael\_Perzel](https://forum.ansible.com/u/Michael_Perzel)\
**Post date:** [October 27, 2015, 8:59pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/4 "2015-10-27T20:59:20Z")

</div>

I also have been suffering from poor windows performance. Could you provide a little more detail on what is needed to test this? Is it as simple as checking out your fork, running source hacking/env-setup and going to town?

Thanks

Michael

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [October 27, 2015, 9:07pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/5 "2015-10-27T21:07:31Z")

</div>

As long as you already have a working 2.0 environment, yes (ie, with the new Python dependencies for 2.0). If not, you’ll need to ensure that you have the latest of all the 2.0 requirements first (eg, sudo pip --upgrade install paramiko PyYAML Jinja2 httplib2 six), then do the usual “install from source” from my branch/repo.

---

<div class="post-metadata">

**Author:** ![Michael\_Perzel](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Michael\_Perzel](https://forum.ansible.com/u/Michael_Perzel)\
**Post date:** [October 27, 2015, 9:48pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/6 "2015-10-27T21:48:44Z")

</div>

Okay I checked out your fork then ran the playbook

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [October 27, 2015, 10:05pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/7 "2015-10-27T22:05:34Z")

</div>

2.0 is a little tighter- the tasks have to be a list, not a dict (ie, put a dash before win\_file:)

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [October 27, 2015, 10:07pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/8 "2015-10-27T22:07:02Z")

</div>

2.0 is a little tighter- the tasks have to be a list, not a dict (ie, put a dash before win\_file:)

---

<div class="post-metadata">

**Author:** ![Michael\_Perzel](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Michael\_Perzel](https://forum.ansible.com/u/Michael_Perzel)\
**Post date:** [October 28, 2015, 3:28pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/9 "2015-10-28T15:28:13Z")

</div>

Sorry that was a bad copy and paste job. I’ve tried formatting the playbook a few different ways. With the dash results in “ERROR! no action detected in task.” Out of exasperation I copied the example playbook from [http://docs.ansible.com/ansible/playbooks\_intro.html](http://docs.ansible.com/ansible/playbooks_intro.html) and tried to run it. It also returns “ERROR! no action detected in task.” Are we sure the parser isn’t broken in this fork? I ran a git pull and there wasn’t anything pull down.

Michael

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [October 28, 2015, 3:40pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/10 "2015-10-28T15:40:40Z")

</div>

I hate the answer, “works on my machine”, but, well, it does… 😉 If you’re able to run 2.0 devel without issues but this fork is busted, there’s something to talk about, but otherwise, I’m guessing you’re missing 2.0 dependencies somewhere, you’ve got some old cruft on your path, or you’ve got some other environmental issue…

Here’s my development env pip list output:

(ansiblev2)mdavis-mac:ansiblev2 mdavis$ pip list  
alabaster (0.7.6)  
ansible (2.0.0)  
Babel (2.0)  
boto (2.38.0)  
cffi (1.1.2)  
cryptography (0.9.1)  
docutils (0.12)  
ecdsa (0.13)  
enum34 (1.0.4)  
funcsigs (0.4)  
httplib2 (0.9.1)  
idna (2.0)  
ipaddress (1.0.7)  
isodate (0.5.1)  
Jinja2 (2.8)  
kerberos (1.2.2)  
magicmock (0.3)  
MarkupSafe (0.23)  
mock (1.3.0)  
MySQL-python (1.2.5)  
ndg-httpsclient (0.4.0)  
paramiko (1.15.2)  
patch (1.14.2)  
pbr (1.6.0)  
pip (7.1.2)  
pyasn1 (0.1.8)  
pycparser (2.14)  
pycrypto (2.6.1)  
Pygments (2.0.2)  
pyOpenSSL (0.15.1)  
pytz (2015.4)  
PyYAML (3.11)  
requests (2.7.0)  
setuptools (17.0)  
six (1.9.0)  
snowballstemmer (1.2.0)  
Sphinx (1.3.1)  
sphinx-rtd-theme (0.1.8)  
ssl-opt-out (0.9.1)  
units (0.6)  
wheel (0.24.0)  
xmltodict (0.9.2)

---

<div class="post-metadata">

**Author:** ![Michael\_Perzel](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Michael\_Perzel](https://forum.ansible.com/u/Michael_Perzel)\
**Post date:** [October 29, 2015, 4:23pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/11 "2015-10-29T16:23:06Z")

</div>

Fair enough, the issue was local to my environment. The modules weren’t available. A few git submodule update… and I’m up and running. The error message wasn’t particularly useful but alas I can run playbooks now! I’m running RHEL 6.5 with python 2.6.6

TASK [Create directory] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. The full traceback is:  
Traceback (most recent call last):  
File “/home/mperzel/ansible-test/ansible/lib/ansible/executor/process/worker.py”, line 118, in run  
executor\_result = TaskExecutor(host, task, job\_vars, new\_connection\_info, self.\_new\_stdin, self.\_loader, shared\_loader\_obj).run()  
File “/home/mperzel/ansible-test/ansible/lib/ansible/executor/task\_executor.py”, line 111, in run  
res = self.\_execute()  
File “/home/mperzel/ansible-test/ansible/lib/ansible/executor/task\_executor.py”, line 218, in \_execute  
self.\_handler = self.\_get\_action\_handler(connection=self.\_connection, templar=templar)  
File “/home/mperzel/ansible-test/ansible/lib/ansible/executor/task\_executor.py”, line 425, in \_get\_action\_handler  
shared\_loader\_obj=self.\_shared\_loader\_obj,  
File “/home/mperzel/ansible-test/ansible/lib/ansible/plugins/ **init**.py”, line 284, in get  
obj = getattr(self.\_module\_cache[path], self.class\_name)(\*args, \*\*kwargs)  
File “/home/mperzel/ansible-test/ansible/lib/ansible/plugins/action/ **init**.py”, line 64, in **init**  
self._shell = shell\_loader.get(shell\_type)  
File “/home/mperzel/ansible-test/ansible/lib/ansible/plugins/ **init**.py”, line 274, in get  
path = self.find\_plugin(name)  
File “/home/mperzel/ansible-test/ansible/lib/ansible/plugins/ **init**.py”, line 246, in find\_plugin  
if not name.startswith('_'):  
AttributeError: ‘ShellModule’ object has no attribute ‘startswith’

fatal: [mdm-wsrv98.surescripts-dev.qa]: FAILED! =\> {“failed”: true, “stdout”: “”}

When I get a little more time I’ll try to dig in and see what the issue is.

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [November 2, 2015, 6:51pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/12 "2015-11-02T18:51:44Z")

</div>

Trying to test this too, but hitting the same "startswith" error at the moment.

I have cloned, run git submodule --init and updated pip dependencies.

Matt, what Python version are you running?

My test machine is running lubuntu 14.04 with not much in the way of customization.

For info I am just testing by running the make test-winrm integration tests.

Jon

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [November 3, 2015, 6:30am UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/13 "2015-11-03T06:30:37Z")

</div>

Ok, so I worked out what was going on…

In my hurry to get testing I cloned the correct repo, but forgot to switch to the branch.

For anyone else trying to test this out, here’s what I think I wound up with

mkdir putfile  
git clone [https://github.com/nitzmahone/ansible.git](https://github.com/nitzmahone/ansible.git)  
cd ansible  
git submodule --init --recursive  
git checkout winrm\_put\_file  
git submodule update  
ansible --version  
cd test/integration  
export TEST\_FLAGS=‘-i /etc/ansible/TEST\_INVENTORY -t test\_win\_copy’  
make test\_winrm

I experienced a hang when the tests reached the following task:

test\_win\_copy : copy an empty file

For what its worth, the traceback when I hit ctrl-C was as follows

Process WorkerProcess-5:  
Traceback (most recent call last):  
File “/usr/lib/python2.7/multiprocessing/process.py”, line 258, in \_bootstrap  
Process WorkerProcess-1:  
Traceback (most recent call last):  
File “/usr/lib/python2.7/multiprocessing/process.py”, line 258, in \_bootstrap  
Process WorkerProcess-4:  
Traceback (most recent call last):  
File “/usr/lib/python2.7/multiprocessing/process.py”, line 258, in \_bootstrap  
self.run()  
File “/home/jon/putfile/ansible/lib/ansible/executor/process/worker.py”, line 100, in run  
self.run()  
File “/home/jon/putfile/ansible/lib/ansible/executor/process/worker.py”, line 100, in run  
(host, task, basedir, job\_vars, play\_context, shared\_loader\_obj) = self.\_main\_q.get()  
File “/usr/lib/python2.7/multiprocessing/queues.py”, line 117, in get  
(host, task, basedir, job\_vars, play\_context, shared\_loader\_obj) = self.\_main\_q.get()

Hope this edge case can be fixed as I re-ran the tests I did when the issue about win\_copy size limitation first appear and its really, really quick…

1 mb real 0m3.640s  
2 mb real 0m5.864s  
3 mb real 0m7.809s  
4 mb real 0m6.791s  
8 mb real 0m9.341s  
16 mb real 0m12.819s

This is _really_ encouraging as, thinking about it, I made the test harder this time as its hitting 2 vms, not 1 as previously. Not retested with the old code but 16 mb wouldn’t even run before.

Happy to test further, just let me know…

Jon

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [November 3, 2015, 8:56am UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/14 "2015-11-03T08:56:00Z")

</div>

For info spotted another error in the integration tests

for me, it fails during win\_file tests at this point

- name: win copy directory structure over  
win\_copy: src=foobar dest={{win\_output\_dir}}

ran with -vvvvv but it hung. When hit Ctrl-C I got this traceback:

Process WorkerProcess-2:  
Traceback (most recent call last):  
File “/usr/lib/python2.7/multiprocessing/process.py”, line 258, in \_bootstrap  
self.run()  
File “/home/jon/putfile/ansible/lib/ansible/executor/process/worker.py”, line 100, in run  
(host, task, basedir, job\_vars, play\_context, shared\_loader\_obj) = self.\_main\_q.get()  
File “/usr/lib/python2.7/multiprocessing/queues.py”, line 117, in get  
Process WorkerProcess-4:  
Traceback (most recent call last):  
File “/usr/lib/python2.7/multiprocessing/process.py”, line 258, in \_bootstrap  
self.run()  
File “/home/jon/putfile/ansible/lib/ansible/executor/process/worker.py”, line 100, in run  
(host, task, basedir, job\_vars, play\_context, shared\_loader\_obj) = self.\_main\_q.get()  
File “/usr/lib/python2.7/multiprocessing/queues.py”, line 117, in get  
Process WorkerProcess-3:  
Traceback (most recent call last):  
File “/usr/lib/python2.7/multiprocessing/process.py”, line 258, in \_bootstrap  
self.run()  
File “/home/jon/putfile/ansible/lib/ansible/executor/process/worker.py”, line 100, in run  
(host, task, basedir, job\_vars, play\_context, shared\_loader\_obj) = self.\_main\_q.get()  
File “/usr/lib/python2.7/multiprocessing/queues.py”, line 117, in get

Also retried with 1 host but got the same result.

Hope this helps.

Jon

---

<div class="post-metadata">

**Author:** ![Michael\_Perzel](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Michael\_Perzel](https://forum.ansible.com/u/Michael_Perzel)\
**Post date:** [November 3, 2015, 2:34pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/15 "2015-11-03T14:34:47Z")

</div>

I also had missed the step to switch branches. For completeness I also ran source hacking/env-setup after step “git submodule update” in Jon’s directions.

The use case I was most concerned with of creating one directory on one windows hosts has gone from 45 seconds to 22 seconds!

/opt/ansible/ansible-test/win\_file\> time ansible-playbook main.yml

TASK [Create directory] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
changed: [host]

real 0m22.714s

I also ran the winrm tests and task [test\_win\_copy : copy an empty file] hangs for me as well.

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [November 5, 2015, 1:34am UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/16 "2015-11-05T01:34:31Z")

</div>

/me hangs head in shame for not running integration tests before uploading…

I had a TODO in the source to deal with the 0-length file case, but hadn’t gotten to it yet. I’ve committed an update that does that- makes all the winrm integration tests pass.

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [November 5, 2015, 2:22am UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/17 "2015-11-05T02:22:46Z")

</div>

Man, 22s is still _really_ slow for a win\_file dir create- are you running this against a Cuisinart over a 300baud modem or something? 😉

Make sure you’re running with the new pywinrm 0.1.1 that just released last week- that has my perf fix that halves the number of winrm round-trips when you’re using Basic auth.

Just for reference, this branch with pywinrm 0.1.1 does

time ansible win2008r2-vagrant -i hosts -m win\_file -a “path=c:/makeme state=directory”

in ~1.7s against a local VM, and ~6s against a t2.micro 2012R2 in AWS.

-Matt

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [November 5, 2015, 9:40am UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/18 "2015-11-05T09:40:23Z")

</div>

Thanks Matt

I’ve picked up your latest changes and ran through all the winrm integration tests successfully.

I also installed pywinrm 0.1.1

sudo pip install pywinrm --upgrade

Its clearly even faster with new pywinrm.

Total time to run the tests was just over 19 minutes on my test environment - I’ve seen it take over 30 mins on the same kit.

I re-ran my copy tests again and the 16Mb file transferred in 7.668s (to two hosts).

Please create a PR for this when you can.

In fact, if I can only have 1 PR for Christmas, this would be it. 🙂

Many thanks for all your (and Chris Church’s) work on this.

Jon

---

<div class="post-metadata">

**Author:** ![Michael\_Perzel](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Michael\_Perzel](https://forum.ansible.com/u/Michael_Perzel)\
**Post date:** [November 5, 2015, 4:15pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/19 "2015-11-05T16:15:52Z")

</div>

Lol, my test rig is 2 local RHEL servers. It boggles my mind it takes so long but 22 seconds is a lot better than 45. raw mkdir c:\temp runs in a couple seconds. I am using an old version of pywinrm. I’ll try out your patched version.

Thanks,

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [November 5, 2015, 4:24pm UTC](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598/20 "2015-11-05T16:24:03Z")

</div>

Once you’ve done the pywinrm upgrade, if it’s still taking more than about 2s between local servers, can I get you to post output from a run where ANSIBLE\_DEBUG=1 is set in the runner’s environment? I’m just curious what the heck it’s doing that’s taking so long (or if we need to add some more instrumentation to figure it out).

[Next page](https://forum.ansible.com/t/windows-put-file-performance-please-test/19598.md?page=2)
