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

Improve performance of input-raw and improve handing of large payloads #170

Merged
merged 7 commits into from
Jul 11, 2015

Conversation

buger
Copy link
Owner

@buger buger commented Jul 11, 2015

  • [Reverted, see below]Directly use syscall package to read from sockets, avoiding net/http overhead.
  • Buffering improvements inspired by Fix packet loss in heavy traffic #151
  • Set default GOMAXPROCS to 2xNumProcs()

UPDATE:
For the future references: Initially i tried to directly use syscall package to read from sockets but found that whole golang IO have global lock, and if you use syscall.Socket directly, you can't use net package, even in other threads, otherwise you will experience locks. Also after checking code i found that ReadFrom function is very close to the original syscall.Recvfrom call, and its ok to use it here.

buger added a commit that referenced this pull request Jul 11, 2015
Improve performance of input-raw and improve handing of large payloads
@buger buger merged commit 7af0eb2 into master Jul 11, 2015
@buger
Copy link
Owner Author

buger commented Aug 6, 2015

Included into v0.9.8

@slimus slimus deleted the input-raw-performance branch June 3, 2020 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant