Table of Contents outline true
...
- All tests were run successfully and without errors on the Mobius-performance testing cluster (mcpt). Approximately over 100 tests with various environment configurations were conducted. The tests and configurations that showed the best results for two database modifications, such as db.r6g.4xlarge and db.r6g.8xlarge, will be demonstrated.
- During testing, an insufficient amount of resources for Amazon OpenSearch Service was detected, so data node instance type was increased to r6g.2xlarge.search.
To improve performance, the AWS task count was adjusted for certain services, which increased the memory load on the database. To avoid OOM (Out of Memory) errors, configurations were changed in both the DB instance parameter group and the DB cluster parameter group. Specifically, the shared_buffers parameter was modified to SUM({DBInstanceClassMemory/24076},-50003).
- To avoid "remaining connection slots are reserved for non-replication superuser and rds_superuser connections" errors, configurations were changed in both the DB instance parameter group and the DB cluster parameter group. max_connections was modified to LEAST({DBInstanceClassMemory/9531392},9000)
- For mod-authtoken CPU was changed from 512 to 1024 and task count was adjusted to 6 tasks (2 default), okapi and nginx-okapi CPU was changed from 1024 to1536.
No sign of memory leaks on every module during master-script tests. Memory shows a stable trend. For tests with a high load of single record create and update (62 virtual users without pauses) OOM issue of mod-inventory was reported
Jira Legacy server System Jira serverId 01505d01-b853-3c2e-90f1-ee9b165564fc key MODINV-1023 - No modules are showing a growing CPU trend or any spikes.
Average response time differs and depends on environment configurations.
- The "Receiving: downloading" workflow. Due to its design, it's processed by the frontend and sends frequent requests to the database in a very large quantity. When under a load of 70% of tenants simultaneously, this causes significant degradation in the performance of all other workflows. Therefore, results are provided in tables with additional tests conducted with this workflow and without it. The CPU usage by the database increases by more than 25% with this workflow and reaches 99%.
- Database connection count did not exceed 5700
- During the high-load test, exporting 800,000 records concurrently for 62 tenants, an issue with the mod-data-export occurs
, which will be resolved and tested in the next release - QuesneliaJira Legacy server System Jira serverId 01505d01-b853-3c2e-90f1-ee9b165564fc key PERF-927
. Other workflows performed normally. Resource usage was stable and corresponded to the load.Jira Legacy server System Jira serverId 01505d01-b853-3c2e-90f1-ee9b165564fc key PERF-888 - Test with Fiscal year rollover average duration 3:21:51 for 30 tenants and 6:26:33 for 60 tenants, finished without errors, shows severe performance degradation for data import and data export workflows due to high database CPU usage 99.8%.
Recommendations
Database parameter group configuration:
parameter | changed value | default value | Comment |
---|---|---|---|
shared_buffers | SUM({DBInstanceClassMemory/24076},-50003) | SUM({DBInstanceClassMemory/12038},-50003) | Increases freeable db memory from 25% to 50% and decreases cache memory limit from 75% to 50% |
max_connections | LEAST({DBInstanceClassMemory/9531392},9000) | LEAST({DBInstanceClassMemory/9531392},5000) | Increases maximal connection limit from 5000 to 9000 connections |
Amazon OpenSearch Service
data node instance type - r6g.2xlarge.search
Services
mod-authtoken CPU - 1024, 6 tasks
okapi CPU-1536
nginx-okapi CPU-1536
For database size db.r6g.4xlarge
adjust task count to 6 for services:
- mod-authtoken
adjust task count to 4 for services:
- mod-permissions
- mod-search
- mod-patron
- mod-inventory
- mod-inventory-storage
- mod-circulation
- mod-circulation-storage
- mod-order
- mod-order-storage,
- mod-invoice
- mod-invoice-storage
- mod-users
For database size db.r6g.8xlarge
adjust task count to 6 for services:
- mod-authtoken
- mod-search
adjust task count to 4 for services:
- mod-permissions
- mod-patron
- mod-inventory
- mod-inventory-storage
- mod-circulation
- mod-circulation-storage
- mod-order
- mod-order-storage,
- mod-invoice
- mod-invoice-storage
- mod-organization
- mod-organization-storage
- mod-users
- mod-finance
- mod-finance-storage
- mod-configuration
"Receiving: downloading" workflow optimization
Test Runs
Test # | Workflows | Test Conditions | Results |
---|---|---|---|
1. | All workflows | 2 tasks for all of the modules (except the modules with 1 task by requirements) database r6g.4xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, | Completed |
2. | All workflows | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users and task count 6 for mod-authtoken. Database r6g.4xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed |
3. | Without ERW: Exporting Receiving Information to CSV | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users and task count 6 for mod-authtoken. Database r6g.4xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed |
4. | All workflows | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users, mod-organization, mod-organization-storage, mod-finance, mod-finance-storage, mod-configuration and task count 6 for mod-authtoken, mod-search. Database r6g.8xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed |
5. | Without ERW: Exporting Receiving Information to CSV | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users, mod-organization, mod-organization-storage, mod-finance, mod-finance-storage, mod-configuration and task count 6 for mod-authtoken, mod-search. Database r6g.8xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed |
6. | All workflows | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users and task count 6 for mod-authtoken. Database r6g.4xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed |
7. | All workflows, high-load | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users and task count 6 for mod-authtoken. Database r6g.4xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed with errors from data export |
8. | All no-acquisition workflows + Fiscal year rollover 30 tenants | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users and task count 6 for mod-authtoken. Database r6g.4xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed |
9. | All no-acquisition workflows + Fiscal year rollover 60 tenants | Adjasted task count to 4 for services: mod-permissions, mod-search, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage, mod-order, mod-order-storage, mod-invoice, mod-invoice-storage, mod-users and task count 6 for mod-authtoken. Database r6g.4xlarge, shared_buffers parameters SUM({DBInstanceClassMemory/24076},-50003), Amazon OpenSearch Service r6g.2хlarge.search, mod-authtoken CPU - 1024, okapi CPU-1536, nginx-okapi CPU-1536 | Completed with errors from data import |
...
Baseline (milliseconds) | Tuned with Receiving: downloading (milliseconds) | Tuned without Receiving: downloading (milliseconds) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
db.r6g.4xlarge | Errors | Test №1 db.r6g.4xlarge 2 tasks for all of the modules | Errors | Test №2 db.r6g.4xlarge | Test №4 db.r6g.8xlarge-configs for 8xlarge db | Errors | Delta 4xlarge and 8xlarge db | Test №3 db.r6g.4xlarge | Test №5 db.r6g.8xlarge -configs for 8xlarge db | Errors | Delta 4xlarge and 8xlarge db | |
AIE_TC: Create Invoices | 34730 | 0 | 22601 | 0 | 8006 | 4848 | 0 | -39.45 | 3253 | 2498 | 0 | -23.21 |
AIE_TC: Invoices Approve | 33130 | 0 | 22107 | 0 | 7035 | 4192 | 0 | -40.41 | 3941 | 3074 | 0 | -22.00 |
AIE_TC: Paying Invoices | 31119 | 0 | 22662 | 0 | 6857 | 4372 | 0 | -36.24 | 4875 | 3834 | 0 | -21.35 |
CICO_TC_Check-In Controller | 6420 | 1 | 4724 | 0 | 2254 | 1550 | 0 | -31.23 | 1728 | 1348 | 0 | -21.99 |
CICO_TC_Check-Out Controller | 10520 | 4 | 7842 | 0 | 4037 | 2861 | 0 | -29.13 | 3055 | 2311 | 0 | -24.35 |
CSI_TC:Share local instance | 11018 | 43 | 16491 | 0 | 15945 | 15853 | 0 | -0.58 | 15816 | 15720 | 0 | -0.61 |
DE_Exporting MARC Bib records custom workflow | 53296 | 0 | 38085 | 0 | 43997 | 39251 | 0 | -10.79 | 41901 | 35699 | 0 | -14.80 |
DE_Exporting MARC Bib records workflow | 36563 | 0 | 33504 | 0 | 42815 | 35215 | 0 | -17.75 | 51828 | 35379 | 0 | -31.74 |
EVA_TC: View Account | - | 21 | 1838 | 0 | 475 | 389 | 0 | -18.11 | 414 | 364 | 0 | -12.08 |
ILR_TC: Create ILR | 5085 | 2 | 3740 | 0 | 1505 | 1023 | 0 | -32.03 | 1098 | 817 | 0 | -25.59 |
MSF_TC: mod search by auth query | 1880 (average for all search flows) | 52 | 12044 | 0 | 544 | 580 | 0 | 6.62 | 557 | 549 | 0 | -1.44 |
MSF_TC: mod search by boolean query | 3365 | 0 | 163 | 172 | 0 | 5.52 | 168 | 163 | 0 | -2.98 | ||
MSF_TC: mod search by contributors | 5841 | 0 | 389 | 413 | 0 | 6.17 | 398 | 391 | 0 | -1.76 | ||
MSF_TC: mod search by filter query | 3332 | 0 | 279 | 298 | 0 | 6.81 | 287 | 283 | 0 | -1.39 | ||
MSF_TC: mod search by keyword query | 3376 | 0 | 280 | 296 | 0 | 5.71 | 289 | 285 | 0 | -1.38 | ||
MSF_TC: mod search by subject query | 5107 | 0 | 406 | 427 | 0 | 5.17 | 413 | 407 | 0 | -1.45 | ||
MSF_TC: mod search by title query | 6425 | 0 | 1040 | 1062 | 0 | 2.12 | 1050 | 1034 | 0 | -1.52 | ||
OPIH_/oai/records | - | - | 742 | 0 | 849 | 573 | 0 | -32.51 | 1149 | 544 | 0 | -52.65 |
POO_TC: Add Order Lines | 185765 | 415(API- the same in UI) | 105721 | 0 | 51776 | 28268 | 0 | -45.40 | 6281 | 4939 | 0 | -21.37 |
POO_TC: Approve Order | 146352 | 0 | 88683 | 0 | 40309 | 20976 | 0 | -47.96 | 2543 | 2021 | 0 | -20.53 |
POO_TC Create Order | 99937 | 0 | 56442 | 0 | 28708 | 15910 | 0 | -44.58 | 2734 | 2182 | 0 | -20.19 |
RTAC_TC: edge-rtac | - | 0 | 2735 | 0 | 2411 | 1355 | 0 | -43.80 | 1693 | 1282 | 0 | -24.28 |
SDIC_Single Record Import (Create) | 30395 | 44 | 21459 | 0 | 11491 | 5858 | 0 | -49.02 | 5449 | 4310 | 0 | -20.90 |
SDIU_Single Record Import (Update) | 96046 | 3 | 89233 | 0 | 19259 | 13391 | 0 | -30.47 | 11500 | 10350 | 0 | -10.00 |
TC: Receiving-an-Order-Line | 307271 | 0 | 167843 | 0 | 88178 | 47492 | 0 | -46.14 | 9322 | 7873 | 0 | -15.54 |
Serials-Receiving-Workflow | 282336 | 0 | 141327 | 0 | 83977 | 46040 | 0 | -45.18 | 9683 | 8156 | 0 | -15.77 |
Unreceiving-a-Piece | 106148 | 0 | 59500 | 0 | 29205 | 15808 | 0 | -45.87 | 2786 | 2295 | 0 | -17.62 |
ULR_TC: Users loan Renewal Transaction | 8023 | 6 | 6119 | 0 | 3256 | 2239 | 0 | -31.23 | 2431 | 1896 | 0 | -22.01 |
TOTAL | - | - | 1881 | 0 | 482.84 | 328.12 | 0 | -32.04 | 103.99 | 83.14 | 0 | -20.05 |
...
PTF - environment mcpt
- 14 m6g.2xlarge EC2 instances located in US East (N. Virginia)us-east-1
1 database instance, writer
one of
Name Memory GIB vCPUs db.r6g.4xlarge
128 GiB 16 vCPUs db.r6g.8xlarge 256 GiB 32 vCPUs - Amazon OpenSearch Service: ptf-test
- Data nodes
Instance type-r6g.2xlarge.search
Number of nodes-4
- Dedicated master nodes
Instance type-r6g.large.search
Number of nodes-3
- Data nodes
- MSK ptf-mobius-testing2
- 2 m5.2xlarge brokers in 2 zones
Apache Kafka version 2.8.0
EBS storage volume per broker 300 GiB
- auto.create.topics.enable=true
- log.retention.minutes=480
- default.replication.factor=2
...
Modules memory and CPU parameters:
db.r6g.4xlarge
...
MOBIUS Tests: scenarios were started by carrier.io or from load generator instance in the same (us-east-1) AWS region.
The database contains five times more generated data for large tenant IDs compared to small tenant IDs. The table below displays the average count of generated instances and items for both small and large tenants..
tenant | instances | items |
---|---|---|
Small | 84754 | 103137 |
Large | 416176 | 543428 |
The attached file contains full info about generated data per tenant.
large tenants IDs = 0042, 0024, 0051, 0006
...
At the initial stage of testing, there were numerous errors from various workflows, most notably those involving search. While investigating the cause of the errors, it was found that there was insufficient CPU capacity (100% utilization) on the data nodes of the OpenSearch cluster. Initially, testing was done with r6g.large.search, then increased to r6g.4xlarge.search, but it was too large and only utilized 40% CPU. Therefore, it was downsized to r6g.2xlarge.search, with the number of containers (tasks) increased to 4 for mod-search.
However, after identifying the issue related to search, a problem with the database persisted, such as OOM (Out of Memory). Two options were tested to address this issue: increasing the database size to db.r6g.8xlarge and adjusting the shared_buffers configuration to SUM({DBInstanceClassMemory/24076},-50003) for the size of db.r6g.4xlarge. Both tests showed promising results; however, in both cases, there were errors related to an insufficient number of connections to the database in the logs ("remaining connection slots are reserved for non-replication superuser and rds_superuser connections"). To address this, the max_connections configuration was set to LEAST({DBInstanceClassMemory/9531392},9000) for both sizes of the database, increasing the upper limit of connections to the database to 9000.
All of these measures helped to eliminate errors, but response times remained high, especially for check-in and check-out. To improve response time, we increased the number of containers for mod-authtoken to 4, which yielded very good results. Additionally, we improved response times for all circulation workflows by setting 4 containers for each: mod-permissions, mod-patron, mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage