Skip to content

Sharing AuthorizationManager causes contention when opening Runspaces in parallel #7153

@alx9r

Description

@alx9r

I'm not sure if this is something that should be fixed or not. I'm opening this issue for two main reasons:

Steps to reproduce

Invoke authorizationManagerContention.ps1.

Expected behavior

I expected the amount of time it takes to open runspaces in parallel to be similar whether AuthorizationManager is shared or not.

Actual behavior

Sharing AuthorizationManager causes an approximately 0.5x slow down on my 16-core test system.

ProcessorCount: 16

Name    Elapsed(ms)
----    -----------
One Per        3764
Shared         6974

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.1.0-preview.691
PSEdition                      Core
GitCommitId                    v6.1.0-preview.691
OS                             Microsoft Windows 6.3.9600
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimeWG-Engine-Performancecore PowerShell engine, interpreter, and runtime performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions