dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Pipeline performance inversely proportional to number of threads

Open dranikpg opened this issue 2 years ago • 2 comments

Pipeline with many threads becomes really slow. 5M entries take:

  • 1+s on 1 thread
  • 4s on 4 threads
  • 7s on 8 threads 💀

For comparison:

  • Redis takes ~1 s
  • MULTI/EXEC with squashing takes about ~1s (a little less)

While the new sqashing is the fastest of them all, it requries all the commands to be in memory ahead. Non-atomic squashing doesn't require it - but makes locking more difficult.

dranikpg avatar Apr 18 '23 09:04 dranikpg

My only suggestion would be squashing without a carrier & stub transaction - i.e. just sharding and spreading the load over threads and doing a full dispatch each time.

If #1036 is fixed, inline scheduling would also greatly improve performance here.

dranikpg avatar Apr 18 '23 09:04 dranikpg

Can we close this @dranikpg ?

romange avatar Aug 26 '23 02:08 romange