Test Method

This section describes the performance test of GaussDB(for Mongo) cluster 3.4, 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.
  • Each DB instance includes two shards.
  • For details about all the DB instance classes, see Table 1.
    Table 1 Cluster instance class

    Cluster ID

    shard Class

    Cluster 1

    4 vCPUs | 16 GB

    Cluster 2

    8 vCPUs | 32 GB

    Cluster 3

    16 vCPUs | 64 GB

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

  1. 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 4.

  2. 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}@${mongosIP}:${port}/ycsb?authSource=admin -threads ${threadNum} 1>workload_s1_load.result 2> workload_s1_load.log

  3. 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}@${mongosIP}:${port}/ycsb?authSource=admin -threads ${threadNum} -p maxexecutiontime=1800 1>workload_s1_run.result 2> workload_s1_run.log

Testing Models

  • Workload model
    Table 2 Service model

    No.

    Service Model

    S1

    100% insert

    S2

    90% update ,10% read

    S3

    65% read ,25% insert, 10% update

    S4

    90% read ,5% insert, 5% update

    S5

    50% update, 50% read

    S6

    100% read

    S7

    95% read, 5% update

    S8

    10% read, 90% insert

    S9

    5% read, 95% update

  • Number of concurrent threads
    Table 3 Number of concurrent threads

    shard Class

    Concurrent Threads of the Client

    4 vCPUs | 16 GB

    32

    8 vCPUs | 32 GB

    64

    16 vCPUs | 64 GB

    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 cluster instance.

    For details, see the following table.

    Table 4 Data volume to be prepared

    Cluster ID

    shard Class

    Low-Level Data Volume

    High-Level Data Volume

    Cluster 1

    4 vCPUs | 16 GB

    Storage space: 200 GB

    Record counts: 200,000,000

    Storage space: 1000 GB

    Record counts: 1,000,000,000

    Cluster 2

    8 vCPUs | 32 GB

    Storage space: 400 GB

    Record counts: 400,000,000

    Storage space: 2000 GB

    Record counts: 2,000,000,000

    Cluster 3

    16 vCPUs | 64 GB

    Storage space: 800 GB

    Record counts: 800,000,000

    Storage space: 4000 GB

    Record counts: 4,000,000,000

  • Data consistency model

    This test involves the following data consistency models:

    • Weak consistency: For the write concern setting of {w: 1, j: false}, an acknowledgment is returned after data is written to the disk on a single node. Data is persisted on disks in asynchronous mode with the default write concern setting.
    • Strong consistency: For the write concern setting of {w: 3, j: true}, no acknowledgment is returned until data is written to disks on the three nodes.