Skip to content

Commit 1edd6a1

Browse files
sowminivdavem330
authored andcommitted
RDS-TCP: Do not bloat sndbuf/rcvbuf in rds_tcp_tune
Using the value of RDS_TCP_DEFAULT_BUFSIZE (128K) clobbers efficient use of TSO because it inflates the size_goal that is computed in tcp_sendmsg/tcp_sendpage and skews packet latency, and the default values for these parameters actually results in significantly better performance. In request-response tests using rds-stress with a packet size of 100K with 16 threads (test parameters -q 100000 -a 256 -t16 -d16) between a single pair of IP addresses achieves a throughput of 6-8 Gbps. Without this patch, throughput maxes at 2-3 Gbps under equivalent conditions on these platforms. Signed-off-by: Sowmini Varadhan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3b20fc3 commit 1edd6a1

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

net/rds/tcp.c

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,13 @@ void rds_tcp_nonagle(struct socket *sock)
6767
set_fs(oldfs);
6868
}
6969

70+
/* All module specific customizations to the RDS-TCP socket should be done in
71+
* rds_tcp_tune() and applied after socket creation. In general these
72+
* customizations should be tunable via module_param()
73+
*/
7074
void rds_tcp_tune(struct socket *sock)
7175
{
72-
struct sock *sk = sock->sk;
73-
7476
rds_tcp_nonagle(sock);
75-
76-
/*
77-
* We're trying to saturate gigabit with the default,
78-
* see svc_sock_setbufsize().
79-
*/
80-
lock_sock(sk);
81-
sk->sk_sndbuf = RDS_TCP_DEFAULT_BUFSIZE;
82-
sk->sk_rcvbuf = RDS_TCP_DEFAULT_BUFSIZE;
83-
sk->sk_userlocks |= SOCK_SNDBUF_LOCK|SOCK_RCVBUF_LOCK;
84-
release_sock(sk);
8577
}
8678

8779
u32 rds_tcp_snd_nxt(struct rds_tcp_connection *tc)

0 commit comments

Comments
 (0)