CICO with/without shared kafka topics

Overview

The purpose of this ticket is to check and compare performance of CheckIn CheckOut workflow with and without shared kafka topic.

  • The approach is to enable (or add) parameter on mod-inventory, mod-inventory-storage, mod-circulation, mod-circulation-storage task definitions: {
              "name": "KAFKA_PRODUCER_TENANT_COLLECTION",
              "value": "ALL"
            },
  • run a test with 8 users and 20 users. 
  • Disable (delete) parameter from task definition.
  • Rerun.

Need to compare response time of CI/CO for tests with and without shared kafka topic, compare resource usage on service level, DB resource usage and kafka metrics

Summary

  • CheckIn CheckOut  workflow did passed with no unexpected errors, tested with and without shared kafka topics;
  • There is slight differences in response times with and without shared Kafka topic. However with 20 concurrent users differences is small (47 ms. longer for CI/CO with using shared topics) Please see Comparisons table below. 
  • Resource usage stats the same for identical tests with and without shared topics. (CPU, Memory , RDS CPU ,DB Connections);
  • Kafka usage is barely visible. Possibly we'll achieve more kafka usage with multi tenant CICO with and without shared topics. 

Recommendations & Jiras (Optional)

Original story: PERF-717

Results

Response Times (Average of all tests listed above, in seconds)


Check-in-check-out

Average (seconds)

Check-inCheck-outnotes
Test 1 8 users0.611s1,138swith shared kafka topic
Test 2 20 users0.537s0.935swith shared kafka topic
Test 3 8 users0.528s0.959swithout shared kafka topic
Test 4 20 users0.49s

0.888s

without shared kafka topic

Comparisons

comparison between tests with and without shared kafka topics;


Check-in-check-out

Average (seconds)

Check-inCheck-outnotes
Test 1vs3 (8 users)+0.083s+0.179swith/without shared kafka topics
Test 2vs4 (20 users)+0.047s

+0.047s

with/without shared kafka topics


Memory Utilization

Notes:

  • no sign of memory leaks on related modules. 
  • Drop of memory usage in the middle of a chart is due to modules restart to disable using shared Kafka topics


CPU Utilization 

Note: CPU utilization is the same for all of a modules with no dependency if CICO is using shared Kafka topics or not.


RDS CPU Utilization 

Note: 

RDS CPU usage and connections rate is the same for all tests (with and without using shared Kafka topics)

Kafka metrics

Note: We've provided here all charts related to MSK (kafka) cluster. tests here is barely visible. Possibly it will be visible when we'll tests CICO with multiple tenants using shared Kafka topics.

 


Results Mobius like environment 

testVusersCI(avg, s)CO (avg, s)
3 tenants no shared topic80,7711,359
3 tenants with shared topic80,6861,22
diff
-0,085-0,139
3 tenants no shared topic200,6611,187
3 tenants with shared topic200,6571,157
diff
-0,004-0,03
10 tenants no shared topic80,71851,272
10 tenants with shared topic80,691,214
diff
-0,0285-0,058
10 tenants no shared topic200,6941,208
10 tenants with shared topic200,7031,25
diff
0,0090,042

Resources Utilization/comparison 

Without shared Kafka topicsWith shared Kafka topics
CPU usage


CPU usage



Memory usage

Memory usage



MSK CPU usage

MSK CPU usage






Appendix

Infrastructure

PTF -environment pcp1

Release - Poppy.

  • 10 m6i.2xlarge EC2 instances located in US East (N. Virginia)us-east-1
  • 1 database  instance, writer db.r6g.xlarge

  • MSK tenant
    • 4 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=3
  • Open Search fse-ptf cluster
    • instance type r6g.large.search
    • Data nodes -4
    • Master nodes -3
    • EBS size 500 GiB

Modules version: 

Module
pcp1-pvt
Thu Oct 26 10:24:30 UTC 2023
Task Def. RevisionModule VersionTask CountMem Hard LimitMem Soft limitCPU unitsXmxMetaspaceSizeMaxMetaspaceSizeR/W split enabled
mod-inventory-storage-b11mod-inventory-storage:27.0.024096369020483076384512false
mod-inventory-b10mod-inventory:20.1.022880259210241814384512false
mod-circulation-storage-b10mod-circulation-storage:17.1.022880259215361814384512false
mod-pubsub-b9mod-pubsub:2.11.02153614401024922384512false
mod-circulation-b10mod-circulation:24.0.022880259215361814384512false

Methodology/Approach

  • with the default set up, run 8, 20 users CICO, and collect results; 
  • Change task definitions of related modules (mod-inventory, mod-inventory-storage, mod-circluation, mod-circulation-storage,mod-pubsub) to use shared kafka topics. Simply add to the parameters of a service :  {
              "name": "KAFKA_PRODUCER_TENANT_COLLECTION",
              "value": "ALL"
            },
  • rerun all the tests and compare results. (Response times of CICO, CPU,Mem utilization, kafka metrics, DB usage)