Hi Shachar, I know you had it some time ago with sharefest, and I'm having it now with WebP2P.io :-) Sorry for the delay, I'm really busy with work and classes and development is going slow.
Does the size of 1300 bytes come from some specification, or did you found it by try-and-error? I remember Michelle Bu found this way the size of 1073 byted on RTP DataChannes. Can I be able to use securely the size of 1300 as a constant in my code, or could I have problems and should use a smaller size?
Send from my Samsung Galaxy Note II
--
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/LZsm-jbP0zA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
It's specified in the spec, but I also talked with ff/chrome guys and vreified with trial & error. (It's not exactly 1300, I don't remember the exact number, because I had to substract the overhead we as an application add to the raw data chunk size. Anywhere between 1200 to 1270 you should be fine.
1) Shouldn't the MTU be set even lower to account for the fact that we're tunneling SCTP over DTLS and UDP (~30~50 bytes and 8 bytes respectively). Round it up, and we're left with 1200 bytes?
2) Assuming we have 1200 bytes to work with, there is also the 28 byte SCTP header (with single data chunk), which means.. ~1172 bytes. Round it down, let's say 1150 bytes for application data?
static const size_t kSctpMtu = 1280;
The initial Path MTU at the IP layer MUST NOT exceed 1200 bytes for IPv4 and 1280 for IPv6. Taking an overhead of 20 bytes for IPv4, 40 bytes for IPv6, 8 bytes for UDP, 13 + X for DTLS and 28 bytes for SCTP into account, this results in an SCTP payload of 1131 - X when IPv4 is used and 1192 - X bytes when IPv6 is used.
Chrome assumes wire MTU of 1280. http://tools.ietf.org/html/draft-ietf-rtcweb-data-channel-06#page-8 talks about the max SCTP payload size; as indicated in that doc,
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To avoid the terminology confusion, I want to make it clear that Chrome’s 1280 is user pkt size, which is calculated based on 1500 MTU (of Ethernet) size.
I think the 1280 calculation is lower for some access networks like 4G LTE (EPC) and scenarios like IPSec use (which is very common for telecommuting use cases). Overall, I think it is not optimal as it is not considering the various tunnelings and overheads that may be added by access networks (4G LTE GPRS tunneling) and/or applications (e.g. IPSec).
Determining packet size based on Ethernet MTU only takes
care of IP fragmentation if the underlying network is Ethernet without any
tunneling (or other reasons for reduced MTU size) all the way to the
destination. As we know, please note that the purpose here is to avoid IP
fragmentation, not just the next hop, but all the hops covering until the
destination. PathMTU (RFC 4821), as the name indicates, calculates the actual MTU size of the entire path
from source ip to destination ip, independent of access networks and other tunneling
that may be used. The mentioned PathMTU RFC outlines procedures to be used.
As an additional resource for 4G LTE reference, I want point to 3GPP TS 23.060 page 341 “Figure C.1: Overhead for MTU calculation” .
Other access technologies like Cable (http://www.cablelabs.com/specs) may use similar tunneling mechanism there by “reducing” the MTU size available to the applications.
The above discussion was started for data channel transport, however I also want to point
out that the video RTP size should also consider this PathMTU size to avoid IP
fragmentation as they traverse the entire path to the destination.If such PathMTU is not considered then in some cases (like IPSec
over LTE) every video RTP pkt might be subject to IP fragmentation. Using Path MTU RFC 4821 fixes all these by calculating the
true end-to-end MTU size which avoids IP fragmentation altogether.
My 2 cents!
-Raju
> Determining packet size based on Ethernet MTU only takes care of IP fragmentation if the underlying network is Ethernet without any tunneling (or other reasons for reduced MTU size) all the way to the destination. As we know, please note that the purpose here is to avoid IP fragmentation, not just the next hop, but all the hops covering until the destination. PathMTU (RFC 4821), as the name indicates, calculates the actual MTU size of the entire path from source ip to destination ip, independent of access networks and other tunneling that may be used. The mentioned PathMTU RFC outlines procedures to be used.
>
Would it be possible/makes sense to be able to tell to Javascript what's the current pathMTU? Maybe with the Stats API?
Would it be possible/makes sense to be able to tell to Javascript what's the current pathMTU? Maybe with the Stats API?
>> Would it be possible/makes sense to be able to tell to Javascript what's the current pathMTU? Maybe with the Stats API?
>
> IMHO, application/javascript should be agnostic of the underlying PathMTU size.
Yeah, I know and think this abstraction it's a great idea, I just was asking for it for an optimization corner case.
P.D.: great explanation, very detailed :-)
Would it be possible/makes sense to be able to tell to Javascript what's the current pathMTU? Maybe with the Stats API?
IMHO, application/javascript should be agnostic of the underlying PathMTU size.I
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
Chrome is not basing its MTU off of 1500 Ethernet MTU. It uses a much lower MTU that provides sufficient headroom in all real-world cases, including 4G/IPSec.The 1280 constant mentioned above is a sanity check to make sure we never emit a packet that would be fragmented.
Req. 9: The data channel transport protocol SHOULD avoid IP
fragmentation. It MUST support PMTU (Path MTU) discovery and MUST
NOT rely on ICMP or ICMPv6 being generated or being passed back,
especially for PMTU discovery.-Raju
IMHO, application/javascript should be agnostic of the underlying PathMTU size.I am not sure that this is realistic in all cases. Sometimes the payload is application-specific and "abstract" chunking is impossible. For example, encoded RTP/RTCP traffic is difficult to cut into pieces. The RTP traffic must be encoded for a specific payload size if you want any decent performance.
Agree. But the throughput gains from doing so are minimal, < 1%, so it's not the top priority.