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

Further performance work for packet loop #1615

Open
huitema opened this issue Jan 10, 2024 · 0 comments
Open

Further performance work for packet loop #1615

huitema opened this issue Jan 10, 2024 · 0 comments

Comments

@huitema
Copy link
Collaborator

huitema commented Jan 10, 2024

The unified socket loop merged code from the previous "packet loop" and the windows specific version, keeping the most important improvements from both:

  • use select and synchronous recvmsg in Unix
  • use wait for multiple events and asynchronous recvmsg in Windows
  • use recvmsg in Unix,
  • use receive coalesce with recvmsg in Windows
  • use UDP GSO (Unix) or send coalesce (Windows) with sendmsg

There are a couple more optimizations that could be used, such as:

  • replace select by poll in Unix
  • use UDP GRO for equivalent of receive coalesce in Unix
  • use recvmmsg in Unix to receive multiple messages
  • use sendmmsg in Unix to send multiple messages
  • use multiple asynchronous sendmsg in parallel in Windows (was implemented in Windows loop)

This should be implemented over time.

The most important next improvement is the support for running the packet loop in a background thread, because that would remove the need for "active polling", which can affect performance. The next most important step is the implementation of multiple asynchronous sendmsg in parallel in Windows, because that would allow for removal of the previous loop for the code base.

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

No branches or pull requests

1 participant