Skip to content

Implicit pipelining is slightly slower than not pipelining #147

@kimtree

Description

@kimtree

Hi guys, I still keep on my eyes on Radix project!

This issue came from the first time that I applied Radix in our production product. We noticed that our latency was slightly slower by 1~2 ms and we've got the hint from the pprof. We saw some of pipelining relative codes are showed up in profiling image.

I've tried a simple test with the latest commit and this is the result.

  • Common Option
    • Benchmark Machine CPU: 20 CPU
    • Redis version: 4.0.10 (3 shards * 2 nodes)
    • Pool Size: 20

Option 1) With implicit pipelining (no other options)

Benchmark/hkeys-40                 5000000             10041 ns/op             282 B/op          7 allocs/op

Option 2) Without implicit pipelining and add options

  • radix.PoolPipelineWindow(0, 0)
  • radix.PoolOnEmptyCreateAfter(0)
Benchmark/hkeys-40                 5000000              9079 ns/op             307 B/op          7 allocs/op

We're handling 25,000+ req/s in our production service, and I think 1000 ns difference can be affected our latency. Any ideas on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions