valkey-io / libvalkey

Valkey client library in C
Other
12 stars 4 forks source link

Introduce RDMA transport (experimental) #55

Closed pizhenwei closed 2 months ago

pizhenwei commented 2 months ago

Hi,

Valkey Over RDMA has been supported as experimental feature since Valkey 8.0. Support RDMA transport for the client side.

There are commits in this PR:

These commits are already in order, they have separate function with detailed commit message, so no need to squash them into one.

pizhenwei commented 2 months ago

This is awesome. I've never used RDMA before so I plan on getting this building locally and playing around with it locally.

Hi,

If there is already a physical RDMA interface on your platform, build this branch and run command VALKEY_RDMA_MODULE=/path/to/valkey-rdma.so VALKEY_RDMA_ADDR=192.168.122.1 TEST_RDMA=1 ./test.sh.

There is also a benchmark guide in Redis style, I'll create valkey style once this repo gets ready. Enjoy the 2.5x performance!

It's also possible to setup a virtual RoCE device by command rdma link add rxe0 type rxe netdev $IFACENAME, or use this script to make it easy.

michael-grunder commented 2 months ago

cc @bjosv @zuiderkwast Does Anybody want to take a look before we merge. Unfortunately, I haven't been able to get SoftRoCE working at all, but have an RDMA-enabled NIC coming soon.

pizhenwei commented 2 months ago

This was new to me, but seems like a good feature! Found some nits, and then I'll guess we need to add something to CI. Maybe the plan was do do that after there is a (pre-)release of valkey with the feature?

Sure, RDMA CI is in the plan.

The RDMA support is a module (shared library) of valkey-8.0:

There is a simple RDMA client in valkey, and valkey runs RDMA CI test.

And all the suggestions are appled, thanks!

pizhenwei commented 2 months ago

Hi @bjosv @michael-grunder

This PR requests no squash, if force squash is needed, please let me know.