Table of Contents outline true
Overview
- In this report, PTF investigates the impact of setting CPU allocations to 0 units across all tasks within an AWS ECS cluster. The purpose of this study is to determine whether removing CPU constraints reveals the actual CPU usage of the tasks and to assess how this adjustment affects overall performance. By comparing key workflows across different environments, we aim to identify any potential changes in efficiency, throughput, or resource utilization that may result from setting CPU = 0. The findings from these tests will help inform best practices for resource allocation and performance optimization within ECS clusters.
Jira Legacy | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Summary
- Much performance degradation when we use less instance count for environment or instance type: .x2gd.large with less resources.
- During the tests Parameter CPU=0 improved performance for a several workflows, so this point we are going to investigate more in this ticket.
No memory leaks, memory consumption was stable during all of the tests.
- Tests had 100% errors count for AIE_TC: Create Invoices, AIE_TC: Invoices Approve, AIE_TC: Paying Invoices, TC: Receiving-an-Order-Line, Unreceiving-a-Piece and Unreceiving-a-Piece Workflows because data was not regenerated.
Test Runs and Results
This table contains durations for all Workflows.
...
Test 1
(average case)
CPU=0
...
Test 2
(high load)
CPU=0
...
Test 3
(average case)
CPU=0
...
Test 4
(average case)
CPU=1
...
Table of Contents outline true
Overview
- In this report, PTF investigates the impact of setting CPU allocations to 0 units across all tasks within an AWS ECS cluster. The purpose of this study is to determine whether removing CPU constraints reveals the actual CPU usage of the tasks and to assess how this adjustment affects overall performance. By comparing key workflows across different environments, we aim to identify any potential changes in efficiency, throughput, or resource utilization that may result from setting CPU = 0. The findings from these tests will help inform best practices for resource allocation and performance optimization within ECS clusters.
Jira Legacy | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Summary
- During the tests Parameter CPU=0 improved performance for a several workflows, like MSF_TC: mod search by auth query, MSF_TC: mod search by contributors, MSF_TC: mod search by title query and ULR_TC: Users loan Renewal Transaction.
No memory leaks, memory consumption was stable during all of the tests.
- Tests had 100% errors count for AIE_TC: Create Invoices, AIE_TC: Invoices Approve, AIE_TC: Paying Invoices, TC: Receiving-an-Order-Line, Unreceiving-a-Piece and Unreceiving-a-Piece Workflows because data was not regenerated.
Test Runs
Test # | Description | Status |
---|---|---|
Test 1 | The Baseline MCPT Environment configuration was applied, and CPU=0 was set for all modules, Fixed Load (average case) MOBIUS test was run. | Completed |
Test 2 | The Baseline MCPT Environment configuration was applied, and CPU=0 was set for all modules, Fixed Load (high load case) MOBIUS test was run. | Completed |
Test 3 | The Baseline MCPT Environment configuration was applied, and CPU=0 was set for all modules, Fixed Load (average case) MOBIUS test was run (rerun Test 1). | Completed |
Test 4 | The Baseline MCPT Environment configuration was applied, and CPU=1 was set for all modules, Fixed Load (average case) MOBIUS test was run. | Completed |
Test 5 | The Baseline MCPT Environment configuration was applied, and CPU=2 was set for all modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run. | Completed |
Test 6 | The Baseline MCPT Environment configuration was applied, and CPU=2 was set for all modules, Data Import - Create with 25k and 100k records files tests were run. | Completed |
Test 7 | The Baseline QCP1 Environment configuration was applied, and CPU=2 was set for all modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run. | Completed |
Test 8 | The Baseline QCP1 Environment configuration was applied, and CPU=2 was set for all modules, Data Import - Create with 25k and 100k records files tests were run. | Completed |
Test 9 | The Baseline QCP1 Environment configuration was applied, and CPU=0 was set for all modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run. | Completed |
Test 10 | The Baseline QCP1 Environment configuration was applied, and CPU=0 was set for all modules, Data Import - Create with 25k and 100k records files tests were run. | Completed |
Test Results
This table contains durations for all Workflows.
Workflow | Test 1 CPU=0 | Test 2 CPU=0 | Test 3 CPU=0 | Test 4 CPU=1 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Average (milliseconds) | Errors | Average (milliseconds) | Errors | Average (milliseconds) | Errors | Average (milliseconds) | Errors | |||||||||
AIE_TC: Create Invoices | 8350 | 100% | 13458 | 100% | 7421 | 100% | 8251 | 100% | ||||||||
AIE_TC: Invoices Approve | 3180 | 100% | 5251 | 100% | 2960 | 100% | 3088 | 100% | ||||||||
AIE_TC: Paying Invoices | 3289 | 100% | 4919 | 100% | 3060 | 100% | 3285 | 100% | ||||||||
CICO_TC_Check-In Controller | 2323 | 0% | 3322 | 7% | 2228 | 0% | 2313 | 0% | ||||||||
CICO_TC_Check-Out Controller | 4154 | 0% | 5700 | 10% | 3896 | 0% | 3985 | 0% | ||||||||
CSI_TC:Share local instance | 13008 | 19% | 14781 | 14% | 12969 | 20% | 13022 | 19% | ||||||||
DE_Exporting MARC Bib records custom workflow | 52983 | 0% | 379912 | 95% | 78759 | 0% | 100700 | 0% | ||||||||
DE_Exporting MARC Bib records workflow | 42785 | 0% | 402026 | 98% | 73957 | 0% | 109794 | 0% | ||||||||
EVA_TC: View Account | 803 | 3% | 962 | 3% | 700 | 1% | 832 | 3% | ||||||||
ILR_TC: Create ILR | 1527 | 0% | 2215 | 4% | 1451 | 0% | 1518 | 0% | ||||||||
MSF_TC: mod search by auth query | 672 | 0% | 1830 | 7% | 3096 | 4% | 1023 | 0% | ||||||||
MSF_TC: mod search by boolean query | 165 | 0% | 485 | 2% | 737 | 1% | 212 | 0% | ||||||||
MSF_TC: mod search by contributors | 398 | 0% | 1063 | 3% | 1664 | 2% | 604 | 0% | ||||||||
MSF_TC: mod search by filter query | 286 | 0% | 713 | 2% | 1070 | 2% | 417 | 0% | ||||||||
MSF_TC: mod search by keyword query | 284 | 0% | 658 | 1% | 1006 | 1% | 422 | 0% | ||||||||
MSF_TC: mod search by auth subject query | 672407 | 0% | 18301112 | 7%1% | 30961530 | 4%2% | 1023623 | 0% | ||||||||
MSF_TC: mod search by boolean title query | 1651031 | 0% | 4852449 | 2%1% | 7372907 | 1% | 2121758 | 0% | ||||||||
OPIH_/oai/records | 6042 | 0% | 4649 | 100% | 3587 | 0% | 5448 | 0% | ||||||||
MSFPOO_TC: mod search by contributors398Add Order Lines | 55334 | 0% | 106399076 | 3%19% | 166454440 | 2%0% | 60455224 | 0% | ||||||||
MSFPOO_TC: mod search by filter query286Approve Order | 42567 | 0% | 71379022 | 2%12% | 107042191 | 2%0% | 41742907 | 0% | ||||||||
MSFPOO_TC : mod search by keyword query284Create Order | 31933 | 0% | 65856468 | 1%13% | 100631406 | 1%0% | 42232166 | 0% | ||||||||
MSFRTAC_TC: mod search by subject query407edge-rtac | 4150 | 0% | 11124726 | 1%0% | 15304084 | 2%0% | 6234099 | 0% | ||||||||
MSF_TC: mod search by title query | 1031 | 0% | 2449 | 1% | 2907 | 1% | 1758 | 0% | ||||||||
OPIH_/oai/records | 6042 | 0% | 4649 | 100% | 3587 | 0% | 5448 | 0% | ||||||||
POO_TC: Add Order Lines | 55334 | 0% | 99076 | 19% | 54440 | 0% | 55224 | 0% | ||||||||
POO_TC: Approve Order | 42567 | 0% | 79022 | 12% | 42191 | 0% | 42907 | 0% | ||||||||
POO_TC Create Order | 31933 | 0% | 56468 | 13% | 31406 | 0% | 32166 | 0% | ||||||||
RTAC_TC: edge-rtac | 4150 | 0% | 4726 | 0% | 4084 | 0% | 4099 | 0% | ||||||||
SDIC_Single Record Import (Create) | 13777 | 19% | 20475 | 13% | 13773 | 20% | 13873 | 19% | ||||||||
SDIU_Single Record Import (Update) | 19549 | 0% | 36639 | 16% | 19582 | 1% | 19568 | 0% | ||||||||
TC: Receiving-an-Order-Line | 45895 | 100% | 83735 | 100% | 45888 | 100% | 46890 | 100% | ||||||||
Serials-Receiving-Workflow | 48584 | 100% | 86692 | 100% | 47338 | 100% | 48019 | 100% | ||||||||
Unreceiving-a-Piece | 8080 | 100% | 13729 | 100% | 8013 | 100% | 8297 | 100% | ||||||||
ULR_TC: Users loan Renewal Transaction | 3189 | 0% | 4818 | 6% | 2970 | 0% | 3125 | 0%SDIC_Single Record Import (Create) | 13777 | 19% | 20475 | 13% | 13773 | 20% | 13873 | 19% |
SDIU_Single Record Import (Update) | 19549 | 0% | 36639 | 16% | 19582 | 1% | 19568 | 0% | ||||||||
TC: Receiving-an-Order-Line | 45895 | 100% | 83735 | 100% | 45888 | 100% | 46890 | 100% | ||||||||
Serials-Receiving-Workflow | 48584 | 100% | 86692 | 100% | 47338 | 100% | 48019 | 100% | ||||||||
Unreceiving-a-Piece | 8080 | 100% | 13729 | 100% | 8013 | 100% | 8297 | 100% | ||||||||
ULR_TC: Users loan Renewal Transaction | 3189 | 0% | 4818 | 6% | 2970 | 0% | 3125 | 0% |
This table contains durations for Check In\Check Out tests.
Requests | Executions | Response Times (ms) | ||||
---|---|---|---|---|---|---|
#Samples | Error % | Average | 90th pct | 95th pct | 99th pct | |
Check-In Controller (MCPT) CPU=2 | 2480 | 0% | 490 | 579 | 666 | 1576 |
Check-Out Controller (MCPT) CPU=2 | 2407 | 0% | 1018 | 1139 | 1277 | 2246 |
Check-In Controller (QCP1) CPU=2 | 2214 | 0.63% | 583 | 659 | 702 | 880 |
Check-Out Controller (QCP1) CPU=2 | 2975 | 0.94% | 953 | 1077 | 1166 | 1448 |
Check-In Controller (QCP1) CPU=0 | 2191 | 0.68% | 612 | 672 | 719 | 887 |
Check-Out Controller (QCP1) CPU=0 | 2937 | 0.89% | 984 | 1104 | 1192 | 1442 |
This table contains durations for Data Import tests.
...
Check-Out Controller
MCPT
...
Check-In Controller
QCPT
...
Check-Out Controller
QCPT
...
Job Profile | File | Duration (h:mm:ss) | Status |
---|---|---|---|
PTF Create 2 (MCPT) CPU=2 | 25k.mrc | 0:15:21 | COMMITTED |
PTF Create 2 (MCPT) CPU=2 | 100k.mrc | 1:01:25 | COMMITTED |
PTF - Create 2 (QCP1) CPU=2 | 25k.mrc | 0:14:52 | COMMITTED |
PTF - Create 2 (QCP1) CPU=2 | 100k.mrc | 0:50:36 | COMMITTED |
PTF - Create 2 (QCP1) CPU=0 | 25k.mrc | 0:14:47 | COMMITTED |
PTF - Create 2 (QCP1) CPU=0 | 100k.mrc | 0:52:34 | COMMITTED |
Comparison
This graph shows the durations of all workflows compared between tests.
...
Service CPU Utilization
Here we can see that nginx-okapi modules used 20% CPU for Test-2 (high load case).
...
Here we can see that Memory exceed 113% of the unit power mod-data-export-b modules for Test-2 (high load case).
Kafka metrics
DB CPU Utilization
...
Test №4
The Baseline MCPT Environment configuration was applied, and CPU=01 was set for all modules.
...
Here we can't see any sign of memory leaks on every module. Memory shows stable trend.
Kafka metrics
DB CPU Utilization
...
Top SQL-queries
Test
№3№5
The The Baseline MCPT Environment configuration was applied, the instance type was changed to x2gd.xlarge, the number of instances was changed to 6, and CPU=0 2 was set for all services.modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run.
Instance CPU Utilization
Service CPU Utilization
Here we can see that mod-permissions used 20% 18300% of the absolute CPU power of the container instance.parametr CPU=2.
Service Memory Utilization
Here we can't see any sign of memory leaks on every module. Memory shows stable trend.
Kafka metrics
DB CPU Utilization
DB CPU was 64% maximum.
DB Connections
Max number of DB connections was 2040.
Resource utilization for Test №4
The Baseline MCPT Environment configuration was applied, the instance type was changed to x2gd.xlarge, the number of instances was changed to 8, and CPU=0 was set for all services.
Service CPU Utilization
Here we can see that okapi used 20% of the absolute CPU power of the container instance.
DB CPU was 64% maximum.
DB Connections
Max number of DB connections was 2112.
DB load
Top SQL-queries
Test №6
The Baseline MCPT Environment configuration was applied, and CPU=2 was set for all modules, Data Import - Create with 25k and 100k records files tests were run.
Instance CPU Utilization
Service CPU Utilization
Here we can see that mod-source-record-storage-b used 72000% of the CPU power of parameter CPU=2.
Service Memory Utilization
Here we can't see any sign of memory leaks on every module. Memory shows stable trend.
Kafka metrics
DB CPU Utilization
DB CPU was 91%99%.
DB Connections
Max number of DB connections was 48402500.
DB load
Top SQL-queries
...
Test №7
The Baseline MCPT QCP1 Environment configuration was applied, the instance type was changed to x2gd.large, the number of instances was changed to 10, and CPU=02 was set for all services.TTmodules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run.
Instance CPU Utilization
Service CPU Utilization
Here we can see that okapi used 36% 20% of the absolute CPU power of the container instance.
Service Memory Utilization
Here we can't see any sign of memory leaks on every module. Memory shows stable trend.
Kafka metrics
DB CPU Utilization
DB CPU was 42%.
DB Connections
Max number of DB connections was 3650.
DB load
Top SQL-queries
Resource utilization for Test №6
...
Kafka metrics
DB CPU Utilization
DB CPU was 57%.
DB Connections
Max number of DB connections was 3650.
Test №8
The Baseline QCP1 Environment configuration was appliedinstance type was changed to r6g.xlarge, the number of instances was changed to 14 but 12 were used, and CPU=2 was set for all services., the and CPU=2 was set for all modules, Data Import - Create with 25k and 100k records files tests were run.
Instance CPU Utilization
Service CPU Utilization
Here we can see that okapi used 46000% 57000% CPU of unit power.
Service Memory Utilization
Here we can't see any sign of memory leaks on every module. Memory shows stable trend.
...
Kafka metrics
DB CPU Utilization
DB CPU was 98%.
DB Connections
Max number of DB connections was 5150.
DB load
Top SQL-queries
Resource utilization for Test №7
...
DB Connections
Max number of DB connections was 971.
Test №9
The Baseline QCP1 Environment configuration was applied, and CPU=20 was set for all services.modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run.
Instance CPU Utilization
Service CPU Utilization
Here we can see that okapi used 44000% of 15% of the unit absolute CPU power of the container instance.
Service Memory Utilization
Here we can't see any sign of memory leaks on every module. Memory shows stable trend.
...
Kafka metrics
DB CPU Utilization
DB CPU was 98%.
DB Connections
Max number of DB connections was 5150.
DB load
Top SQL-queries
Resource utilization for Test №8was 5150.
Test №10
The Baseline MCPT QCP1 Environment configuration was applied, the instance type was changed to x2gd.large, the number of instances was changed to 14, placement strategy was updated to "one task per host", and CPU=20 was set for all services.modules, Data Import - Create with 25k and 100k records files tests were run.
Instance CPU Utilization
Service CPU Utilization
Here we can see that okapi used 38% of the unit CPU power.
Service Memory Utilization
Here we can't see any sign of memory leaks on every module. Memory shows stable trend.
Kafka metrics
DB CPU Utilization
DB CPU was maximum 53%.92%.
DB Connections
Max number of DB connections was 3842.
DB load
Top SQL-queries
921.
Appendix
Infrastructure
PTF - Baseline MCPT environment configuration
- 14 m6g.2xlarge EC2 instances located in US East (N. Virginia)us-east-1
1 database instance, writer
Name Memory GIB vCPUs db.r6g.4xlarge
128 GiB 16 vCPUs - Open Search ptf-test
- Data nodes
- Instance type - r6g.2xlarge.search
- Number of nodes - 4
- Version: OpenSearch_2_7_R20240502
- Dedicated master nodes
- Instance type - r6g.large.search
- Number of nodes - 3
- Data nodes
- MSK tenant
4 m5.2xlarge ptf-KRaft-mode- 2 brokers, kafka.m7g.xlarge brokers in 2 zones
Apache Kafka version 2version 3.87.0x
EBS storage volume per broker 300 GiB
- auto.create.topics.enable=true
- log.retention.minutes=480
- default.replication.factor=3
...
Baseline MCPT Environment configuration according to tunning environment from previous report: task count: 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, for mod-users and mod-authtoken task count 6. Parameter srs.marcIndexers.delete.interval.seconds=86400 for mod-source-record-storage. Instance type: m6g.2xlarge. Instances count: 14. Database r6g.4xlarge, Amazon OpenSearch Service ptf-test: r6g.2хlarge.search (4 nodes).
- Test 1: The Baseline MCPT Environment configuration was applied, and CPU=0 was set for all modules, Fixed Load (average case) MOBIUS test was run.
- Test 2: The Baseline MCPT Environment configuration was applied, and CPU=0 was set for all modules, Fixed Load (high load case) MOBIUS test was run.
- Test 3: The Baseline MCPT Environment configuration was applied, and CPU=0 was set for all modules, Fixed Load (average case) MOBIUS test was run (rerun Test 1).
- Test 4: The Baseline MCPT Environment configuration was applied, and CPU=1 was set for all modules, Fixed Load (average case) MOBIUS test was run.
- Test 5: The : The Baseline MCPT Environment configuration was applied, and CPU=2 was set for all modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run.
- Test 6: The Baseline MCPT Environment configuration was applied, and CPU=2 was set for all modules, Data Import - Create with 25k and 100k records files tests were run.
- Test 67: The Baseline MCPT QCP1 Environment configuration was applied, and CPU=2 was set for all modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run.
- Test 78: The Baseline QCP1 Environment configuration was applied, and CPU=2 was set for all modules, Data Import - Create with 25k and 100k records files tests were run.
- Test 89: The Baseline QCP1 Environment configuration was applied, and CPU=20 was set for all modules, Check In\Check Out with 20 users for one tenant on 30 minutes test was run.
- Test 10: The Baseline QCP1 Environment configuration was applied, and CPU=0 was set for all modules, Data Import - Create with 25k and 100k records files tests were run.