All Products
Search
Document Center

ApsaraDB for MongoDB:Performance white paper

Last Updated:Jun 03, 2026

YCSB benchmark results for ApsaraDB for MongoDB across physical server and cloud disk architectures, covering multiple instance specifications and read/write ratios.

Test environment

Parameter

ECS for stress testing

ApsaraDB for MongoDB (Physical Server)

ApsaraDB for MongoDB (Cloud Disk)

Region and zone

China (Hangzhou) Zone H

China (Hangzhou) Zone H

China (Hangzhou) Zone H

Network type

VPC

VPC

VPC

Instance family

c6e (Compute-optimized, enhanced performance)

General-purpose and dedicated

Dedicated

Instance type

ecs.c6e.2xlarge (8 cores, 16 GB)

Test results

Test results

Storage type

PL1 ESSD cloud disk

Local SSD

PL1 ESSD cloud disk

Storage space

-

500 GB

500 GB

Topology

-

Standard three-node replica set (one primary, one secondary, and one hidden node)

Standard three-node replica set (one primary, one secondary, and one hidden node)

Image version

Alibaba Cloud Linux 3.2104 LTS 64-bit

3.10.0-327.ali2017.alios7.x86_64

4.19.81-17.2.al7.x86_64

Instance kernel version

-

MongoDB 4.2 (baseline minor version 4.2.13)

MongoDB 4.4 (baseline minor version 4.4.1)

Consistency configuration

-

Default read/write concern

Default read/write concern

Note

The ECS and ApsaraDB for MongoDB instances are in the same region and zone. Round-trip time (RTT): approximately 0.104 ms.

Test tool

This test uses YCSB 0.17.0 for benchmarking.

Note

YCSB is a Java-based benchmarking tool for multiple databases.

Test procedure

  1. Add the primary private IP address of the ECS instance to the ApsaraDB for MongoDB whitelist. Modify a whitelist.

    Note

    You can log on to the ECS console and view the primary private IP address of the ECS instance in the Network Information section of the Instance Details page.

  2. Connect to the ECS instance. Connect to an ECS instance.

  3. Load test data using the YCSB tool.

    ./bin/ycsb load mongodb -s -p workload=site.ycsb.workloads.CoreWorkload -p recordcount=1000000 -p mongodb.url="mongodb://test:****@dds-bp13e84d11****.mongodb.rds.aliyuncs.com:3717/admin" -threads 8

    Modify the following parameters:

    • recordcount=1000000: The total number of records to load into the ApsaraDB for MongoDB instance.

    • mongodb.url="mongodb://test:****@dds-bp13e84d11****.mongodb.rds.aliyuncs.com:3717/admin": The endpoint of the ApsaraDB for MongoDB instance. In this example, the database account is test and the database is admin.

      Note

      You can log on to the ApsaraDB for MongoDB console and view the endpoint in the Private Connection - VPC section on the Database Connection page.

    • threads 8: The number of concurrent threads for the client.

  4. Run the following command to perform stress testing.

    ./bin/ycsb run mongodb -s -p workload=site.ycsb.workloads.CoreWorkload -p recordcount=1000000 -p operationcount=5000000 -p insertproportion=0 -p readproportion=50 -p updateproportion=50 -p requestdistribution=zipfian -p mongodb.url="mongodb://test:****@dds-bp13e84d11****.mongodb.rds.aliyuncs.com:3717/admin" -threads 8

    Modify the following parameters:

    • recordcount=1000000: The total number of data records loaded to the ApsaraDB for MongoDB instance.

    • operationcount=5000000: The number of read and write operations to perform.

    • insertproportion=0: The proportion of insert operations.

    • readproportion=50: The proportion of read operations.

    • updateproportion=50: The proportion of update operations.

    • mongodb.url="mongodb://test:****@dds-bp13e84d11****.mongodb.rds.aliyuncs.com:3717/admin": The endpoint of the ApsaraDB for MongoDB instance. In this example, the database account is test and the database is admin.

      Note

      You can log on to the ApsaraDB for MongoDB console and then view instance endpoints in the Internal Connections - VPC section of the Database Connections page.

    • threads 8: The number of concurrent threads on the client.

Test results

Scenarios

  • r:w=100:0: 100% read, 0% write.

  • r:w=95:5: 95% read, 5% write.

  • r:w=50:50: 50% read, 50% write.

  • r:w=5:95: 5% read, 95% write.

  • r:w=0:100: 0% read, 100% write.

Parameters

  • recordcount: Total records loaded into the ApsaraDB for MongoDB instance.

  • operationcount: Total read and write operations.

  • threads: Concurrent client threads.

  • throughput: Operations per second (OPS).

  • RAL: Average read latency in microseconds (us).

  • WAL: Average write latency in microseconds (us).

Note

If RAL or WAL is 0, no read or write operation is performed.

The following tables and charts compare physical server and cloud disk architectures at various read/write ratios.

Physical server instance (MongoDB 4.2)

Load test data

CPU/Memory

Instance specification

Recordcount

Threads

Throughput

RAL

WAL

1:2

1 core, 2 GB (general-purpose)

1000000

4

3589

0

1110

2 cores, 4 GB (general-purpose)

2000000

8

7629

0

521

4 cores, 8 GB (general-purpose)

4000000

16

24300

0

654

8 cores, 16 GB (general-purpose)

8000000

32

26745

0

1191

1:4

8 cores, 32 GB (general-purpose)

16000000

32

29090

0

1095

16 cores, 64 GB (general-purpose)

32000000

128

41098

0

3033

1:8

2 cores, 16 GB (dedicated)

8000000

8

6553

0

1217

4 cores, 32 GB (dedicated)

16000000

16

14526

0

1097

8 cores, 64 GB (dedicated)

32000000

32

35437

0

899

16 cores, 128 GB (dedicated)

64000000

160

60078

0

2658

r:w=100:0

CPU:memory

Instance specification

Operation count

Threads

Throughput

RAL

WAL

1:2

1 core, 2 GB (general-purpose)

1,000,000

4

6,387

623

0

2 cores, 4 GB (general-purpose)

2,000,000

8

12,893

616

0

4 cores, 8 GB (general-purpose)

4,000,000

16

37,016

427

0

8 cores, 16 GB (general-purpose)

8,000,000

32

48,014

658

0

1:4

8 cores, 32 GB (general-purpose)

16,000,000

32

44,251

1,589

0

16 cores, 64 GB (general-purpose)

32,000,000

128

57,252

2,226

0

1:8

2 cores, 16 GB (dedicated)

8,000,000

8

12,436

641

0

4 cores, 32 GB (dedicated)

16,000,000

16

20,551

773

0

8 cores, 64 GB (dedicated)

32,000,000

32

50,246

632

0

16 cores, 128 GB (dedicated)

64,000,000

160

66,876

2,385

0

r:w=95:5

CPU:Memory

Instance type

Operationcount

Threads

Throughput

RAL

WAL

1:2

1 core, 2 GB (general-purpose)

1000000

4

4556

864

1079

2 cores, 4 GB (general-purpose)

2000000

8

10391

757

914

4 cores, 8 GB (general-purpose)

4000000

16

34411

453

561

8 cores, 16 GB (general-purpose)

8000000

32

41095

763

925

1:4

8 cores, 32 GB (general-purpose)

16000000

32

39920

785

926

16 cores, 64 GB (general-purpose)

32000000

128

55148

2305

2381

1:8

2 cores, 16 GB (dedicated)

8000000

8

8869

871

1394

4 cores, 32 GB (dedicated)

16000000

16

18206

856

1192

8 cores, 64 GB (dedicated)

32000000

32

47111

664

861

16 cores, 128 GB (dedicated)

64000000

160

68801

2312

2449

r:w=50:50

CPU:Memory

Instance type

Operationcount

Threads

Throughput

RAL

WAL

1:2

1 core, 2 GB (general-purpose)

1000000

4

3062

1207

1399

2 cores, 4 GB (general-purpose)

2000000

8

6610

1128

1318

4 cores, 8 GB (general-purpose)

4000000

16

19743

743

864

8 cores, 16 GB (general-purpose)

8000000

32

22750

987

1809

1:4

8 cores, 32 GB (general-purpose)

16000000

32

21763

1010

1907

16 cores, 64 GB (general-purpose)

32000000

128

43498

2162

3696

1:8

2 cores, 16 GB (dedicated)

8000000

8

5680

1345

1930

4 cores, 32 GB (dedicated)

16000000

16

10470

1064

1971

8 cores, 64 GB (dedicated)

32000000

32

20427

790

2329

16 cores, 128 GB (dedicated)

64000000

160

29445

2944

7891

r:w=5:95

CPU:Memory

Instance specification

Operation count

Threads

Throughput

RAL

WAL

1:2

1 core, 2 GB (general-purpose)

1000000

4

2431

1511

1649

2 cores, 4 GB (general-purpose)

2000000

8

5336

1406

1608

4 cores, 8 GB (general-purpose)

4000000

16

14496

858

1110

8 cores, 16 GB (general-purpose)

8000000

32

14573

958

2253

1:4

8 cores, 32 GB (general-purpose)

16000000

32

13812

995

2377

16 cores, 64 GB (general-purpose)

32000000

128

20663

2831

6348

1:8

2 cores, 16 GB (dedicated)

8000000

8

4079

3201

8066

4 cores, 32 GB (dedicated)

16000000

16

7154

1080

2288

8 cores, 64 GB (dedicated)

32000000

32

12585

783

2626

16 cores, 128 GB (dedicated)

64000000

160

17083

4241

9615

100% write workload

CPU:Memory

Instance specification

Operation count

Threads

Throughput

RAL

WAL

1:2

1 core, 2 GB (general-purpose)

1,000,000

4

2,429

0

1,642

2 cores, 4 GB (general-purpose)

2,000,000

8

5,238

0

1,643

4 cores, 8 GB (general-purpose)

4,000,000

16

13,794

0

1,154

8 cores, 16 GB (general-purpose)

8,000,000

32

14,566

0

2,189

1:4

8 cores, 32 GB (general-purpose)

16,000,000

32

13,485

0

2,361

16 cores, 64 GB (general-purpose)

32,000,000

128

19,758

0

6,461

1:8

2 cores, 16 GB (dedicated)

8,000,000

8

3,939

0

8,097

4 cores, 32 GB (dedicated)

16,000,000

16

6,940

0

2,298

8 cores, 64 GB (dedicated)

32,000,000

32

12,567

0

2,539

16 cores, 128 GB (dedicated)

64,000,000

160

16,325

0

9,770

Cloud disk architecture instance (MongoDB 4.4)

Data load performance

CPU:memory

Instance specification

Recordcount

Threads

Throughput

RAL

WAL

1:2

4 cores, 8 GB (dedicated)

4000000

16

18235

0

871

8 cores, 16 GB (dedicated)

8000000

32

35643

0

891

16 cores, 32 GB (dedicated)

16000000

64

65345

0

971

1:4

2 cores, 8 GB (dedicated)

4000000

8

6613

0

1202

8 cores, 32 GB (dedicated)

16000000

64

45952

0

1385

16 cores, 64 GB (dedicated)

32000000

96

61973

0

1539

1:8

2 cores, 16 GB (dedicated)

8000000

8

6224

0

1280

4 cores, 32 GB (dedicated)

16000000

16

18603

0

857

r:w=100:0

CPU:memory

Instance specification

Operationcount

Threads

Throughput

RAL

WAL

1:2

4 cores, 8 GB (dedicated)

4000000

16

24945

634

0

8 cores, 16 GB (dedicated)

8000000

32

33270

938

0

16 cores, 32 GB (dedicated)

16000000

64

55703

1136

0

1:4

2 cores, 8 GB (dedicated)

4000000

8

10989

723

0

8 cores, 32 GB (dedicated)

16000000

64

36039

1740

0

16 cores, 64 GB (dedicated)

32000000

96

59960

1585

0

1:8

2 cores, 16 GB (dedicated)

8000000

8

11298

703

0

4 cores, 32 GB (dedicated)

16000000

16

24306

653

0

r:w=95:5

CPU:memory

Instance specification

Operationcount

Threads

Throughput

RAL

WAL

1:2

4 cores, 8 GB (dedicated)

4000000

16

22471

797

1161

8 cores, 16 GB (dedicated)

8000000

32

29543

1064

1199

16 cores, 32 GB (dedicated)

16000000

64

53466

1178

1300

1:4

2 cores, 8 GB (dedicated)

4000000

8

8986

854

1480

8 cores, 32 GB (dedicated)

16000000

64

34128

1829

1970

16 cores, 64 GB (dedicated)

32000000

96

78363

1196

1420

1:8

2 cores, 16 GB (dedicated)

8000000

8

8806

867

1619

4 cores, 32 GB (dedicated)

16000000

16

20132

770

1181

r:w=50:50

CPU:memory

Instance specification

Operationcount

Threads

Throughput

RAL

WAL

1:2

4 cores, 8 GB (dedicated)

4000000

16

14127

1009

1238

8 cores, 16 GB (dedicated)

8000000

32

19887

1496

1670

16 cores, 32 GB (dedicated)

16000000

64

23120

2680

2819

1:4

2 cores, 8 GB (dedicated)

4000000

8

5132

1370

1735

8 cores, 32 GB (dedicated)

16000000

64

18929

2930

3615

16 cores, 64 GB (dedicated)

32000000

96

25612

3675

4363

1:8

2 cores, 16 GB (dedicated)

8000000

8

4841

1438

1855

4 cores, 32 GB (dedicated)

16000000

16

13051

1080

1356

r:w=5:95

CPU:memory

Instance specification

Operationcount

Threads

Throughput

RAL

WAL

1:2

4 cores, 8 GB (dedicated)

4000000

16

10266

1141

1570

8 cores, 16 GB (dedicated)

8000000

32

13556

2141

2351

16 cores, 32 GB (dedicated)

16000000

64

14447

4295

4412

1:4

2 cores, 8 GB (dedicated)

4000000

8

4226

1591

1902

8 cores, 32 GB (dedicated)

16000000

64

12055

5109

5210

16 cores, 64 GB (dedicated)

32000000

96

15216

5877

8503

1:8

2 cores, 16 GB (dedicated)

8000000

8

3874

1792

2072

4 cores, 32 GB (dedicated)

16000000

16

10083

1106

1605

r:w=0:100

CPU:memory

Instance specification

Operationcount

Threads

Throughput

RAL

WAL

1:2

4 cores, 8 GB (dedicated)

4000000

16

9960

0

1592

8 cores, 16 GB (dedicated)

8000000

32

13064

0

2423

16 cores, 32 GB (dedicated)

16000000

64

13743

0

4615

1:4

2 cores, 8 GB (dedicated)

4000000

8

4287

0

1860

8 cores, 32 GB (dedicated)

16000000

64

11611

0

5441

16 cores, 64 GB (dedicated)

32000000

96

14391

0

8746

1:8

2 cores, 16 GB (dedicated)

8000000

8

3854

0

2067

4 cores, 32 GB (dedicated)

16000000

16

9711

0

1638

Performance comparison

CPU:memory=1:2

  • Instance type: 4 cores, 8 GB memory4 cores 8 GB benchmark data

  • Instance type: 8 cores, 16 GB memory8 cores 16 GB benchmark data

CPU:memory=1:4

  • Instance type: 8 cores, 32 GB memory8 cores 32 GB benchmark data

  • Instance type: 16 cores, 64 GB memory16 cores 64 GB benchmark data

CPU:memory=1:8

  • Instance type: 2 cores, 16 GB memory2 cores 16 GB benchmark data

  • Instance type: 4 cores, 32 GB memory4 cores 32 GB benchmark data

Test result analysis

  • For CPU:Memory=1:2, physical servers outperform cloud disk by 7%-50%, most notably at 4 cores, 8 GB.

  • For CPU:Memory=1:4, the gap narrows to about 10%. Physical servers suit write-heavy workloads; cloud disk suits read-heavy workloads.

  • For CPU:Memory=1:8:

    • Physical server and cloud disk deliver nearly identical performance.

    • As memory increases, cloud disk significantly outperforms physical server, most notably at 4 cores, 32 GB.

Note

The cloud disk architecture offers the following advantages:

  • Dedicated resources eliminate contention from shared physical servers.

  • Independent compute and storage scaling without data migration.

  • Supports ESSD PL1, PL2, and PL3 performance levels with cost-effective pay-as-you-go billing.