-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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 Performance for SRS #1673
Comments
SRS4: Refine ST Iterate Coroutines PerformanceThere is an optimization in ST that could potentially improve performance by 5% to 10%. This mainly addresses the issue of iterating coroutines. Data reference: ossrs/state-threads#5 (comment) This optimization involves significant changes, so it will not be implemented in SRS3, but is expected to be in SRS4. MacPro information:
Docker information:
SRS3 for Playing BaselineSRS3, without this optimization, can serve as a performance baseline to see how much this PR has improved relative to it.
Interpretation:
SRS3 for Playing with ST RefinedSRS3, with this PR merged, optimizes the ST iteration logic.
Interpretation:
|
SRS3: Use Compiler O2 To Improve PerformanceSRS1,2,3 have always used O0 by default, disabling compiler optimization. Data can be compared after enabling optimization. MacPro information:
Docker information:
SRS3 Play BaselineFirst, let's look at the baseline data, with an average CPU usage of 66%, 39% in user space, and 22% in system space.
SRS3 Play with Compiler O2After enabling the O2 compiler option for SRS3, performance can be improved by about 10%, with CPU usage around 52%, 26% in user space, and 17% in system space.
|
It was found that the Docker environment may have unstable baseline issues, sometimes high and sometimes low, with significant differences, as shown in the following figure: Some optimizations have been made, some of which are expected to improve, such as enabling O2, but due to the unstable baseline, they will be put on hold for now and tested on a physical machine later. The following are the optimization branches:
|
Regarding ST optimization, the points that can be optimized are:
For analysis on ST, refer to: https://github.com/ossrs/state-threads/tree/srs#analysis
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Performance optimization is an endless topic that requires continuous improvement. SRS2 has undergone a significant performance optimization, increasing from 3k to 7k. Further optimizations are needed, and the optimization process and data will be posted in this issue.
Previously, SRS2 had undergone some optimizations, as referenced below:
Play RTMP benchmark
The data for playing RTMP was benchmarked by [SB][srs-bench]:
Publish RTMP benchmark
The data for publishing RTMP was benchmarked by [SB][srs-bench]:
Play HTTP FLV benchmark
The data for playing HTTP FLV was benchmarked by [SB][srs-bench]:
Latency benchmark
The latency between encoder and player with realtime config([CN][v3_CN_LowLatency], [EN][v3_EN_LowLatency]):
|
The text was updated successfully, but these errors were encountered: