Open siddontang opened 6 years ago
I introduce a new gRPC m_raft which sends the Raft messages in batch, the performance looks good with YCSB:
The first one is without batch, others are with batch but with different grpc-raft-conn-num, as we can see, the performance increased nearly about 20%. (we should find a proper value for grpc-raft-conn-num)
To my surprised, the I/O util also reduces
Looks good! But why the IO util also reduced?
I wrote a simple test for gRPC - send 10 msgs with buffer hint and send one msg which contains 10 msgs in batch.
The proto is:
The server implementation is very easy - receive all messages and reply one Done msg. The client looks:
Then I use
num = 100000
for test and get the result:As you can see, using batch can reduce the total time too much, maybe 5 times shorter. So I think it has a big benefit to send msgs in batch, especially for TiKV <-> TiKV.
But we also need to do a benchmark for it, and we must also consider backward compatibility.