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

clean up source and add publisher status #1566

Closed
wants to merge 1 commit into from

Conversation

NodeBoy2
Copy link

@NodeBoy2 NodeBoy2 commented Jan 9, 2020

Open the code for cleaning SrsSource, refer to: #713
At the same time, add a variable to check if SrsSource is active, to handle the case where fetch_or_create() is not used (publish or consume). Solve the issues #1509 and #1553.


TRANS_BY_GPT3

@NodeBoy2
Copy link
Author

NodeBoy2 commented Jan 9, 2020

Test

Test Logic

Use sb_rtmp_publish to push the stream, and all push addresses are different.

Test script logic (using 50*20 routes as an example):

  • Loop 20 times

    • Start sb_rtmp_publish to push the stream in the background 50 times
    • Sleep for 30 seconds
    • killall -9 sb_rtmp_publish
  • Sleep for 10 seconds

  • The script is executed twice, with a one-minute interval in between, to record the difference between the two runs.

Test Results

Run 1 pool size Run 2 pool size Pool difference Run 1 _st_active_count size Run 2 _st_active_count size _st_active_count difference Run 1 VIRT/RES Run 2 VIRT/RES VIRT/RES difference
Before modification 50*20 routes (without service restart) 1857 2869 1012 3721 5747 2026 362m/93m 522m/124m 160m/31m
Before modification 50*20 routes (with service restart) 1004 2004 1000 2015 4017 2000 221m/61m 394m/105m 173m/44m
After modification 50*20 routes 0 0 0 7 7 0 88324/36m 88756/37m 0.4m/1m
After modification 100*30 routes 0 0 0 7 7 0 210m/149m 213m/152m 3m/3m
After modification 500*30 routes 0 0 0 7 7 0 638m/427m 656m/445m 18m/18m

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Jan 9, 2020

Like first, then watch 👍

Due to the 2.0 release being frozen for 2 years, such a big modification cannot be made.
Please submit it for the 3.0 release, which is currently in the alpha7 stage. We can consider merging this modification.

I will close this PR for now. If anyone needs to merge it into the 2.0 release, they can consider doing it themselves.

TRANS_BY_GPT3

@winlinvip winlinvip closed this Jan 9, 2020
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants