This topic describes the performance testing results of ApsaraDB for MongoDB instances.

Test results

Scenarios

  • r:w=100:0: The read/write ratio is 100% and 0.
  • r:w=95:5: The read/write ratio is 95% and 5%.
  • r:w=50:50: The read/write ratio is 50% and 50%.
  • r:w=5:95: The read/write ratio is 5% and 95%.
  • r:w=0:100: The read/write ratio is 0 and 100%.

Metrics

  • recordcount: the total number of data rows loaded to the ApsaraDB for MongoDB instance.
  • operationcount: the total number of read /write operations.
  • threads: the number of concurrent threads on the client.
  • throughput: the amount of data that is able to be transmitted and received during a specific time period.
  • RAL: the average latency of read operations. Unit: us.
  • WAL: the average latency of write operations. Unit: us.
Note In this topic, if RAL or WAL is 0, no read or write operations are involved.

The following sections show the test results and performance comparison between an instance that uses the physical server and an instance that uses the cloud disk at different read/write ratios.

Instance of MongoDB 4.2 that uses the physical server

Load test data
CPU:MemoryInstance specificationrecordcountthreadsthroughputRALWAL
1:21 core, 2 GB (general-purpose)10000004358901110
2 cores, 4 GB (general-purpose)2000000876290521
4 cores, 8 GB (general-purpose)400000016243000654
8 cores, 16 GB (general-purpose)8000000322674501191
1:48 cores, 32 GB (general-purpose)16000000322909001095
16 cores, 64 GB (general-purpose)320000001284109803033
1:82 cores, 16 GB (dedicated)80000008655301217
4 cores, 32 GB (dedicated)16000000161452601097
8 cores, 64 GB (dedicated)3200000032354370899
16 cores, 128 GB (dedicated)640000001606007802658
r:w=100:0
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:21 core, 2 GB (general-purpose)1000000463876230
2 cores, 4 GB (general-purpose)20000008128936160
4 cores, 8 GB (general-purpose)400000016370164270
8 cores, 16 GB (general-purpose)800000032480146580
1:48 cores, 32 GB (general-purpose)16000000324425115890
16 cores, 64 GB (general-purpose)320000001285725222260
1:82 cores, 16 GB (dedicated)80000008124366410
4 cores, 32 GB (dedicated)1600000016205517730
8 cores, 64 GB (dedicated)3200000032502466320
16 cores, 128 GB (dedicated)640000001606687623850
r:w=95:5
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:21 core, 2 GB (general-purpose)1000000445568641079
2 cores, 4 GB (general-purpose)2000000810391757914
4 cores, 8 GB (general-purpose)40000001634411453561
8 cores, 16 GB (general-purpose)80000003241095763925
1:48 cores, 32 GB (general-purpose)160000003239920785926
16 cores, 64 GB (general-purpose)320000001285514823052381
1:82 cores, 16 GB (dedicated)8000000888698711394
4 cores, 32 GB (dedicated)1600000016182068561192
8 cores, 64 GB (dedicated)320000003247111664861
16 cores, 128 GB (dedicated)640000001606880123122449
r:w=50:50
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:21 core, 2 GB (general-purpose)10000004306212071399
2 cores, 4 GB (general-purpose)20000008661011281318
4 cores, 8 GB (general-purpose)40000001619743743864
8 cores, 16 GB (general-purpose)800000032227509871809
1:48 cores, 32 GB (general-purpose)16000000322176310101907
16 cores, 64 GB (general-purpose)320000001284349821623696
1:82 cores, 16 GB (dedicated)80000008568013451930
4 cores, 32 GB (dedicated)16000000161047010641971
8 cores, 64 GB (dedicated)3200000032204277902329
16 cores, 128 GB (dedicated)640000001602944529447891
r:w=5:95
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:21 core, 2 GB (general-purpose)10000004243115111649
2 cores, 4 GB (general-purpose)20000008533614061608
4 cores, 8 GB (general-purpose)400000016144968581110
8 cores, 16 GB (general-purpose)800000032145739582253
1:48 cores, 32 GB (general-purpose)1600000032138129952377
16 cores, 64 GB (general-purpose)320000001282066328316348
1:82 cores, 16 GB (dedicated)80000008407932018066
4 cores, 32 GB (dedicated)1600000016715410802288
8 cores, 64 GB (dedicated)3200000032125857832626
16 cores, 128 GB (dedicated)640000001601708342419615
r:w=0:100
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:21 core, 2 GB (general-purpose)10000004242901642
2 cores, 4 GB (general-purpose)20000008523801643
4 cores, 8 GB (general-purpose)4000000161379401154
8 cores, 16 GB (general-purpose)8000000321456602189
1:48 cores, 32 GB (general-purpose)16000000321348502361
16 cores, 64 GB (general-purpose)320000001281975806461
1:82 cores, 16 GB (dedicated)80000008393908097
4 cores, 32 GB (dedicated)1600000016694002298
8 cores, 64 GB (dedicated)32000000321256702539
16 cores, 128 GB (dedicated)640000001601632509770

Instance of MongoDB 4.4 that uses the cloud disk

Load test data
CPU:MemoryInstance specificationrecordcountthreadsthroughputRALWAL
1:24 cores, 8 GB (dedicated)400000016182350871
8 cores, 16 GB (dedicated)800000032356430891
16 cores, 32 GB (dedicated)1600000064653450971
1:42 cores, 8 GB (dedicated)40000008661301202
8 cores, 32 GB (dedicated)16000000644595201385
16 cores, 64 GB (dedicated)32000000966197301539
1:82 cores, 16 GB (dedicated)80000008622401280
4 cores, 32 GB (dedicated)1600000016186030857
r:w=100:0
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:24 cores, 8 GB (dedicated)400000016249456340
8 cores, 16 GB (dedicated)800000032332709380
16 cores, 32 GB (dedicated)16000000645570311360
1:42 cores, 8 GB (dedicated)40000008109897230
8 cores, 32 GB (dedicated)16000000643603917400
16 cores, 64 GB (dedicated)32000000965996015850
1:82 cores, 16 GB (dedicated)80000008112987030
4 cores, 32 GB (dedicated)1600000016243066530
r:w=95:5
CPU:MemoryInstance specificationoperatiocountthreadsthroughputRALWAL
1:24 cores, 8 GB (dedicated)400000016224717971161
8 cores, 16 GB (dedicated)8000000322954310641199
16 cores, 32 GB (dedicated)16000000645346611781300
1:42 cores, 8 GB (dedicated)4000000889868541480
8 cores, 32 GB (dedicated)16000000643412818291970
16 cores, 64 GB (dedicated)32000000967836311961420
1:82 cores, 16 GB (dedicated)8000000888068671619
4 cores, 32 GB (dedicated)1600000016201327701181
r:w=50:50
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:24 cores, 8 GB (dedicated)4000000161412710091238
8 cores, 16 GB (dedicated)8000000321988714961670
16 cores, 32 GB (dedicated)16000000642312026802819
1:42 cores, 8 GB (dedicated)40000008513213701735
8 cores, 32 GB (dedicated)16000000641892929303615
16 cores, 64 GB (dedicated)32000000962561236754363
1:82 cores, 16 GB (dedicated)80000008484114381855
4 cores, 32 GB (dedicated)16000000161305110801356
r:w=5:95
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:24 cores, 8 GB (dedicated)4000000161026611411570
8 cores, 16 GB (dedicated)8000000321355621412351
16 cores, 32 GB (dedicated)16000000641444742954412
1:42 cores, 8 GB (dedicated)40000008422615911902
8 cores, 32 GB (dedicated)16000000641205551095210
16 cores, 64 GB (dedicated)32000000961521658778503
1:82 cores, 16 GB (dedicated)80000008387417922072
4 cores, 32 GB (dedicated)16000000161008311061605
r:w=0:100
CPU:MemoryInstance specificationoperationcountthreadsthroughputRALWAL
1:24 cores, 8 GB (dedicated)400000016996001592
8 cores, 16 GB (dedicated)8000000321306402423
16 cores, 32 GB (dedicated)16000000641374304615
1:42 cores, 8 GB (dedicated)40000008428701860
8 cores, 32 GB (dedicated)16000000641161105441
16 cores, 64 GB (dedicated)32000000961439108746
1:82 cores, 16 GB (dedicated)80000008385402067
4 cores, 32 GB (dedicated)1600000016971101638

Performance comparison

CPU:Memory=1:2
  • Instances of 4 cores and 8 GB:Data for instances of 4 cores and 8 GB
  • Instances of 8 cores and 16 GB:8 CPU cores, 16 GB of memory
CPU:Memory=1:4
  • Instances of 8 cores and 32 GB:Data for instances of 8 cores and 32 GB
  • Instances of 16 cores and 64 GB:Data for instances of 16 cores, 64 GB
CPU:Memory=1:8
  • Instances of 2 cores and 16 GB:Data for instances of 2 cores, 16 GB
  • Instances of 4 cores, 32 GB:Data for instances of 4 cores, 32 GB

Result analysis

  • CPU:Memory=1:2: The instance that uses the physical server provides better performance than the instance that uses the cloud disk. The performance difference is about 7% to 50% at different read/write ratios. The maximum difference exists on instances of 4 cores, 8 GB.
  • CPU:Memory=1:4: The instance that uses the physical server provides better performance than the instance that uses the cloud disk. The performance difference is about 10%. The instance that uses the physical server is suitable for write scenarios, and the instance that uses the cloud disk is suitable for read scenarios.
  • CPU:Memory=1:8:
    • The instance that uses the physical server provides almost the same performance as the instance that uses the cloud disk.
    • With the increase of memory, the instance that uses the cloud disk provides better performance than the instance that uses the physical server. The maximum difference exists on instances of 4 cores, 32 GB.
Note The instance that uses the cloud disk has the following benefits:
  • All resources are dedicated and can avoid the resource intention that occurs on the instance that uses the physical server.
  • Compute and storage resources can be automatically scaled. No data migration is required.
  • ESSD PL1, ESSD PL2, and ESSD PL3 are more cost-effective for pay-as-you-go instances.