sshnet / sshnet/SSH.NET

Application Using Limited Cores When Run via C# Code

Open
#1,674 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

Hello Team,

I have an issue where an application executable utilizes all 39 logical processors when I run it directly from the Command Prompt. However, when I execute the same command using C# code (shown below), the application only uses 13 logical processors only.

Additionally, I created a mediator console application that only runs the same command. When I run this console app from my local system to a Google Cloud VM, it also utilizes only 13 logical processors.

Could you please help me understand why this behavior is occurring? Is there any patch, configuration, or workaround available to ensure the application uses all 39 logical processors when triggered via code?

C# Code Used:
public async Task Execute(string command)
{
//command = "C:\ChassisSimTechnologies\ChassisSim_v3_45\ChassisSim_v3_45_elite.exe C:\ChassisSimTechnologies\csim_batch_file.txt";
using (var client = new SshClient(Global.Host, Global.Username, Global.Password))
{
await client.ConnectAsync(default);
var cmd = client.RunCommand(command);
client.Disconnect();
return cmd.Result;
}
}

Thanks in advance for your assistance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by comparing the direct command with the C# SSH.NET path using SshClient.RunCommand and the same Google Cloud VM environment. Done means determining whether the 13-core limit comes from SSH.NET or from the remote process environment, and documenting a confirmed workaround if one exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.