x/net: Performance degradation on Windows 64 bit when using "tcp4"/"tcp6" as network instead of "tcp" in net.Listen() #40243
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Windows 64 bit
go env
OutputWhat did you do?
Pre issue we created a single listener for http and use that to Listen with protocol = tcp
Then we changed the code to use tcp4 and/or tcp6 explicitly in the Listen function. The code for this is given below.
(1) start listening to ipv6 - fail service if listen fails
(2) try to listen to ipv4 - don't fail service even if listen fails.
(1) start listening to ipv4 - fail service if listen fails
(2) try to listen to ipv6 - don't fail service even if listen fails.
Create 2 listeners - one for http and one for https.
Code to create the listeners -
What did you expect to see?
No change in performance tests (this is true for the Linux - Centos7 machine and Mac)
Previous throughput - 131K
What did you see instead?
Slowdown only on the Windows performance tests. The throughput on Linux and Mac more or less stayed the same.
On windows we saw a 50% degradation.
I changed the code to test just using tcp and tcp4/tcp6 with the rest of the code being the same. Thats when I see the degradation in performance.
Question - Why is there an performance issue with using tcp4/tcp6 instead of tcp in net.Listen() on Windows ? Is this an expected issue ?
The text was updated successfully, but these errors were encountered: