MAVLink UART flow rate

Hi Everyone,
I am having some problem, while trying to get higher mavlink stream rates on serial connection.
I am using the baud rate of 921600 on the serial port. So theoretically the max data rate that can be achieved should be approx. 92 kbps. While starting the mavlink I have set data rate limit at 80000 B/s.
I can change the mavlink stream rate with the “mavlink stream” command. Note that for the testing I have disabled all the other uorb streams on the port except heartbeat, system status, command long and one custom mavlink msg. All the other mavlink streams except custom mavlink msg are sending data at 1Hz. So there almost no load on the port.
Now If I start streaming custom mavlink msg at 100 Hz I am getting data rate of ~6 kbps (checked by mavlink status). Works as it should be. Same way for 200 Hz ~12 kbps. Now the problem is at 300 Hz and all the higher rates the data rate is getting capped at around 17 kbps.
So, If anyone could point me in the direction, if I am doing something wrong or if it’s somehow hard coded in the px4 firmware then how to change it, I would be really thankful.

What’s the output of mavlink status? And are you using flow control? And have you tried raising the buffer sizes?

To increase buffer sizes for UARTs/USARTs e.g. for fmu-v3:

Hi Julian…Thanks for your reply.
Here is the output of mavlink status.(almost without any streams).
As you can see there is flow control is disabled.

About your suggestion, is it enough to just change the buffer size in the file?
Or do I have to compile nuttx config afterwards somehow.
Current setting are in the pic.

You need to find out which UART it is and then do a cleanbuild using make clean.

If I understand correctly, then after editing the defconfig, if for example I build with “make px4_fmu-v5_default” nuttx config will be recopiled with PX4 automatically.(without any extra building procedure)?!
I will post the result after I have tested mavlink with a larger buffer.

Update. Changing the TX buffer on the port did not make any difference. Communication still capped at about 17 kbps.
Any other ideas?