Skip to content

SSH remoting is measureably slower than WSMan remoting #2852

Closed

Description

@SteveL-MSFT

Expected SSH to be on par or faster than WSMan as we no longer have to deal with SOAP/XML encoding

PS C:\> $script = [scriptblock]::Create("(1..10000) | % { [pscustomobject]@{name=`$_;version=`$PSVersionTable}}")

PS C:\> $ubuntu   # running as VM on same client machine

 Id Name            ComputerName    ComputerType    State         ConfigurationName     Availability
 -- ----            ------------    ------------    -----         -----------------     ------------
 12 SSH12           slee-ubuntu16a  RemoteMachine   Opened        DefaultShell             Available

PS C:\> $ssh

 Id Name            ComputerName    ComputerType    State         ConfigurationName     Availability
 -- ----            ------------    ------------    -----         -----------------     ------------
 13 SSH13           slee-thinkpad   RemoteMachine   Opened        DefaultShell             Available


PS C:\> $wsman

 Id Name            ComputerName    ComputerType    State         ConfigurationName     Availability
 -- ----            ------------    ------------    -----         -----------------     ------------
 14 WinRM14         slee-thinkpad   RemoteMachine   Opened        Microsoft.PowerShell     Available

PS C:\> (measure-command {invoke-command -session $ubuntu -scriptblock $script }).totalmilliseconds
9862.1602
PS C:\> (measure-command {invoke-command -session $ssh -scriptblock $script }).totalmilliseconds
8779.3777
PS C:\> (measure-command {invoke-command -session $wsman -scriptblock $script }).totalmilliseconds
5029.1733
Name                           Value
----                           -----
PSEdition                      Core
BuildVersion                   3.0.0.0
WSManStackVersion              3.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
CLRVersion
PSVersion                      6.0.0-alpha
SerializationVersion           1.1.0.1
GitCommitId                    v6.0.0-alpha.13-27-g9c9b56d22f81c449893cc4a93ef2b9075cdcf43c

cc Paul Higinbotham (@PaulHigin)

Activity

  1. added this to the milestone on Dec 7, 2016
  2. modified the milestones: 6.0.0-beta1, on Mar 16, 2017
  3. PaulHigin commented on Mar 22, 2017

    @PaulHigin
    Contributor

    Un-assigning since this is not beta1 work.

  4. modified the milestones: , on May 15, 2017
  5. 8 remaining items

  6. added this to the milestone on Sep 18, 2017
  7. SteveL-MSFT commented on Sep 18, 2017

    @SteveL-MSFT
    MemberAuthor

    The current code is built around base64 encoding which is not necessary for SSH. The changes will be intensive to avoid breaking WSMan remoting.

  8. SteveL-MSFT commented on Jun 21, 2018

    @SteveL-MSFT
    MemberAuthor

    We should also consider a binary serializer than using the current xml serializer

  9. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  10. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  11. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  12. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions