Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinetrue

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
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyPERF-959
 

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.  

...

Table of Contents
outlinetrue

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
serverSystem Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyPERF-959
 

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 #DescriptionStatus
Test 1The Baseline MCPT Environment configuration was applied, and CPU=0 was set for all modules,  Fixed Load (average case) MOBIUS test was run.Completed
Test 2The 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 3The 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 4The Baseline MCPT Environment configuration was applied, and CPU=1 was set for all modules,  Fixed Load (average case) MOBIUS test was run.Completed
Test 5The 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 6The 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 7The 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 8The 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 9The 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 10The 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. 

...

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

Image RemovedImage Added


Image RemovedImage Added

DB CPU Utilization

...

Here we can't see any sign of memory leaks on every module. Memory shows stable trend.


Kafka metrics

Image RemovedImage Added

Image RemovedImage Added



DB CPU Utilization

...

                                                                                                                     

Top SQL-queries



Test №5

The The Baseline MCPT Environment configuration  was applied,  and and CPU=2  was set for all  servicesmodules,  Check In\Check Out with 20 users for one tenant on 30 minutes test was run.

Instance CPU Utilization

Image Added

Service CPU Utilization

Here we can see that mod-permissions used 18300% of the CPU power of the parametr CPU=2.

...

Here we can't see any sign of memory leaks on every module. Memory shows stable trend.


Kafka metrics

Image Added

Image Added




DB CPU Utilization

DB CPU was 64% maximum.

...

Max number of DB connections was 2112.

DB load

    Image Added                                                                                                                   

Top SQL-queries

Image Added


Test №6

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 configuration was applied, and CPU=2 was set for all  servicesmodules,  Data Import - Create with 25k and 100k records files tests were run.

Instance CPU Utilization

Image Added

Service CPU Utilization

Here we can see that okapi used 20% that mod-source-record-storage-b used 72000% of the absolute CPU power of the container instance.parameter CPU=2.

Image Added

Service Memory Utilization

Here we can't see any sign of memory leaks on every module. Memory shows stable trend.

Image Added

Kafka metrics

Image Added


Image Added



DB CPU Utilization

DB CPU was 91%99%.

Image Added

DB Connections

Max number of DB connections was 48402500.

Image Added

DB load

Image Added                                                                                                                    

Top SQL-queries

Image Added



Test №7

The Baseline MCPT  QCP1 Environment configuration was applied applied, and CPU=2 was set for all  servicesmodules,  Check In\Check Out with 20 users for one tenant on 30 minutes test was run.

Instance CPU Utilization

Image Added


Service CPU Utilization

Here we can see that okapi used 36% 20% of the absolute CPU power of the container instance.

Image Added

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

                                                                                                                    

...

on every module. Memory shows stable trend.

Image Added


Kafka metrics

Image Added

Image Added


DB CPU Utilization

DB CPU was 57%.

Image Added

DB Connections

Max number of DB connections was 3650.

Image Added



Test №8

The Baseline MCPT QCP1 Environment configuration was applied, the instance 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  servicesmodules,  Data Import - Create with 25k and 100k records files tests were run.

Instance CPU Utilization

Image Added

Service CPU Utilization

Here we can see that okapi used 46000% 57000% CPU of unit power.

Image Added

Service Memory Utilization

Here we can't see any sign of memory leaks on every module. Memory shows stable trend.

...

Image Added

Kafka metrics

Image Added

Image Added


DB CPU Utilization

DB CPU was 98%.

Image Added

DB Connections

Max number of DB connections was 5150.

DB load

                                                                                                                     

...

number of DB connections was 971.

Image Added



Test №9

The Baseline MCPT  QCP1 Environment configuration was applied, the instance type was changed to r6g.xlarge, the number of instances was changed to 14, placement strategy was updated to "one task per host", and CPU=20 was set for all  servicesmodules,  Check In\Check Out with 20 users for one tenant on 30 minutes test was run.

Instance CPU Utilization

Image Added

Service CPU Utilization

Here we can see that okapi used 44000% 15% of the absolute CPU power of the unit CPU power.container instance.

Image Added

Service Memory Utilization

Here we can't see any sign of memory leaks on every module. Memory shows stable trend.

Inctanse CPU Utilization

Kafka metrics

DB CPU Utilization

DB CPU was 98%.

DB Connections

Max number of DB connections was 5150.

DB load

                                                                                                                     

Top SQL-queries

Image Added


Kafka metrics

Image Added


Image Added



DB CPU Utilization

DB CPU was 98%.

Image Added

DB Connections

Max number of DB connections was 5150.

Image Added



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 servicesfor all modules,  Data Import - Create with 25k and 100k records files tests were run.

Instance CPU Utilization

Image Added

Service CPU Utilization

Here we can see that okapi used 38% of the unit CPU power.

Image Added

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%.

DB Connections

Max number of DB connections was 3842.

DB load

                                                                                                                     

Top SQL-queries

memory leaks on every module. Memory shows stable trend.

Image Added


Kafka metrics

Image Added


Image Added



DB CPU Utilization

DB CPU was maximum 92%.

Image Added

DB Connections

Max number of DB connections was 921.

Image Added


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


    NameMemory GIBvCPUs

    db.r6g.4xlarge

    128 GiB16 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
  • MSK tenant
    4 m5.2xlarge ptf-KRaft-mode
    • 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.2xlargeInstances count: 14Database r6g.4xlargeAmazon OpenSearch Service  ptf-testr6g.2хlarge.search (4 nodes).

...