This topic describes how to test storage-optimized instances of ApsaraDB for Redis Enhanced Edition (Tair).

Workloads

  • Data loading: 100% string set operations (write operations).
  • Uniform-Read: uses Workload A that consists of 100% random string get operations (read operations) to test read performance under harsh conditions.
  • Zipfian-Read: uses Workload C that adopts Zipfian as the data distribution method to test read performance in most scenarios in which most read requests are sent to access a small portion of data.
  • Uniform-50%Read-50%Update: uses Workload A that consists of 50% string set operations (update operations) and 50% string get operations to test the performance of random updates.

For more information about workloads, see Core Workloads.

Test scenarios

Test the performance of storage-optimized instances in the following scenarios:

  • Scenarios in which the memory size is larger than the data volume: Most data can be accessed in the memory. In these scenarios, the ratio of the memory size to the data volume is approximately 7:1.
  • Scenarios in which the data volume is larger than the memory size: Only part of the data is cached in the memory. Most access requests require read and write operations on hard disks. In these scenarios, the ratio of the memory size to the data volume is approximately 1:4.

Test commands

The following script is used to test performance in a scenario where the data volume is larger than the memory size:

#! /bin/bash

ip=192.168.0.23
port=3100
timeout=30000
command_group=string
recordcount=640000000
run_operationcount=20000000
fieldcount=1
fieldlength=100
threads=32
load_sleep_time=600
run_sleep_time=60

echo "##################################### $command_group  ############################################"
#Load
./bin/ycsb load redis -s -P workloads/workloada -p "redis.host=${ip}" -p  "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${recordcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -threads ${threads}
sleep ${load_sleep_time}

#Uniform-Read
./bin/ycsb run redis -s -P workloads/workloadc  -p "redis.host=${ip}" -p  "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${run_operationcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -p "requestdistribution=uniform" -threads ${threads}
sleep ${run_sleep_time}

#Zipfian-Read
./bin/ycsb run redis -s -P workloads/workloadc  -p "redis.host=${ip}" -p  "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${run_operationcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -p "requestdistribution=zipfian" -threads ${threads}
sleep ${run_sleep_time}

#Uniform-50%Read-50%Update
./bin/ycsb run redis -s -P workloads/workloada  -p "redis.host=${ip}" -p  "redis.port=${port}" -p "recordcount=${recordcount}" -p "operationcount=${run_operationcount}" -p "redis.timeout=${timeout}" -p "redis.command_group=${command_group}" -p "fieldcount=${fieldcount}" -p "fieldlength=${fieldlength}" -p "requestdistribution=uniform" -threads ${threads}
Table 1. Parameters
Parameter Description
ip The IP address of the ApsaraDB for Redis instance.
port The service port of the ApsaraDB for Redis instance.
timeout The timeout period of the test command.
command_group The type of data to be tested. Set this parameter to String.
recordcount The number of records that you want to load.
run_operationcount The number of operations to be performed on the workload. When you set this parameter, take note of the following rules:
  • In a scenario in which the memory size is larger than the data volume, set this parameter to the value of the recordcount parameter.
  • In a scenario in which the data volume is larger than the memory size, set this parameter to the value of the recordcount parameter divided by 32.
fieldcount The number of fields. Set this parameter to 1.
fieldlength The length of each field. Set this parameter to 100.
threads The number of YCSB threads. Set this parameter based on the instance type.