Test Method
This section describes the performance test of GaussDB(for Mongo) replica set 4.0, including the test environment, procedures, and results.
Test Environment
- Region: CN North-Beijing4
- AZ: AZ1
- Elastic Cloud Server (ECS): s3.2xlarge.2 flavor with 8 vCPUs, 16 GB of memory, and CentOS 7.5 64 bit image.
- Replica set instance specifications: All instance specifications are tested. For details, see Table 1.
Test Tool
YCSB is an open-source database performance test tool. In this test, YCSB 0.12.0 is used.
For details on how to use this tool, see YCSB.
Test Metrics
Operations per Second (OPS): number of operations executed per second by a database
Test Procedure
- Configure the workload configuration file.
Set the values of readproportion, insertproportion, and updateproportion in the workload file by referring to Table 2.
Set the value of recordcount in the workload file by referring to Table 3.
- Use workload_s1 as an example. Run the following command to prepare test data:
./bin/ycsb load mongodb -s -P workloads/workload_s1 -p mongodb.url=mongodb://${userName}:${password}@${mongodIP}:${port},${mongodIP}:${port},${mongodIP}:${port}/ycsb?authSource=admin&replicaSet=replica&readPreference=secondary -threads ${threadNum} 1>workload_s1_load.result 2> workload_s1_load.log
- Use workload_s1 as an example. Run the following command to test the performance:
./bin/ycsb run mongodb -s -P workloads/workload_s1 -p mongodb.url=mongodb://${userName}:${password}@${mongodIP}:${port},${mongodIP}:${port},${mongodIP}:${port}/ycsb?authSource=admin&replicaSet=replica&readPreference=secondary -threads ${threadNum} -p maxexecutiontime=1800 1>workload_s1_run.result 2> workload_s1_run.log
- ${mongodIP} indicates the private IP addresses of the primary and secondary nodes in the GaussDB(for Mongo) replica set instance.
- ${password} is the administrator password of the GaussDB(for Mongo) replica set instance.
- ${threadNum} indicates the number of concurrent threads for running the test. In this test, the number of concurrent threads is 128.
Testing Models
- Workload model
- Number of concurrent threads: 128
- Document model
Use the default configuration of YCSB: The size of each document is 1 KB, and the default index is _id.
- Data volume to be prepared
In this test, prepare two types of data volume for each replica set instance.
For details, see the following table.
Table 3 Data volume to be prepared Replica Set ID
Instance Class
Low-Level Data Volume
High-Level Data Volume
Replica set 1
4 vCPUs | 16 GB
Storage space: 10 GB
RecordCount: 10000000
Storage space: 100 GB
Record counts: 100,000,000
Replica set 2
8 vCPUs | 32 GB
Storage space: 10 GB
RecordCount: 10000000
Storage space: 100 GB
Record counts: 100,000,000
Replica set 3
16 vCPUs | 64 GB
Storage space: 10 GB
RecordCount: 10000000
Storage space: 100 GB
Record counts: 100,000,000
Replica set 4
32 vCPUs | 128 GB
Storage space: 10 GB
RecordCount: 10000000
Storage space: 100 GB
Record counts: 100,000,000
Last Article: Replica Set
Next Article: Test Data
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.