-
Notifications
You must be signed in to change notification settings - Fork 834
About Large Packet's Passthrough
By default UDPspeeder supports passthrough of packets as large as 3600, which should be good enough for almost all applications in practice.
This is at the moment limited by a compile time parameter.
If you indeed need to bypass the limitation, you can change the max_data_len
in https://github.com/wangyu-/UDPspeeder/blob/branch_libev/common.h
, from 3600
to any value <=65535.
UDPspeeder has two FEC modes: --mode 0
(default) and --mode 1
.
If you want large packet to go through efficiently, use --mode 0
.
--mode 0
have user space packet splitter by design, --mode 0
will try to split the packet at sender end and reassemble at receiver end.
--mode 1
doesn't have user space packet splitter. for --mode 1
, if you want to let large packet go through you have to rely on the kernel space IP packet splitter, which can enlarge your underlying network's packet loss. You might also need to disable the kernel PMTU to get kernel space IP packet splitter work correctly.
I don't suggest you to use --mode 1
to send large packet, unless you understand what you are doing.
assume you use --mode 0
, there are two important parameters that affects large packet's pass through:
--mtu
tells the use space packet splitter, the max size of post-splitted packet size. You need to make sure this is smaller than your network's max allowed size. If you don't know the correct value, then use 1250
it cannot go wrong.
-f
parameters is the parameter for FEC encoder, however it also affects the user space packet splitter. For example for -f 2:4
or -f 2:3
, the 2
decides the max number of pieces a packet can be splitted into; 2
means a large packet can be splitted into at most 2 pieces.
For another few examples:
-f10:5
a packet can be splitted into at most 10 piceces if needed.
-f1:3,2:4,8:6,20:10
(Fine-grained-FEC-Parameters) a packet can be splitted into at most 20 piceces if needed. (the largest num in -f
matters here)
For another example:
-f1:2
means, a packet at be spliited into at most 1 picece. In other words, which means the splitter cannot split the packet. So even if I said UDPspeeder supports passthrough of packets as large as 3600, if you set the parameter 1
it cannot make full use of the 3600. That's the reason why I don't suggest use -f1:y
in Suggested-parameters
Assume your MTU is 1250, if you need packet >1250
to pass through, you need x to be >1
. If you need packet 1250*2
to pass through, you need x to be >2
.
In general, if you need packet >L
to pass through you need x > L/MTU