Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize AppVeyor network stack for number of dynamic connections #922

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Optimize network stack for number of dynamic connections
  • Loading branch information
IgorMilavec committed Feb 19, 2022
commit 2d735d258cd387a45c05ea81fadd96058b9d3d6d
4 changes: 4 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
os: Visual Studio 2019

init:
- netsh int ipv4 set dynamicport tcp start=1025 num=64510
IgorMilavec marked this conversation as resolved.
Show resolved Hide resolved
- powershell "New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters' -Name 'TcpTimedWaitDelay' -Value '15' -PropertyType 'DWord'"
Copy link
Contributor

@zybexXL zybexXL Feb 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setting requires this other key to be set or it will have no effect: (Source)

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"StrictTimeWaitSeqCheck"=dword:00000001

It also only takes effect after reboot, so if the AppVeyor VM reverts to base settings on each reboot this will also have no effect.

Third, both commands require Elevation. Does AppVeyor execute this as Admin? I find it unlikely.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, AppVeyor build VM is started fresh from image. So there is no point in setting this registry setting... do you know of any other method for setting wait delay that would be effective immediately?

Copy link
Contributor

@zybexXL zybexXL Feb 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can set the per-socket timeout when running the test Suite?

// sets the amount of time to linger after closing, using the LingerOption public property.
LingerOption lingerOption = new LingerOption (true, 10);

SO_REUSEPORT or SO_REUSEADDR seem to be more appropriate, but it looks like Windows doesn't really care about these flags.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, this would work. But I think this amount of changes is beyond this PR and should be discussed further. For now I'll just remove the wait delay change as is is ineffective and leave the enlargement of client port pool in this PR.


before_build:
- nuget restore src\Renci.SshNet.VS2019.sln

Expand Down