I'm trying to import mget performance by rewrite it like this:
orig:
mget k1 k2 k3 k4 k5 k6 k7 k8 k9
after rewrite:
mget k1 k3 k6 mget k2 k4 mget k5 k7 k8 k9
the code is here:
https://github.com/twitter/twemproxy/pull/210
benchmark result:
mget_size=10 on 4001: pqs: 22831.05, rtime: 3 mget_size=10 on 4000: pqs: 36101.08, rtime: 1 => 1.5x mget_size=10 on 2000: pqs: 85470.09, rtime: 0 mget_size=100 on 4001: pqs: 1336.90, rtime: 45 mget_size=100 on 4000: pqs: 10526.32, rtime: 5 => 7.8x mget_size=100 on 2000: pqs: 27777.78, rtime: 2 mget_size=1000 on 4001: pqs: 58.89, rtime: 909 mget_size=1000 on 4000: pqs: 1063.83, rtime: 53 => 18x mget_size=1000 on 2000: pqs: 2777.78, rtime: 20 mget_size=10000 on 4001: pqs: 0.53, rtime: 3751 mget_size=10000 on 4000: pqs: 24.21, rtime: 48 => 45x mget_size=10000 on 2000: pqs: 256.41, rtime: 7
flame-graph before:
flame-graph after: