Get the App
SLTechnology News&Howtos  ›  Servers  › 

Redis stress testing + multi-database operation

Shulou Source: shulou.com Published: 2022-06-02 20:00:51 10月31日 Update

■ redis-benchmark testing tool

-h: specify the server hostname

-p: specify the server port

-c: specify the number of concurrent connections

-n: specify the number of requests

-d: specifies the data size of the SET/ get value in bytes

-Q: mandatory launch of redis. Show only query/ secvalue

■ redis-benchmark testing tool

● sends 100 to the redis server with IP address 192.168.10.161 and port 6379

Test performance with 100000 requests and concurrent connections

/ usr/local/redis/bin/redis-benchmark-h 192.168.1.10-p 6379-c 100-n 100000

● tests the performance of packets with an access size of 100byte

/ usr/local/redis/bin/redis-benchmark-h 192.168.1.10-p 6379-Q-d 100

-- multiple database operations-

-multiple data switching

0-15 Redis has 16 databases by default, which are independent and do not interfere with each other.

Select 10 # switch to database 10

192.168.1.10 Virgo 6379 > move demo 2

(integer) 1

192.168.1.10 Virgo 6379 > select 2

OK

192.168.1.10 keys 6379 [2] >

1. "demo" # move the key demo to database 2

192.168.1.10 flushdb 6379 [2] > clear all data in the library

OK

Tags: Data database test server service size byte tool performance test tool port switch host address form access interference enforcement independence mobility Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info NVidia OPPO Reno vpn Microsoft