Tuning multiple Connections for optimum throughput and latency

Hi,

we are currently in the process of optimizing our connections for better throughput. Use-case is connection based FruityMesh (https://github.com/mwaylabs/fruitymesh). For the current use-case, we want to optimize the mesh connections for optimum throughput but we still need low latency. We are only optimizing for nRF52 or upwards.

- Each node has up to 4 connections (1 peripheral, 3 central), other connections on demand e.g. to mobile devices but these are temporary and can be set up with a lower interval

- We should probably enable the 2 Mbit PHY

- Most messages are smaller than 20 byte, but there are some which are around 40-50 byte, so we would like to increase the MTU as our messag esplitting has some overhead. Does this have a negative impact if sending a lot of small messages? We probably have to enable Data length Extension (DLE) at the same time, right? Maybe enabling event length extension will also help as some nodes have 4, others less connections?

- We are mostly using WRITE_CMD and WRITE_REQ only for the handshake between two nodes.

- We probably want to keep our connectionInterval at 10ms as we want to have a low latency on networks with little traffic.

- The event length is still a little unclear to me. As far as I understand, it is the maximum event length that is going to be used for 1 connection. With a connectionInterval of 10ms and an event length of 2.5ms, I should have an equal part for all connections if I use 4 (The peripheral connection will however probably overlap the central ones). Can I simply chose a long event length of e.g. 7.5ms to allow a connection to send a lot of data if the other connections do not have a lot of data to send?

- What if I set up e.g. 4 central connections with a connection interval of 10ms and an event length of 5ms. Will the throughput be equally divided between the two overlapping connections? Or could it cause a lot of latency because e.g. I have set my connection timeout to 6 seconds. (According to the scheduling documentation of the Softdevice, the priority will change once "one connection is about to time out", not exactly sure what that means).

- My connections will be set up in a way so that 1 connection will need most of the throughput while the others will need less. But I only know that after the connections were set up, so I cannot directly specify that during the sd_ble_gap_connect call. What would be good parameters to set this up?

- I did some throughput measurements in the current state and having two devboards apart with an RSSI of -80 gave me about half the throughput than having them close to each other. Is this kind of deterioration expected? I have very little wifi/ble network interference from where I am working currently.

- Also, one last ting: This might be an implementation issue on our side, but I noticed that when testing with only two devices I sometimes get a high throughput after resetting, sometimes the throughput is less than half. Is there any good idea what might cause that, or am I just doing something wrong? Could that be because I also have a scanner and an advertiser running and the events are overlapping? Can I do anything to solve a situation like this, e.g. restarting scanning so that the event will occur after the connection role?

Thanks a lot,

Marius