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/buffer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'code/jasmine/buffer.h') diff --git a/code/jasmine/buffer.h b/code/jasmine/buffer.h index e899fe62..c0b527e3 100755 --- a/code/jasmine/buffer.h +++ b/code/jasmine/buffer.h @@ -21,7 +21,7 @@ /* Exclude padding */ #define PACKET_PAYLOAD_SIZE (((PACKET_SIZE) - sizeof(struct packet_ctl)) & ~0x3) -#define PACKETS_PER_BUFFER 1024 +#define PACKETS_PER_BUFFER 65536 #define DEF_PORT 18383 /* for both UDP and TCP */ @@ -51,6 +51,9 @@ struct request_ctl { uint32_t req_count; /* Requested packet slot count */ }; +#define MAX_REQ_SIZE (sizeof(struct request_ctl) + \ + PACKETS_PER_BUFFER * sizeof(uint32_t)) + extern struct buffer_ctl buffctl; extern struct packet_ctl *packetctl[PACKETS_PER_BUFFER]; -- cgit 1.2.3-korg