Skip to content

redis-benchmark generates too many requests when pipeline is used #2016

Closed

Description

@krzycz

When pipeline is used -P numreq (where numreq > 1), the number of generated requests may be actually higher than configured with -n requests and printed in benchmark report.

$ ./redis-benchmark -t set -n 100 -P 1
====== SET ======
  100 requests completed in 0.00 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

100.00% <= 0 milliseconds
50000.00 requests per second

$ ./redis-cli info stats
# Stats
total_connections_received:52
total_commands_processed:101
instantaneous_ops_per_sec:62
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0

Same test with pipeline enabled (after restarting the server):

$ ./redis-benchmark -t set -n 100 -P 10
====== SET ======
  100 requests completed in 0.00 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

100.00% <= 0 milliseconds
inf requests per second

$ ./redis-cli info stats
# Stats
total_connections_received:52
total_commands_processed:501
instantaneous_ops_per_sec:312
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0

Activity

  1. filipecosta90 commented on May 3, 2021

    @filipecosta90
    Contributor

    @krzycz closing this one given #7947 addresses it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions