Skip to content

feat(linux-client): reduce number of TUN threads to 1#8914

Merged
thomaseizinger merged 2 commits into
mainfrom
feat/linux-client-num-threads
Apr 28, 2025
Merged

feat(linux-client): reduce number of TUN threads to 1#8914
thomaseizinger merged 2 commits into
mainfrom
feat/linux-client-num-threads

Conversation

@thomaseizinger
Copy link
Copy Markdown
Member

Having multiple threads for reading and writing the TUN device can cause packet re-orderings on the client. All other clients only use a single TUN thread, so aligning this value means a more consistent behaviour of Firezone across all platforms.

Copilot AI review requested due to automatic review settings April 28, 2025 07:00
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
firezone ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 7:03am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@thomaseizinger thomaseizinger changed the title feat(linux): reduce number of TUN threads to 1 feat(linux-client): reduce number of TUN threads to 1 Apr 28, 2025
Copy link
Copy Markdown
Member

@jamilbk jamilbk left a comment

Choose a reason for hiding this comment

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

LGTM while we sort the re(transmission|ordering) issues out.

In the (hopefully) near future, the headless client will be recommended in site-to-site configurations (this is a popular ask), so we can revisit performance bottlenecks then.

@thomaseizinger thomaseizinger added this pull request to the merge queue Apr 28, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 28, 2025
@thomaseizinger thomaseizinger added this pull request to the merge queue Apr 28, 2025
@thomaseizinger
Copy link
Copy Markdown
Member Author

thomaseizinger commented Apr 28, 2025

we can revisit performance bottlenecks then

I am very certain that segmentation offloading for the TUN device will give us better performance than multi-threading so I wouldn't be surprised if we don't need it at all.

Merged via the queue into main with commit ad9a453 Apr 28, 2025
114 checks passed
@thomaseizinger thomaseizinger deleted the feat/linux-client-num-threads branch April 28, 2025 12:44
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.

3 participants