redis和pika都可以使用redis-benchmark工具进行基准测试和压力测试

  1. Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests]> [-k <boolean>]
  2. -h <hostname> Server hostname (default 127.0.0.1)
  3. -p <port> Server port (default 6379)
  4. -s <socket> Server socket (overrides host and port)
  5. -a <password> Password for Redis Auth
  6. -c <clients> Number of parallel connections (default 50)
  7. -n <requests> Total number of requests (default 100000)
  8. -d <size> Data size of SET/GET value in bytes (default 2)
  9. -dbnum <db> SELECT the specified db number (default 0)
  10. -k <boolean> 1=keep alive 0=reconnect (default 1)
  11. -r <keyspacelen> Use random keys for SET/GET/INCR, random values for SADD
  12. Using this option the benchmark will expand the string __rand_int__
  13. inside an argument with a 12 digits number in the specified range
  14. from 0 to keyspacelen-1. The substitution changes every time a command
  15. is executed. Default tests use this to hit random keys in the
  16. specified range.
  17. -P <numreq> Pipeline <numreq> requests. Default 1 (no pipeline).
  18. -q Quiet. Just show query/sec values
  19. --csv Output in CSV format
  20. -l Loop. Run the tests forever
  21. -t <tests> Only run the comma separated list of tests. The test
  22. names are the same as the ones produced as output.
  23. -I Idle mode. Just open N idle connections and wait.
  1. ./redis-benchmark -h host_ip -p port -a passwd -t set,get -n 3000000 -d 1000 -r 1000000000
  2. #-h host
  3. #-p port
  4. #-a password
  5. #-t commands for test
  6. #-n total command to send
  7. #-d data payload every command (byte)
  8. #-r total data

clickhouse

  1. clickhouse-benchmark --host=0 --port= --user=default --password= --concurrency=100 --iterations=100 --cumulative <<< "SELECT S_ADDRESS FROM lineorder_flat where C_ADDRESS='mLkZ1tAzXlHf1Ahbj1F';"