-
Notifications
You must be signed in to change notification settings - Fork 335
aggregation with shadowsocks doesn't work with 'single' connection #502
Comments
Hello,
That's quite old. Did you get all the recent fixes from MPTCP (and elsewhere in the kernel). The last version is on v5.4.230. Other than that, with the info you provided, everything seems OK. Eventually also from Packet traces can help too. If you do have multiple subflows but no traffic on some of them while you should (and you didn't set the "backup" flag on the interfaces), it is important to see the view of the sender. Many reasons can explain why the transfer is limited, e.g. CPU resources, network buffers, bufferbloat, middleboxes, bugs, etc. |
Well, the image was built a couple years ago based on Raspbian Buster. I believe that should not be the reason I'm facing this issue.
My concern is not just that the transfer speeds are low. But that the traffic seems to flow only through 1 of the available 4 WANs. And it is not just restricted to a single WAN either. It seems to flow through a random WAN for a few seconds, say 10-15s. then switches to another WAN, and this keeps happening continuously. I have also confirmed via tracebox that none of the WANs filter MPTCP flags. |
More than 10k commits have been added from Linux Stable and from MPTCP sides, hard to tell... Do you see the problem when you start an upload and/or a download? You will probably need to take traces and analyse why no more data can be pushed. (CPU, buffers, limitations on the receiver (0-windows?) / sender side, etc.)
Are you sure the client/server generates TCP traffic is used in this case? Or UDP (QUIC)?
I guess this number is high because you receive (plain) TCP traffic from the client on a MPTCP-enabled socket. |
I am seeing the problem during both downloads & uploads. 90-95% of throughput seem to flow through 1 WAN whereas the rest flows through a 2nd WAN. And the used WAN keeps changing frequently.
I'm using youtube-dl for downloading and the web interface for uploads. To the extent of my knowledge, they both use TCP.
I'm not following you here. By client, do you mean the shadowsocks client (i.e. raspberry device) or the windows system on the LAN network? |
I advice you to take and look at packet traces.
Same here for the packet traces. By default, Youtube uses QUIC if the client supports it.
The connection on the LAN side: likely your end-client (windows?) is not supporting MPTCP while it looks like you configured the shadowsocks client to create MPTCP connections. |
Just to clarify a couple things.
What packet traces can I provide you with so that you can point me in the right direction? Does tcpdump on all client-side WAN interfaces and on the primary interface in the server suffice? And, how could I use mptcp to achieve UDP aggregation? |
Sorry, I don't know what Shadowsocks is doing with the UDP traffic. If it encapsulates it in a TCP connection/tunnel, then you can force it to use MPTCP. But encapsulate UDP into TCP sounds like a bad idea: if UDP was picked to minimise the latency, then using TCP on top is not recommended.
Indeed.
Analysing packet traces is time consuming and I'm sorry but I don't think I can do the whole analysis myself but I can give some pointers.
Yes, we need the view of the client and server, on each different interfaces, saved in a
I don't recommend it but you can use a VPN (e.g. OpenVPN) using TCP tunnels. |
Following your suggestion, I ran the iperf3 test in both sender and receiver mode from a windows system on the LAN-side of the shadowsocks client. Below are the results from the iperf3 server.
During both single connection (-P 1) and multiple connection (-P 10) tests, the traffic seems to flow through all available WANs. But the issue of only one WAN being used still persists when publishing a stream via RTMP from obs-studio. |
The differences between the download with one and 10 flows seem to suggest you need to adapt
From what I see, RTMP can be on top of TCP or UDP ( Also, some TCP CC (or maybe some clients/servers) could be very sensitive to latency changes: in short, it could decide not to push faster when multiple paths are being used because the latency increased a bit. For example some video conferences services running on top of TCP need a way to decide how much data to push and which video "quality" to stream while still keeping a low latency: in this case, it is possible the application doesn't try to send more not to increase the latency. If there is a noticeable latency difference between the links, you could have this kind of issue. You can maybe trick some algorithms by introducing artificial latency with |
Trying to use shadowsocks-libev v3.3.5 for aggregating multiple WANs. Created per-interface entries in tables 'ip rule' and 'ip route'. ss-server is running in 64-bit debian-10 vps. ss-redir is running in 32-bit raspi-os, configured to work as a router.
While running ookla speedtest or upload/download files from router-side LAN system, all WANs are used only occasionally. Ookla speedtest with 'Multi' connection uses all WAN whereas 'Single' connection uses only one of the 4 WANs randomly. Downloading or uploading videos to YouTube always seem to use only a single WAN.
I cannot figure out if the issue is from the mptcp-capable kernel not doing its job correctly or if its something from the shadowsocks-side.
Client-side info:
The text was updated successfully, but these errors were encountered: