Mitigate "Not sending flow_control mgs, no receive window!" messages with DRBD RDMA transport.

This article will briefly explain and mitigate the, "Not sending flow_control mgs, no receive window!", messages you may see in your logs when using DRBD's RDMA transport module.

Unlike TCP, the Linux kernel cannot auto-tune buffer sizes for RDMA transports. DRBD by default uses the kernel's auto-tuning of snd/rcv buffers, so we need to manually set the size DRBD should use when communicating with it's peer to avoid these messages. To do so, configure the following options in the net stanza of your DRBD configuration:

net {
sndbuf-size 10M;
rcvbuf-size 10M;
max-buffers 4k;

rcvbuf-size is configured in bytes, while max_buffers is configured in pages. For optimal performance max_buffers should be big enough to hold all of rcvbuf-size and the amount of data that might be in flight to the backend device at any point in time. So, set max-buffers > 4000

Updated 2021/03/09 - DJV