Jira (BOLT-1536) Bolt takes 1 minute to execcute a trivial remote command on windows

25 views
Skip to first unread message

Iakov Gan (JIRA)

unread,
Feb 1, 2020, 5:39:04 PM2/1/20
to puppe...@googlegroups.com
Iakov Gan created an issue
 
Puppet Task Runner / Bug BOLT-1536
Bolt takes 1 minute to execcute a trivial remote command on windows
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: bolt-execution-time.png
Created: 2020/02/01 2:38 PM
Priority: Normal Normal
Reporter: Iakov Gan

Hi, I wonder, how i can make bolt to execute simple commands faster? Currently it takes 1 minute to execute the simplest command on a remote host with winrm. 

What would you recommend? 


Here i test varios connection methods:

shell connection method execution time
cmd winrs 1,468
powershell winrs 13,602
powershell Invoke-Command 16,23
powershell bolt+winrm 67,038
cmd ssh 1,268
powershell ssh 13,075
cmd bolt+ssh 47,106
powershell bolt+ssh 56,574

 

I test on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019).

 

Here is my code for illustration

PS C:\vagrant\windows2019-core> vagrant winrm -c 'echo "hi"' --shell cmd
hi
[00:10.920]PS C:\vagrant\windows2019-core> vagrant winrm -c 'Write-Host "hi"' --shell powershell
hi
[00:22.866]
PS C:\vagrant\windows2019-core> windows2019-core -r:http://localhost:55985/wsman -u:vagrant -p:vagrant 'echo "hi"'
"hi"[00:01.468]PS C:\vagrant\windows2019-core> winrs -r:http://localhost:55985/wsman -u:vagrant -p:vagrant 'powershell Write-Host "
hi"'
hi[00:13.602]
PS C:\vagrant\windows2019-core>  Invoke-Command `
>>       -ComputerName localhost `
>>       -Port 55985 `
>>       -Credential $(`
>>          New-Object System.Management.Automation.PSCredential (`
>>           "vagrant", $(`
>>             ConvertTo-SecureString `
>>             -String "vagrant" -AsPlainText -Force `
>>            ) `
>>          )`
>>       ) -ScriptBlock { Write-Host 'hi' }
hi
[00:16.230]
PS C:\vagrant\windows2019-core> bolt command run "Write-Host 'hello'" --targets winrm://localhost:55985 --no-ssl  --user vagrant --password vagrant --connect-timeout 20
Started on localhost...
Finished on localhost:
  STDOUT:
    hello
Successful on 1 target: localhost
Ran on 1 target in 28.84 sec
[01:07.038]
PS C:\vagrant\windows2019-core> ssh -i C:/Users/igan/.vagrant.d/insecure_private_key vagrant@localhost -p2222  "echo 'hi'"
'hi'
[00:01.268]PS C:\vagrant\windows2019-core> ssh -i C:/Users/igan/.vagrant.d/insecure_private_key vagrant@localhost -p2222  "powershell Write-Host 'hi'"
hi
[00:13.075]

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Iakov Gan (JIRA)

unread,
Feb 1, 2020, 5:41:04 PM2/1/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Change By: Iakov Gan
Hi, I wonder, how i can make bolt to execute simple commands faster? Currently it takes 1 minute to execute the simplest command on a remote host with winrm. 

What would you recommend to improve the execution time of bolt

!bolt-execution-time.png!
Here i test varios connection methods:
|*shell*|*connection method*|*execution time*|

|cmd|winrs|1,468|
|powershell|winrs|13,602|
|powershell|Invoke-Command|16,23|
|powershell|bolt+winrm|67,038|
|cmd|ssh|1,268|
|powershell|ssh|13,075|
|cmd|bolt+ssh|47,106|
|powershell|bolt+ssh|56,574|

 

I test on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019).

 

Here is my code for illustration
{code:powershell}PS C:\vagrant\windows2019-core> vagrant winrm -c 'echo "hi"' --shell cmd
hi
[00:10.920]


[00:13.075]{code}

Iakov Gan (JIRA)

unread,
Feb 1, 2020, 5:45:04 PM2/1/20
to puppe...@googlegroups.com


PS C:\vagrant\windows2019-core>  bolt command run "echo 'hello'" --targets ssh://localhost:2222 --no-ssl  --private
-key C:/Users/igan/.vagrant.d/insecure_private_key  --user vagrant --connect-timeout 20

Started on localhost...
Finished on localhost:
  STDOUT:
    'hello'
Successful on 1 target: localhost
Ran on 1 target in 21.05 sec
[00:47.106]

PS C:\vagrant\windows2019-core>  bolt command run "powershell Write-Host 'hello'" --targets ssh://localhost:2222 --
no-ssl  --private-key C:/Users/igan/.vagrant.d/insecure_private_key  --user vagrant --connect-timeout 20

Started on localhost...
Finished on localhost:
  STDOUT:
    hello
Successful on 1 target: localhost
Ran on 1 target in 34.75 sec
[00:56.574]

{code}

Iakov Gan (JIRA)

