From 779440ef6064b2d1f2a5004bd92ae3660bc9b63a Mon Sep 17 00:00:00 2001 From: Zhijiang Hu Date: Thu, 4 May 2017 00:55:33 -0400 Subject: Increase PACKETS_PER_BUFFER to 65536 1) This mainly increase PACKETS_PER_BUFFER to 65536 to reduce the frequency of TCP client acks. 2) Also kills TCP_BUFF_SIZE and define each buffer size in a more intuitive way. 3) Free more unused memory to prevent being killed by oom-killer after enlarged PACKETS_PER_BUFFER. 4) Increase client's select() timeout to 20 secs, since we encountered timeout due to CPU busy in the same BM but with 20 VMs. Tested this PS in a 10 VM node env, and it can multicast a 2.7G file to 10 VMs in 6 minutes, while unicast needs 30+ minutes. Change-Id: Iaf862fb1f1259cc770f720ccdd95dcc281aef262 Signed-off-by: Zhijiang Hu --- code/jasmine/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'code/jasmine/client.c') diff --git a/code/jasmine/client.c b/code/jasmine/client.c index 20bd3585..4f51ab6e 100755 --- a/code/jasmine/client.c +++ b/code/jasmine/client.c @@ -107,7 +107,7 @@ void tcp_retransmition(int tcp_socket, { struct request_ctl *reqctl; uint32_t *reqbody; - uint8_t rqbuf[sizeof(struct request_ctl) + PACKETS_PER_BUFFER * sizeof(uint32_t)]; + uint8_t rqbuf[MAX_REQ_SIZE]; uint32_t l; reqctl = (struct request_ctl *)rqbuf; @@ -174,7 +174,7 @@ int recv_mcast(int tcp_socket, int udp_socket, do { FD_SET(tcp_socket, &rfds); FD_SET(udp_socket, &rfds); - tv.tv_sec = 5; + tv.tv_sec = 20; tv.tv_usec = 0; res = select(maxfd, &rfds, 0, 0, &tv); -- cgit 1.2.3-korg