the relationship b/w ATT MTU size and throughout speed

-

Is it better as the ATT MTU size is larger?

I am trying to do nus communication between nrf board 1 and board 2.
The data size I want to send is about 30 bytes. Previously, the att mtu size was set to 247 and the data length was set to 251.

Having consulted various websites, I know that increasing the att mtu size as much as possible is a way to increase the data transfer speed.
Although the data I send is much smaller than 247, is it effective to increase this value significantly?

In fact, if you decrease this value, the Bluetooth reception rate decreases.
I thought I could just adjust the max value of att mtu to the optimal value, but what is the reason for the slow speed?

  • Hello,

    Let me try to clear up a few things.

    If you want to have a lot of throughput, it is correct that you should set the MTU to 247. Longer packets mean a lower header/payload ratio, meaning a smaller part of your total radio time is used to send headers for packets. But note that sending long packets also increase the latency, so depending on what you mean by speed it is either faster or slower. 

    Also note that increasing the MTU to 247 doesn't mean you need to use it. You can still send packets of 30 bytes, and they will still be 30 bytes (not padded with 00's up to 247 bytes or something).

    If the throughput is too small for what you need, you should increase the MTU, and also increase the size of the packets you are sending, meaning you should combine multiple packets of 30 bytes (8*30 = 240 bytes), and send them as one packet. 

    Sending large packets will also increase the packet retransmission rate, because of a higher packet loss, because a longer packet has more bits that can flip and cause a CRC error. But the amount this will affect your link depends on the distance.

    But to summarize, increasing the MTU doesn't affect anything if you are still only sending packages of 30 bytes. If your throughput is too low, try increasing the packet length. If the latency is to high, you may want to decrease the connection interval. If your throughput is still too low after increasing the MTU, try increasing the connection interval, and make sure your tx queue is always full by queuing up as many packets as you can (API is different depending on whether you are using NCS or the nRF5 SDK). 

    And if I didn't answer your question, perhaps you can elaborate a bit more on the actual issue you are seeing.

    Best regards,

    Edvin

Related