unread,
Feb 1, 2020, 5:48:04 PM2/1/20
to puppe...@googlegroups.com
PS C:\vagrant\windows2019-core> windows2019 winrs - core - r:http://localhost:55985/wsman -u:vagrant -p:vagrant 'echo "hi"'
"hi"

Iakov Gan (JIRA)

unread,
Feb 1, 2020, 5:52:04 PM2/1/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Hi Hello , I wonder, how i can make

As a new
bolt to execute simple commands faster? Currently user i find it quite difficult to get started because bolt takes about 1 minute to execute the simplest a simple command on a remote windows host with winrm .
 

I wonder, how i can make bolt to execute simple commands faster?
What would you recommend to improve the execution time of bolt? 

!bolt-execution-time.png!
Here i test varios connection methods:
|*shell*|*connection method*|*execution time*|
|cmd|winrs|1,468|
|powershell|winrs|13,602|
|powershell|Invoke-Command|16,23|
|powershell|bolt+winrm|67,038|
|cmd|ssh|1,268|
|powershell|ssh|13,075|
|cmd|bolt+ssh|47,106|
|powershell|bolt+ssh|56,574|

 

I test on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019).

 

Here is my code for illustration
{code:powershell}PS C:\vagrant\windows2019-core> vagrant winrm -c 'echo "hi"' --shell cmd
hi
[00:10.920]

PS C:\vagrant\windows2019-core> vagrant winrm -c 'Write-Host "hi"' --shell powershell
hi
[00:22.866]

PS C:\vagrant\windows2019-core> winrs -r:http://localhost:55985/wsman -u:vagrant -p:vagrant 'echo "hi"'

Iakov Gan (JIRA)

unread,
Feb 1, 2020, 6:05:03 PM2/1/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Hello,

As a new bolt user i find it quite difficult to get started because bolt takes about 1 minute to execute a simple command on a remote windows host.

 
I wonder, how i can make bolt to execute simple commands faster?
What would you recommend to improve the execution time of bolt? 

!bolt-execution-time.png!
Here i test varios connection methods:
|*shell*|*connection method*|*execution time*|
|cmd|winrs|1,468|
|powershell|winrs|13,602|
|powershell|Invoke-Command|16,23|
|powershell|bolt+winrm|67,038|
|cmd|ssh|1,268|
|powershell|ssh|13,075|
|cmd|bolt+ssh|47,106|
|powershell|bolt+ssh|56,574|

 

I test on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019).

 

Here is my code for illustration
{code:powershell}PS C:\vagrant\windows2019-core> vagrant winrm -c 'echo "hi"' --shell cmd
hi
[00:10.920]

PS C:\vagrant\windows2019-core> vagrant winrm -c 'Write-Host "hi"' --shell powershell
hi
[00:22.866]

PS C:\vagrant\windows2019-core>   vagrant ssh --  'echo "hi"'
hi
[00:14.596]

PS C:\vagrant\windows2019-core>
winrs -r:http://localhost:55985/wsman -u:vagrant -p:vagrant 'echo "hi"'

Iakov Gan (JIRA)

unread,
Feb 1, 2020, 6:06:04 PM2/1/20
to puppe...@googlegroups.com
PS C:\vagrant\ 14-windows-core-node> vagrant ssh --  'powershell write-host "hi"'
hi
[00:24.211]

PS C:\vagrant\
windows2019-core> winrs -r:http://localhost:55985/wsman -u:vagrant -p:vagrant 'echo "hi"'

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 2:56:04 AM2/2/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Hello,

As a new bolt user i find it quite difficult to get started because bolt takes about 1 minute to execute a simple command on a remote windows host.

The goal here is managing windows and linux nodes from a windows workstation. But with a basic command that takes that long it is hard to iteratively debug and operate.
 
I wonder, how i can make bolt to execute simple commands faster?
What would you recommend to improve the execution time of bolt? 

!bolt-execution-time.png!
Here i test varios connection methods:
|*shell*|*connection method*|*execution time*|
|cmd|winrs|1,468|
|powershell|winrs|13,602|
|powershell|Invoke-Command|16,23|
|powershell|bolt+winrm|67,038|
|cmd|ssh|1,268|
|powershell|ssh|13,075|
|cmd|bolt+ssh|47,106|
|powershell|bolt+ssh|56,574|

 

I test on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019).

 

Here is my code for illustration
{code:powershell}PS C:\vagrant\windows2019-core> vagrant winrm -c 'echo "hi"' --shell cmd
hi
[00:10.920]

PS C:\vagrant\windows2019-core> vagrant winrm -c 'Write-Host "hi"' --shell powershell
hi
[00:22.866]

PS C:\vagrant\windows2019-core>  vagrant ssh --  'echo "hi"'
hi
[00:14.596]

PS C:\vagrant\ 14 windows2019 - windows- core -node > vagrant ssh --  'powershell write-host "hi"'
hi
[00:24.211]

PS C:\vagrant\windows2019-core>
vagrant powershell -c 'write-host "hi"'
    default: hi
==> default: Command: write-host hi executed successfully with output code 0.
[00:19.620]

