I've just added a 4th Peripheral-role link to my project, and the RAM requirement for the SoftDevice increased by over 3kB. I'm trying to figure out whether I can reduce this.
I'm using s132 v5.1.0. Section 14.3 of the SD Spec gives role configuration (as well as the number) as one of the factors determining SD RAM usage, and points to Section 10.4. This section says "The size of the memory pool for a connection is determined by the ATT MTU and the event length (duration) of the connection."
So, I adjusted the NRF_SDH_BLE_GATT_MAX_MTU_SIZE down a couple of times, and for every byte, the SD required >40 fewer (10 per connection?) bytes! Why such a huge change?
I also tried adjusting the NRF_SDH_BLE_GAP_EVENT_LENGTH, but that didn't seem to do anything. Why not?
I'm measuring RAM requirement by observing the argument of sd_ble_enable() after each build-load-run.