Many thanks for reaching out to the Mellanox Community.
Unfortunately, the ConnectX-2 adapters you have are EOL/EOS for a while now. Even though the firmware you are running is the latest available, the current versions of the driver do not support the ConnectX-2 adapter anymore.
Also we notice, that you are running on an AMD Ryzen platform, which we do not test. The only AMD platform we test and certify the driver and adapters for is the EPYC platform.
Never the less, you can try if applying the recommendation from the following community post, improves the performance. The link is https://community.mellanox.com/docs/DOC-3086
Our recommendation is to try to get your hands on a pair of ConnectX-3 adapters which are fully supported with our current drivers.
Many Thanks and regards,
~Mellanox Technical Support