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

Adds configuration options for TCP sockets, tuning for Hub app. #759

Merged
merged 12 commits into from
Dec 31, 2023

Conversation

balazsracz
Copy link
Collaborator

@balazsracz balazsracz commented Dec 29, 2023

Adds several tuning parameters for TCP sockets:

  • SO_SNDBUF
  • SO_RCVBUF
  • TCP_NOTSENT_LOWAT

Refactors where the fd socket options are set to a single place.
Applies some reasonable (but not great) values for the Hub application.
Switches the Hub application to use select(). Tunes the parameters to limit buffer size in the hub.
Fixes a crashing bug where a GridconnectBridge was deleted too early when packets owned by its pool were still in flight.

This needs no dedicated memory, but uses the regular mainBufferPool.

Add a check that all outgoing packets are released before deleting the pool.
This solves hub crashing when a client disconnects.
Copy link
Owner

@bakerstu bakerstu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting logging mechanism. I'll have to squirrel that away for possible later use.

@balazsracz balazsracz merged commit 761abe9 into master Dec 31, 2023
4 checks passed
@balazsracz balazsracz deleted the bracz-optimize-tcp-socket branch December 31, 2023 11:40
balazsracz added a commit that referenced this pull request Jan 1, 2024
# Via GitHub
* master:
  Adds configuration options for TCP sockets, tuning for Hub app. (#759)
  Limits end to end buffering in gridconnect bridge. (#758)
  Ensures that an executor thread can not be created twice. (#757)
  Fixes build_bootloader_img.py. (#755)

# Conflicts:
#	src/utils/sources
balazsracz added a commit that referenced this pull request Jan 2, 2024
* master:
  Adds configuration options for TCP sockets, tuning for Hub app. (#759)
  Limits end to end buffering in gridconnect bridge. (#758)
  Ensures that an executor thread can not be created twice. (#757)
  Fixes build_bootloader_img.py. (#755)
balazsracz added a commit that referenced this pull request Jan 2, 2024
* bracz-optimize-tcp-socket:
  Adds configuration options for TCP sockets, tuning for Hub app. (#759)
  Limits end to end buffering in gridconnect bridge. (#758)
  Ensures that an executor thread can not be created twice. (#757)
  Fixes build_bootloader_img.py. (#755)
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.

2 participants