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

Increase network buffer size #362

Closed
whatyouhide opened this issue Apr 13, 2024 · 0 comments · Fixed by #363
Closed

Increase network buffer size #362

whatyouhide opened this issue Apr 13, 2024 · 0 comments · Fixed by #363

Comments

@whatyouhide
Copy link
Owner

          I have another facet to the performance regressions in .18.  Let me know if this should be a separate issue.

The performance of large result sets has significantly worsened. One of the ones I'm looking at is about 100% slower, going from 400ms to 800ms.

I believe this is because the new connection code uses active mode sockets and by default is receiving something like a single packet of data per message (byte_size says about 1400). For each tiny message, we append it into the buffer and try to parse a frame from it.

I experimented a bit and while I don't know if this is the right way to solve this, if I set the buffer option on the transport options to some large number, it fixes the performance degredation.

For instance

Transport.setopts(data.transport, active: :once, buffer: 50000)

Thoughts?

Originally posted by @kennethito in #357 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant