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

[Enhancement] UDP sockets improve with sendmmsg/recvmmsg #823

Open
3 tasks
zonyitoo opened this issue Apr 27, 2022 · 9 comments
Open
3 tasks

[Enhancement] UDP sockets improve with sendmmsg/recvmmsg #823

zonyitoo opened this issue Apr 27, 2022 · 9 comments

Comments

@zonyitoo
Copy link
Collaborator

zonyitoo commented Apr 27, 2022

Speedtest: shadowsocks/shadowsocks-org#194 (comment)

Batch send and recv UDP packets will significantly increase the upper limit of speed for UDP channels.

Works have to be done:

  • Find a proper way (zero-cost abstraction) for sendmmsg and recvmmsg on these 4 platforms
  • Making UDP association channels to be compatible with batch send / recv
  • Proper way to fallback (when sendmmsg/recvmmsg are not supported)

If anyone interested to make it available, PRs are welcome.

@dev4u
Copy link

dev4u commented May 11, 2022

遇到未知情况:是否因为没有区分bypass流量,还是proxy流量,在微信语音通话时,通话质量不好。
表现为:在对方说话过程中,己方想插一句话,对方没办法听到。就像无线对讲机的那种体验。

@zonyitoo
Copy link
Collaborator Author

sendmmsg and recvmmsg are not used in actual code yet.

@dev4u
Copy link

dev4u commented May 11, 2022

sendmmsg and recvmmsg are not used in actual code yet.

那可能是我的ipv6问题,回去我确认一下。

@dev4u
Copy link

dev4u commented May 21, 2022

那可能是我的ipv6问题,回去我确认一下。

万恶的,几天前开始就把我出国的ipv6流量全掐断了。

多包合发、多包合收的功能什么时候可以开放呢?ipv4的使用体验不是太好,想看看这个能不能提升使用质量。

@zonyitoo
Copy link
Collaborator Author

Do not expect sendmmsg/recvmmsg can improve user experience in poor network environment. sendmmsg/recvmmsg is just for reducing syscalls, which will eventually increase the upper limit of performance.

@database64128
Copy link
Contributor

The GFW enforces much fewer rules on IPv6. I think you should do a traceroute to make sure it's not your local network's problem.

@dev4u
Copy link

dev4u commented May 21, 2022

其实对于移动手机用户来说,体验好并不等于上网速度快。更多追求的是电池续航更长点、网络请求响应迅速点。
或许这也是大佬们说的,别压榨尽手机的极限能力吧。
sendmm、recvmm,正是把多次包合并一次来处理。在理论上,应该能延长电池续航能力。

@dev4u
Copy link

dev4u commented May 21, 2022

The GFW enforces much fewer rules on IPv6. I think you should do a traceroute to make sure it's not your local network's problem.

先放几天再试,毕竟最近网上太多事情发生了,有可能受不知哪个事件的影响导致的。

@database64128
Copy link
Contributor

Turns out FreeBSD's sendmmsg(2) is just a compatibility shim in its libc. It still makes sendmsg(2) syscalls. https://github.com/freebsd/freebsd-src/blob/main/lib/libc/gen/sendmmsg.c

Therefore it should be removed from the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants