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: use non-blocking syscall.Syscall for non-blocking calls #3412
Labels
Comments
Sounds good. Just notes. SetNonblock calls fcntl, which can block in some cases, so it would need to call fcntlNB. And it's hard to convince myself that setsockopt never blocks, since it has so many different options at different kernel layers, so I think it would be best to use SetsockoptIntNB as well. |
A member on the golang-nuts mailing list posted this profile today. I believe implementing this, even partially, for Write, would improve the reported hello http benchmark significantly. Attachments:
|
Owner changed to @davecheney. Status changed to Started. |
Patch set http://golang.org/cl/6739043/#ps2001 (not for submission) was reported to give a 10% improvement by a user on the golang-nuts ML. |
Hello, After investigation making this change from Write to WriteNB does not generate a marked improvement so I feel that this feature is not currently worth the cost and complexity of its implementation. I have moved the ticket to thinking state and deprioritised the issue to Go1.1 Maybe. Please correct that status if you feel this is incorrect. Hopefully, with improvements to the scheduler this feature can be revisited with more positive results. Labels changed: added go1.1maybe, removed go1.1. Owner changed to ---. Status changed to Thinking. |
Attached patch makes "Hello World" webapp from 6200req/sec to 7300req/sec on Linux 3.2.0. (ab -c10 -n20000, go 1.0.3) Summary of this patch: * Use accept4 and remove ForkLock * Use WriteNB and ReadNB * Currently, only for Linux Could anyone verify the performance improvement of this patch? Attachments:
|
command: siege -b -t 10S http://10.10.2.26:8888/ version: SIEGE 2.70 concurrency: 15 w/o GOMAXPROCS w/o patch 4684.35 trans/sec with patch 5572.23 trans/sec with GOMAXPROCS=4 w/o patch 8368.84 trans/sec with patch 9235.72 trans/sec |
sonofacandy: I think some of the improvements are the accept4 change, which can probably be submitted independently. This project uses Rietveld for code review. Can you please spin the accept4 change off into a separate CL. You will find the contribution guidelines and instructions here, http://golang.org/doc/contribute.html |
We have either a list of minimum platform specs, or an issue to create such a list for go 1.1. From memory we require .25 or .27 on intel, but in practice for rhel and Debian it's actually .32 as that is what ships in their current stable kernels, so I don't think this is a big issue. It will mean Rhel5 moves from unsupported to broken which is a shame, unless we have some kind of fallback if the syscall fails. I think there is an example of that in the net package already. |
I've created https://golang.org/cl/7188044/ |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: