Skip to content

Conversation

@jzhou77
Copy link
Contributor

@jzhou77 jzhou77 commented Jun 11, 2019

On the sending side, a large packet is split into smaller pieces. On the
receiving side, use packet length to allocate buffer to avoid multiple memcpy
and allocations.

This fixes #1466 and #1680 .

@jzhou77 jzhou77 marked this pull request as ready for review June 12, 2019 04:46
@etschannen
Copy link
Contributor

This looks like it still calls conn->read() with a request for a large amount of bytes to be copied, we should have a loop with a yield that reads incrementally until the buffer is filled

@jzhou77
Copy link
Contributor Author

jzhou77 commented Jun 15, 2019

@fdb-build test this please

@alexmiller-apple
Copy link
Contributor

Tag reviewer and assignee!

@hgray1 hgray1 assigned jzhou77 and etschannen and unassigned jzhou77 Jun 17, 2019
@hgray1 hgray1 requested a review from etschannen June 17, 2019 20:25
jzhou77 and others added 9 commits June 25, 2019 10:18
On the sending side, a large packet is split into smaller pieces. On the
receiving side, use packet length to allocate buffer to avoid multiple memcpy
and allocations.
And add yield between consecutive reads.
For large packet, allocate sizeof(uint32_t) more bytes for next packet size.
Also add knob MIN_PACKET_BUFFER_FREE_BYTES, which is used to trigger allocation
of a new arena when free bytes are lower than this threshold.
@jzhou77
Copy link
Contributor Author

jzhou77 commented Jun 25, 2019

@fdb-build test this please

@etschannen etschannen merged commit 5ccffe3 into apple:master Jun 28, 2019
@jzhou77 jzhou77 added this to the 6.2 milestone Jul 1, 2019
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.

Better handling of large transactions

3 participants