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 throughput performance #3 (rx buffer focus) #749

Merged
merged 12 commits into from
Oct 21, 2024

Conversation

jean-roland
Copy link
Contributor

In order to improve rx performance we need to reduce the amount of copies that are made. By using a refcount and by allocating dynamically the rx buffers we can avoid copies at the cost of memory allocation, only in the case where data is processed out of context [note: that is the case of query replies in latest consolidation mode].

  • The rx buffers (zbuf_t) now have a refcounted slice. If after processing there are more than 1 refcount, the transport will allocate a new buffer.
  • Fixed a few undefined behaviors in tests and examples.

@jean-roland jean-roland changed the title mprove throughput performance #3 (rx buffer focus) Improve throughput performance #3 (rx buffer focus) Oct 17, 2024
Copy link

PR missing one of the required labels: {'internal', 'new feature', 'bug', 'enhancement', 'dependencies', 'breaking-change', 'documentation'}

@jean-roland jean-roland added the enhancement Things could work better label Oct 17, 2024
@gabrik gabrik merged commit 3fea89c into eclipse-zenoh:dev/1.1.0 Oct 21, 2024
53 of 54 checks passed
@jean-roland jean-roland deleted the ft_rx_perf branch October 24, 2024 12:42
jean-roland added a commit to jean-roland/zenoh-pico that referenced this pull request Nov 13, 2024
…ipse-zenoh#749)

* feat: add refcount to z_buf

* feat: wrap payload instead of copy

* fix: segfaults on tests and examples

* feat: pass arg by reference in reply_create

* feat: add zbuf copy bytes

* fix: zbuf clear memory leak

* feat: improve read task buffer realloc logic

* doc: update read task comment

* feat: add raweth read task buffer allocation

* feat: move rx buffer logic to function

* fix: zbuf init code

* feat: add rc count function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Things could work better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants