Skip to content

RDS: multiple connection paths for scaling

Sowmini Varadhan netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17RDS: split out connection specific state from rds_connection to rds_conn_pathnet/rds/cong.c net/rds/connection.c net/rds/ib.c +16 more+199 -930 replies
2/17RDS: add t_mp_capable bit to be set by MP capable transportsnet/rds/rds.h+6 -10 replies
3/17RDS: recv path gets the conn_path from rds_incoming for MP capable transportsnet/rds/rds.h net/rds/recv.c+9 -40 replies
4/17RDS: rds_inc_path_init() helper function for MP capable transportsnet/rds/rds.h net/rds/recv.c+16 -00 replies
5/17RDS: Add rds_send_path_reset()net/rds/send.c+22 -170 replies
6/17RDS: Add rds_send_path_drop_acked()net/rds/rds.h net/rds/send.c+15 -50 replies
7/17RDS: Remove stale function rds_send_get_message()net/rds/rds.h net/rds/send.c+0 -380 replies
8/17RDS: Make rds_send_queue_rm() rds_conn_path awarenet/rds/send.c+11 -60 replies
9/17RDS: Pass rds_conn_path to rds_send_xmit()net/rds/ib_cm.c net/rds/rds.h net/rds/send.c +1 more+87 -700 replies
10/17RDS: Extract rds_conn_path from i_conn_path in rds_send_drop_to() for MP-capable transportsnet/rds/send.c+8 -30 replies
11/17RDS: Make rds_send_pong() take a rds_conn_path argumentnet/rds/rds.h net/rds/recv.c net/rds/send.c+14 -140 replies
12/17RDS: Add rds_conn_path_connect_if_down() for MP-aware callersnet/rds/connection.c net/rds/rds.h net/rds/send.c+14 -80 replies
13/17RDS: update rds-info related functions to traverse multiple conn_pathsnet/rds/connection.c+82 -270 replies
14/17RDS: Add rds_conn_path_error()net/rds/connection.c net/rds/rds.h net/rds/threads.c+18 -10 replies
15/17RDS: Initialize all RDS_MPATH_WORKERS in __rds_conn_createnet/rds/connection.c+45 -200 replies
16/17RDS: Update rds_conn_shutdown to work with rds_conn_pathnet/rds/connection.c net/rds/rds.h net/rds/send.c +2 more+44 -380 replies
17/17RDS: Update rds_conn_destroy to be MP capablenet/rds/connection.c+39 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 00/17] RDS: multiple connection paths for scaling

Today RDS-over-TCP is implemented by demux-ing multiple PF_RDS sockets between any 2 endpoints (where endpoint == [IP address, port]) over a single TCP socket between the 2 IP addresses involved. This has the limitation that it ends up funneling multiple RDS flows over a single TCP flow, thus the rds/tcp connection is
(a) upper-bounded to the single-flow bandwidth,
(b) suffers from head-of-line blocking for the RDS sockets.

Better throughput (for a fixed small packet size, MTU) can be achieved by having multiple TCP/IP flows per rds/tcp connection, i.e., multipathed RDS (mprds). Each such TCP/IP flow constitutes a path for the rds/tcp connection. RDS sockets will be attached to a path based on some hash (e.g., of local address and RDS port number) and packets for that RDS socket will be sent over the attached path using TCP to segment/reassemble RDS datagrams on that path.

The table below, generated using a prototype that implements mprds, shows that this is significant for scaling to 40G. Packet sizes used were: 8K byte req, 256 byte resp. MTU: 1500. The parameters for RDS-concurrency used below are described in the rds-stress(1) man page- the number listed is proportional to the number of threads at which max throughput was attained.

-------------------------------------------------------------------
RDS-concurrency Num of tx+rx K/s (iops) throughput
(-t N -d N) TCP paths
-------------------------------------------------------------------
16 1 600K - 700K 4 Gbps
28 8 5000K - 6000K 32 Gbps
-------------------------------------------------------------------

FAQ: what is the relation between mprds and mptcp?
mprds is orthogonal to mptcp. Whereas mptcp creates sub-flows for a single TCP connection, mprds parallelizes tx/rx at the RDS layer. MPRDS with N paths will allow N datagrams to be sent in parallel; each path will continue to send one datagram at a time, with sender and receiver keeping track of the retransmit and dgram-assembly state based on the RDS header. If desired, mptcp can additionally be used to speed up each TCP path. That acceleration is orthogonal to the parallelization benefits of mprds.

This patch series lays down the foundational data-structures to support mprds in the kernel. It implements the changes to split up the rds_connection structure into a common (to all paths) part, and a per-path rds_conn_path. All I/O workqs are driven from the rds_conn_path.

Note that this patchset does not (yet) actually enable multipathing for any of the transports; all transports will continue to use a single path with the refactored data-structures. A subsequent patchset will add the changes to the rds-tcp module to actually use mprds in rds-tcp.

Sowmini Varadhan (17):
RDS: split out connection specific state from rds_connection to
rds_conn_path
RDS: add t_mp_capable bit to be set by MP capable transports
RDS: recv path gets the conn_path from rds_incoming for MP capable
transports
RDS: rds_inc_path_init() helper function for MP capable transports
RDS: Add rds_send_path_reset()
RDS: Add rds_send_path_drop_acked()
RDS: Remove stale function rds_send_get_message()
RDS: Make rds_send_queue_rm() rds_conn_path aware
RDS: Pass rds_conn_path to rds_send_xmit()
RDS: Extract rds_conn_path from i_conn_path in rds_send_drop_to() for
MP-capable transports
RDS: Make rds_send_pong() take a rds_conn_path argument
RDS: Add rds_conn_path_connect_if_down() for MP-aware callers
RDS: update rds-info related functions to traverse multiple
conn_paths
RDS: Add rds_conn_path_error()
RDS: Initialize all RDS_MPATH_WORKERS in __rds_conn_create
RDS: Update rds_conn_shutdown to work with rds_conn_path
RDS: Update rds_conn_destroy to be MP capable

 net/rds/cong.c            |    3 +-
 net/rds/connection.c      |  329 +++++++++++++++++++++++++++++++-------------
 net/rds/ib.c              |    1 +
 net/rds/ib_cm.c           |    3 +-
 net/rds/ib_rdma.c         |    1 +
 net/rds/ib_recv.c         |    1 +
 net/rds/ib_send.c         |    1 +
 net/rds/loop.c            |    1 +
 net/rds/rdma_transport.c  |    1 +
 net/rds/rds.h             |  152 ++++++++++++++-------
 net/rds/rds_single_path.h |   30 ++++
 net/rds/recv.c            |   27 +++-
 net/rds/send.c            |  293 ++++++++++++++++++++--------------------
 net/rds/tcp.c             |    3 +-
 net/rds/tcp_connect.c     |    4 +-
 net/rds/tcp_listen.c      |   11 +-
 net/rds/tcp_recv.c        |    1 +
 net/rds/tcp_send.c        |    1 +
 net/rds/threads.c         |   95 ++++++++------
 19 files changed, 611 insertions(+), 347 deletions(-)
 create mode 100644 net/rds/rds_single_path.h