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

[MM-61786] Reduce number of open file descriptors #908

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Conversation

streamer45
Copy link
Collaborator

Summary

Two changes on this side:

  • Using the new UDPSocketsCount setting to limit the number of listening UDP sockets created by the embedded RTC server. In this mode, scaling isn't a goal, so we reduce them to NumCPU.
  • I can't exactly recall what led to the existing activation sequence, but we'd be starting up the embedded RTC server regardless of whether RTCD is used. This seems wrong as it causes us to use unnecessary resources on the Mattermost side (e.g. opening sockets that will never be used).

Related PR

mattermost/rtcd#162

Ticket Link

https://mattermost.atlassian.net/browse/MM-61786

@streamer45 streamer45 added the 2: Dev Review Requires review by a core committer label Nov 20, 2024
@streamer45 streamer45 added this to the v1.4.0 / MM v10.4 milestone Nov 20, 2024
@streamer45 streamer45 requested a review from cpoile November 20, 2024 20:04
@streamer45 streamer45 self-assigned this Nov 20, 2024
Copy link
Member

@cpoile cpoile left a comment

Choose a reason for hiding this comment

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

Huh, good catch.

Re: numCPUs, is that enough sockets, even if you're not worried about scaling?

@cpoile cpoile added 3: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core committer labels Nov 22, 2024
@streamer45
Copy link
Collaborator Author

Huh, good catch.

Re: numCPUs, is that enough sockets, even if you're not worried about scaling?

We used numCPUs on rtcd before the latest ceiling tests and could easily achieve thousands of sessions per node. Certainly far more than what I'd be recommending when running in plugin mode.

@streamer45 streamer45 merged commit 9a7aa0d into main Nov 25, 2024
18 checks passed
@streamer45 streamer45 deleted the MM-61786 branch November 25, 2024 13:41
streamer45 added a commit that referenced this pull request Dec 2, 2024
* Reduce number of open file descriptors

* Update test

* Update rtcd
streamer45 added a commit that referenced this pull request Dec 2, 2024
* Reduce number of open file descriptors

* Update test

* Update rtcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants