Updated on 2023-12-07 GMT+08:00

Test Method

This section describes the performance test of general-purpose and enhanced II DB instances of DDS Community Edition 3.4, 4.0, 4.2, and 4.4, including the test environment and procedure.

The following uses the cluster and replica set instances as an example.

Test Environment

  • Region: AP-Singapore
  • AZ: AZ1
  • Elastic Cloud Server (ECS):
    • For a general-purpose DB instance, select an ECS with s3.2xlarge.2 flavor with 8 vCPUs, 16 GB of memory, and CentOS7.5 64 bit image.
    • For an enhanced II DB instance, select an ECS with c3.2xlarge.2 flavor with 8 vCPUs, 16 GB of memory, and CentOS 7.6 x86_64 bit image.
  • DB instances to be tested:
    • The cluster instance has two mongos nodes and two shard nodes, and the storage space is 600 GB.
    • The replica set instance has three nodes, and the storage space is 600 GB.

Test Tool

YCSB is an open-source database performance test tool. In this test, YCSB 0.17.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. Use YCSB to run the following command to load the test data:

    ./bin/ycsb load mongodb -s -p workload=site.ycsb.workloads.CoreWorkload -p recordcount=${recordcount} -p mongodb.url="mongodb://${userName}:${password}@${mongosIP}:${port}/ycsb?authSource=admin" -threads ${threadNum}

    • recordcount=${recordcount} indicates the total amount of data loaded to the DDS instance.
    • mongodb.url="mongodb://${userName}:${password}@${mongosIP}:${port}/ycsb?authSource=admin" indicates the HA connection address of the DDS instance.
    • threads ${threadNum} indicates the number of concurrent threads on the client.
  2. Use YCSB to run the following command to test the performance:
    ./bin/ycsb run mongodb -s -p workload=site.ycsb.workloads.CoreWorkload -p recordcount=${recordcount} -p operationcount=${operationcount} -p insertproportion=0 -p readproportion=1 -p updateproportion=0 -p requestdistribution=zipfian -p mongodb.url="mongodb://${userName}:${password}@${mongosIP}:${port}/ycsb?authSource=admin" -threads ${threadNum}
    • recordcount=${recordcount} indicates the total amount of data loaded to the DDS instance.
    • operationcount=${operationcount} indicates the total number of read/write operations.
    • insertproportion=0 indicates the proportion of data loading operations.
    • readproportion=1 indicates the proportion of read operations.
    • updateproportion=0indicates the proportion of update operations.
    • mongodb.url="mongodb://${userName}:${password}@${mongosIP}:${port}/ycsb?authSource=admin" indicates the HA connection address of the DDS instance.
    • threads ${threadNum} indicates the number of concurrent threads on the client.
    • The values of recordcount and operationcount are the same.
    • The sum of the values of insertproportion, readproportion, and updateproportion is 1.

Testing Models

  • Service model
    Table 1 Service model

    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

    5% read ,95% update

    S9

    100% update

  • 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 2 Data volume to be prepared

    Specifications

    Low-Level Data Volume

    High-Level Data Volume

    Number of Concurrent Threads

    1 vCPUs | 4 GB

    Records: 1,000,000

    Records: 10,000,000

    100

    2 vCPUs | 4 GB

    Records: 1,000,000

    Records: 10,000,000

    100

    2 vCPUs | 8 GB

    Records: 2,000,000

    Records: 20,000,000

    100

    2 vCPUs | 16 GB

    Records: 4,000,000

    Records: 40,000,000

    100

    4 vCPUs | 8 GB

    Records: 2,000,000

    Records: 20,000,000

    100

    4 vCPUs | 16 GB

    Records: 4,000,000

    Records: 40,000,000

    100

    4 vCPUs | 32 GB

    Records: 10,000,000

    Records: 100,000,000

    100

    8 vCPUs | 16 GB

    Records: 4,000,000

    Records: 40,000,000

    100

    8 vCPUs | 32 GB

    Records: 10,000,000

    Records: 100,000,000

    100

    8 vCPUs | 64 GB

    Records: 10,000,000

    Records: 100,000,000

    100

    16 vCPUs | 32 GB

    Records: 10,000,000

    Records: 100,000,000

    100

    16 vCPUs | 64 GB

    Records: 10,000,000

    Records: 100,000,000

    100

    16 vCPUs | 128 GB

    Records: 10,000,000

    Records: 100,000,000

    100

    32 vCPUs | 64 GB

    Records: 10,000,000

    Records: 100,000,000

    200

    32 vCPUs | 128 GB

    Records: 10,000,000

    Records: 100,000,000

    200

    64 vCPUs | 256 GB

    Records: 10,000,000

    Records: 100,000,000

    400

  • Data consistency model

    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.