PS C:\vagrant\windows2019-core>
winrs -r:http://localhost:55985/wsman -u:vagrant -p:vagrant 'echo "hi"'

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 2:59:04 AM2/2/20
to puppe...@googlegroups.com
PS C:\vagrant\windows2019-core> vagrant ssh --  'powershell write-host "hi"'

PS C:\vagrant\windows2019-core> bolt --version
1.47.0
[00:09.901]
{code}

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 3:01:04 AM2/2/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Hello,

As a new bolt user i find it quite difficult to get started because bolt takes about 1 minute to execute a simple command on a remote windows host.

The goal here is managing windows and linux nodes from a windows workstation. But with a basic command that takes that long it is hard to iteratively debug and operate.
 
I wonder, how i can make bolt to execute simple commands faster?
What would you recommend to improve the execution time of bolt? 

!bolt-execution-time.png!
Here i test varios connection methods:
|*shell*|*connection method*|*execution time*|
|cmd|winrs|1,468|
|powershell|winrs|13,602|
|powershell|Invoke-Command|16,23|
|powershell|bolt+winrm|67,038|
|cmd|ssh|1,268|
|powershell|ssh|13,075|
|cmd|bolt+ssh|47,106|
|powershell|bolt+ssh|56,574|

 

I test on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019) on virtualbox provider .

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 3:02:03 AM2/2/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Hello,

As a new bolt user i find it quite difficult to get started because bolt takes about 1 minute to execute a simple command on a remote windows host.

The goal here is managing windows and linux nodes from a windows workstation. But with a basic command that takes that long it is hard to iteratively debug and operate.
 
I wonder, how i can make bolt to execute simple commands faster?
What would you recommend to improve the execution time of bolt? 

!bolt-execution-time.png!
Here i test varios connection methods:
|*shell*|*connection method*|*execution time*|
|cmd|winrs|1,468|
|powershell|winrs|13,602|
|powershell|Invoke-Command|16,23|
|powershell|bolt+winrm|67,038|
|cmd|ssh|1,268|
|powershell|ssh|13,075|
|cmd|bolt+ssh|47,106|
|powershell|bolt+ssh|56,574|

 

I test bolt 1.47.0 on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019) on virtualbox provider.

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 3:33:03 AM2/2/20
to puppe...@googlegroups.com

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 3:34:04 AM2/2/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Hello,

As a new bolt user i find it quite difficult to get started because bolt takes about 1 minute to execute a simple command on a remote windows host.

The goal here is managing windows and linux nodes from a windows workstation. But with a basic command that takes that long it is hard to iteratively debug and operate.
 
I wonder, how i can make bolt to execute simple commands faster?
What would you recommend to improve the execution time of bolt? 

!bolt-execution- time time2 .png!
Here i test varios connection methods:
|*
shell*|* connection method*|*execution time*|
|
vagrant+winrm+ cmd| 10,92|
|vagrant+winrm+powershell|22,866|
|vagrant+ssh+cmd|14,596|
|vagrant+ssh+powershell|24,21|
|vagrant+powershell|19,62|
|
winrs +cmd |1,468|
|
winrs+ powershell| winrs| 13,602|
|
powershell| Invoke-Command +powershell |16,23|
|
powershell| bolt+winrm +powershell |67,038|
|
ssh+ cmd| ssh| 1,268|
|
ssh+ powershell| ssh| 13,075|
|
cmd| bolt+ssh +cmd |47,106|
|
powershell| bolt+ssh +powershell |56,574|


 

I test bolt 1.47.0 on a windows 10 laptop (xps15 2.2 GHZ, 16GB RAM) with a local vagrant vm (windows sever core 2019) on virtualbox provider.

 

Here is my code for illustration
!bolt-execution-time2.png|thumbnail! {code:powershell}PS C:\vagrant\windows2019-core> vagrant winrm -c 'echo "hi"' --shell cmd

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 3:35:04 AM2/2/20
to puppe...@googlegroups.com
Iakov Gan updated an issue
Hello,

As a new bolt user i find it quite difficult to get started because bolt takes about 1 minute to execute a simple command on a remote windows host.

The goal here is managing windows and linux nodes from a windows workstation. But with a basic command that takes that long it is hard to iteratively debug and operate.
 
I wonder, how i can make bolt to execute simple commands faster?
What would you recommend to improve the execution time of bolt? 

!bolt-execution-time2.png!
Here i test varios connection methods:
|*connection method*|*execution time*|
|vagrant+winrm+cmd|10,92|

|vagrant+winrm+powershell|22,866|
|vagrant+ssh+cmd|14,596|
|vagrant+ssh+powershell|24,21|
|vagrant+powershell|19,62|
|winrs+cmd|1,468|
|winrs+powershell|13,602|
|Invoke-Command+powershell|16,23|
|bolt+winrm+powershell|67,038|
|ssh+cmd|1,268|
|ssh+powershell|13,075|
|bolt+ssh+cmd|47,106|
|bolt+ssh+powershell|56,574|

Iakov Gan (JIRA)

unread,
Feb 2, 2020, 3:36:03 AM2/2/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages