Performing a Test
- The following operations must be performed in a new window, and the window for starting the etcd cluster cannot be closed.
- Change the IP addresses in the commands based on the actual situation.
- Open a new window and go to the benchmark installation path on the leader node.
cd /usr/local/etcd/tools/benchmark/bin
- Perform a write test on a single node by referring to the following command:
./benchmark - -endpoints=http://10.208.71.111:2379 --target-leader --conns=1 --clients=800 put --key-size=8 --sequential-keys --total=100000 --val-size=256
If the following information is displayed, the operation is successful:

- Perform a read test on a single node by referring to the following command:
./benchmark --endpoints="http://10.208.71.111:2379" --conns=1 --clients=1 range foo --consistency=l --total=50000

./benchmark --endpoints="http://10.208.71.111:2379" --conns=1 --clients=1 range foo --consistency=s --total=50000

- Perform a write test on multiple nodes by referring to the following command:
./benchmark --endpoints="http://10.208.71.111:2379,http://10.208.107.205:2379,http://10.208.72.182:2379" --target-leader --conns=1 --clients=1 put --key-size=8 --sequential-keys --total=50000 --val-size=256

- Perform a read test on multiple nodes by referring to the following command:
./benchmark --endpoints="http://10.208.71.111:2379,http://10.208.107.205:2379,http://10.208.72.182:2379" --conns=1 --clients=1 range foo --consistency=l --total=50000

./benchmark --endpoints="http://10.208.71.111:2379,http://10.208.107.205:2379,http://10.208.72.182:2379" --conns=1 --clients=1 range foo --consistency=s --total=50000

- In the single-node test commands, the IP address of the leader node is used. In the multi-node test commands, the IP addresses of nodes 1, 2, and 3 in the cluster are used.
- The command parameters are described as follows:
--val-size: value size
--conns: number of connections
--clients: number of clients
--total: number of keys
--consistency: consistency. The value l indicates linearizable, and s indicates serializable.
Parent topic: etcd Benchmark Test Guide