-
Notifications
You must be signed in to change notification settings - Fork 276
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
Support sendmmsg for UDP. #12
Comments
winlinvip
added a commit
that referenced
this issue
May 3, 2020
winlinvip
added a commit
that referenced
this issue
May 3, 2020
Remove the sendmmsg because we are refining ST, for #19 and ossrs/srs#2188. |
winlinvip
referenced
this issue
in ossrs/srs
Feb 26, 2021
winlinvip
referenced
this issue
in winlinvip/srs
Feb 26, 2021
winlinvip
referenced
this issue
in ossrs/srs
Apr 5, 2021
目前的进展:sendmmsg和GSO都是能提升UDP IO的性能,但是RTC或UDP服务器,更多的性能损耗不是在IO,而是在内核协议栈,以及(由于是通信业务所以一般都要求)加解密,简单说来:
因此,对于计算密集型业务,我们首先要做的是能利用多核的能力,也就是多线程或多进程能力( #19 ),在多核改造完成后,再进行IO的优化。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See ossrs/srs#307 (comment)
Linux GSO,可以将多个UDP包延迟分包,提升性能,参考UDP GSO原理及应用。
rtc-plaintext-linux4-gso-ok.pcapng.zip
rtc-plaintext-multiple-slices-as-one-NALU.pcapng.zip
rtc-plaintext-linux3-gso-invalid.pcapng.zip
SRS新增了包性能分析的API:http://localhost:1985/api/v1/perf
可以使用工具来分析:
./scripts/perf_gso.py http://localhost:1985/api/v1/perf
No GSO, Fragment at Source
不开启GSO,在接收包(Source)时将消息分成RTP包,统计数据如下:
No GSO, Fragment at Connection
不开启GSO,在发送包(Connection)时将消息分成RTP包,统计数据如下:
GSO, Fragment at Connection
开启GSO,在发送包(Connection)时将消息分成RTP包,统计数据如下:
GSO, Larger FU-Payload
之前FU Payload的长度是1200,改成了1300,参考bfc70d64和b91e07f4。
修改后,IP包最大是1356字节,小于1500的MTU。从结果看,RTP包从1.56倍降低到1.49倍,GSO分包没有影响。
GSO, Padding Packets
Audio包比较多,有时候差异不大,比如有三个包:
257 256 255
,如果能加点padding,那么可以作为一个GSO包发送,参考c95a8517。从数据上看,开启padding(127)后,你将GSO包倍数从0.74降低到0.67,将效能从0.67提升到0.74。
The text was updated successfully, but these errors were encountered: