Open winlinvip opened 5 months ago
Attempt to acquire only the main thread's CPU usage as the basis for circuit breaker decisions.
TRANS_BY_GPT4
Assessing the load on a multithreaded program is challenging; one should evaluate the CPU usage of the thread with the highest load. Merely considering the CPU usage of the primary thread of the SRS may be insufficient, as high load on the SRT's threads can also lead to issues.
TRANS_BY_GPT4
Describe the bug When the SRS operates in multi-threaded mode, such as with the SRT protocol, in addition to the main thread of SRS, two additional worker threads are initiated. When the overall CPU usage reaches 100%, SRS accounts for approximately 40% of the usage, while the two SRT threads account for about 50%. At this point, a circuit breaker mechanism is triggered, resulting in packet loss.
Version SRS 6.0
To Reproduce Steps to reproduce the behavior:
top -H $(pidof srs)
to check CPU usage of each threads of SRS.Expected behavior In multi-threaded mode, the circuit breaker should be triggered based on the CPU usage of the highest-utilized thread, rather than the total CPU usage.
Screenshots
TRANS_BY_GPT4