-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
net: poor performance on tcp accept / close workload #32592
Comments
If you accept a lot of TCP connections and then immediately close them, it seems normal to accumulate sockets in CLOSE_WAIT status. That's how TCP works. You may be able to reduce the number of such sockets by calling |
I see about the conn.SetLinger(0)
The unacknowledged is data trans ack? or like FIN or SYN tcp package ack? |
Is there anything for us to do with this issue? |
I want to observe for a while |
THX |
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
)?go env
OutputWhat did you do?
my linux is :
online env, I have probabily more than 100k tcp connection / each second, I have lots of close-wait conn. When I accept a conn, I do nothing,only call conn.Close then get Next conn by for. But my close-wait tcp conn more and more ,even more than few million close-wait.
I statistic by:
or:
What did you expect to see?
I suspect it cause by conn.Close()
Is this the standard performance or something I can do?
I want to see there is no or few of close-wait tcp , or my linux will crash by memory .
What did you see instead?
even more than few million close-wait.
The text was updated successfully, but these errors were encountered: