-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
ST: Low performance when got large amount of coroutines. #1553
Comments
Using gdb to debug a long-running program (while streaming), in the _st_thread_create() function of the st library, the _st_active_count variable has reached 1695. At the same time, in the fetch_or_create() function of srs_app_source.cpp, the value of the pool is outputted, and it is found that the previous streaming records still exist.
|
Refer to #713. In SrsSource::fetch(), add source->die_at = -1; At the same time, add the active_at variable to SrsSource to record the last active time (update it in on_metadata, on_video, on_audio). When cleaning up SrsSource objects, first check if die_at has timed out, then check if the last active time has timed out. Can this solve the problem?
|
The waiting performance of ST needs to be optimized.
|
me too, CPU 20%'.
|
There is a PR ossrs/state-threads#5 related to this issue, improving the performance for iterating all coroutines. |
Description'
Please ensure that the markdown structure is maintained.
2.0.258
Replay
How to replay bug?
1. Long-time operation/live streaming (using random values for streaming URLs, all different)
Expected behavior (Expect)
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: