PikaLabs/floyd

improve floyd performance

baotiao opened this issue · 1 comments

I have wrote a simple test to get the performance of floyd

write 10000 cost time microsecond(us) 8136502, qps 1229
      Node           | Role    |   Term    | CommitIdx |    Leader         |  VoteFor          | LastLogTerm | LastLogIdx | LastApplyIdx |
      127.0.0.1:8901      leader          2      10000       127.0.0.1:8901         127.0.0.1:8901            2      10000      10000
      127.0.0.1:8902    follower          2      10000       127.0.0.1:8901         127.0.0.1:8901            2      10000      10000
      127.0.0.1:8903    follower          2      10000       127.0.0.1:8901         127.0.0.1:8901            2      10000      10000
      127.0.0.1:8904    follower          2      10000       127.0.0.1:8901         127.0.0.1:8901            2      10000      10000
      127.0.0.1:8905    follower          2      10000       127.0.0.1:8901         127.0.0.1:8901            2      10000      10000

write 10000 cost time microsecond(us) 8325906, qps 1201
      Node           | Role    |   Term    | CommitIdx |    Leader         |  VoteFor          | LastLogTerm | LastLogIdx | LastApplyIdx |
      127.0.0.1:8901      leader          2      20000       127.0.0.1:8901         127.0.0.1:8901            2      20000      20000
      127.0.0.1:8902    follower          2      20000       127.0.0.1:8901         127.0.0.1:8901            2      20000      20000
      127.0.0.1:8903    follower          2      20000       127.0.0.1:8901         127.0.0.1:8901            2      20000      20000
      127.0.0.1:8904    follower          2      20000       127.0.0.1:8901         127.0.0.1:8901            2      20000      20000
      127.0.0.1:8905    follower          2      20000       127.0.0.1:8901         127.0.0.1:8901            2      20000      20000

it's qps is about 1000+, it is to low, so we had better to improve it

right now, it's qps is about 1.2w. However, it still has very large room for improving.