[Nolana] Check-IN + title-level requests retest

Overview

Test goal is to assess performance of circulation check-in functionality for items with 10 TLR (title-level requests) each. Difference from the previous testing is added indexes to mod_circulation_storage.request and mod_circulation_storage.actual_cost_record in scope of CIRCSTORE-402 - Getting issue details... STATUS .

Previous test report: [Nolana] Check-IN + title-level requests

Ticket: PERF-568 - Getting issue details... STATUS

Summary

  • Load tests showed that there is still significant degradation in performance of check-in for items with 10 TLRs each and without it. Also, response time increased after indexes were added. - see Response Time Comparison.
  • Resource monitoring showed that:
  • Query plan analysis for top SQL-queries showed that indexes were not used in queries processing.

Recommendations & Jiras

As added indexes didn't change query plan of most CPU-consuming queries, CIRCSTORE-402 - Getting issue details... STATUS should be reviewed. Tests should be repeated with fixes.

Test Runs 

Test #

Test Conditions

Duration 

Load generator size (recommended)

Load generator Memory (GiB) (recommended)

Notes


1.

Baseline, Check-in with 1, 8, 25 users

30 mint3.medium3

Without TLR

2.Verification, Check-in with 1, 8, 25 usersWith 10 TLR per item


Results

Response Times

Baseline (items without TLR)

1 user

8 users

25 users

Verification (items with 10 TLRs)

1 user

8 users

25 users


Response time comparison

Items without TLR and items with TLR (both after indexes were added)


User quantity

Check-in response time 95prc, sec


Degradation, sec


Degradation, %

Baseline

(items without TLR)

Verification

(items with 10 TLR each)

1 user1.6862.2190.53331%
8 users0.4981.2210.725145%
25 users0.5882.3331.745296%
25 users (rerun, with analyze operation before the test)0.6222.2221.6257%

Tests without indexes and with indexes added (both for items with TLR)


User quantity

Check-in response time 95prc, sec


Degradation, sec


Degradation, %

Baseline

(before fix)

Verification

(after fix)

1 user0.9532.2191.266132%
8 users0.7821.2210.43956%
25 users2.0012.3330.33216%

Service CPU Utilization

Baseline (items without TLR)

1 user

8 users

25 users

Verification (items with 10 TLRs)

During verification tests CPU utilization for mod-users increased significantly. For 25 users test increase was from 22% to 51%.

1 user

8 users

25 users


Memory Utilization

Baseline (items without TLR)

1 user

8 users

25 users

Verification (items with 10 TLRs)

1 user

8 users

25 users


DB CPU Utilization

Baseline (items without TLR)

1 user

8 users

25 users

Verification (items with 10 TLRs)

During verification tests RDS CPU utilization increased significantly. For 25 users test increase was from 15% to 72%.

1 user

8 users

25 users


DB Connections

Baseline (items without TLR)

1 user

8 users

25 users

Verification (items with 10 TLRs)

1 user

8 users

25 users


DB load

Baseline (items without TLR)

1 user

8 users

25 users

Verification (items with 10 TLRs)

1 user

8 users

25 users

Top-SQL

Baseline (items without TLR)

25 users

Verification (items with 10 TLRs)

During verification tests two SQL queries moved to the beginning of Top SQL list:

SELECT [tenant]_mod_circulation_storage.count_estimate(?)

SELECT jsonb,id FROM [tenant]_mod_circulation_storage.request WHERE ((lower(f_unaccent(request.jsonb->>?)) LIKE lower(f_unaccent(?))) AND ((((CASE WHEN length(lower(?)) <= ? THEN left(lower(request.jsonb->>?),?) LIKE lower(?) ELSE left(lower(request.jsonb->>?),?) LIKE left(lower(?),?) AND lower(request.jsonb->>?) LIKE lower(?) END) OR (CASE WHEN length(lower(?)) <= ? THEN left(lower(request.jsonb->>?),?) LIKE lower(?) ELSE left(lower(request.jsonb->>?),?) LIKE left(lower(?),?) AND lower(reques


25 users

Appendix

Infrastructure

PTF -environment ncp3

  • 10 m6i.2xlarge EC2 instances located in US East (N. Virginia)us-east-1
  • 2 instances of db.r6.xlarge database instances: Writer & reader instances
  • MSK ptf-kakfa-3 [ kafka configurations]
    • 4 kafka.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

Environment didn't change since previous testing, but two indexes were added: request_instanceid_idx on [tenant]_mod_circulation_storage.request and ctual_cost_record_expirationdate_idx on [tenant]_mod_circulation_storage.actual_cost_record.

Modules memory and CPU parameters:

Modules

Version

Task Definition

Running Tasks 

CPU

Memory (Soft/Hard limits)

MaxMetaspaceSize

Xmx

okapi4.14.7131024

1440/1684

512922
mod-feesfines18.1.132128896/1024128768
mod-patron-blocks1.7.1421024896/1024128768
mod-pubsub2.7.0421024

1440/1536

512922
mod-authtoken2.12.032

512

1152/1440

128

922

mod-circulation-storage15.0.2321024

1440/1536

512896
mod-circulation23.3.2321024896/1024128768
mod-configuration5.9.032128896/1024128768
mod-inventory19.0.110210242592/28805121814
mod-inventory-storage

25.0.3

3210241952/22085121440
mod-users19.0.042128896/1024128768
mod-remote-storage1.7.1321281692/18725121178

Methodology/Approach

  1. Run necessary commands to return the database to the initial state. Do this before each test run. Wait several minutes before the test start.
  2. Conduct check-out for the items with JMeter script Create_TLR.jmx (disable "Create_TLR" step).
  3. Conduct baseline - run check-in load tests with different number of users.
  4. Conduct verification - repeat tests with the same approach but before each test also generate 10 TLR for each item by running JMeter script (Create_TLR.jmx) - enable both Check-in and Create_TLR steps. Important: if indexes were added, "ANALYZE table name" should be conducted to make index work.
  5. Compare test results.

Note - make sure to use the same list of items for Create_TLR.jmx script and Check-in script. Also, items should be selected for those instances which have 1 item per instance.

Grafana dashboard

Baseline (items without TLR)

1 user

http://carrier-io.int.folio.ebsco.com/grafana/d/SqzWB26nk/jmeter-performance-check-in-check-out?orgId=1&from=1692358118565&to=1692360062513&var-percentile=95&var-test_type=fix_load&var-test=circulation_checkIn_nolana3&var-env=int&var-grouping=1s&var-low_limit=250&var-high_limit=750&var-db_name=jmeter&var-sampler_type=All

8 users

http://carrier-io.int.folio.ebsco.com/grafana/d/SqzWB26nk/jmeter-performance-check-in-check-out?orgId=1&from=1692362736626&to=1692364709022&var-percentile=95&var-test_type=fix_load&var-test=circulation_checkIn_nolana3&var-env=int&var-grouping=1s&var-low_limit=250&var-high_limit=750&var-db_name=jmeter&var-sampler_type=All

25 users

http://carrier-io.int.folio.ebsco.com/grafana/d/SqzWB26nk/jmeter-performance-check-in-check-out?orgId=1&from=1692607012293&to=1692609532152&var-percentile=95&var-test_type=fix_load&var-test=circulation_checkIn_nolana3&var-env=int&var-grouping=1s&var-low_limit=250&var-high_limit=750&var-db_name=jmeter&var-sampler_type=All

Verification (items with 10 TLRs)

1 user

http://carrier-io.int.folio.ebsco.com/grafana/d/SqzWB26nk/jmeter-performance-check-in-check-out?orgId=1&from=1692636096938&to=1692638161401&var-percentile=95&var-test_type=fix_load&var-test=circulation_checkIn_nolana3&var-env=int&var-grouping=1s&var-low_limit=250&var-high_limit=750&var-db_name=jmeter&var-sampler_type=All

8 users

http://carrier-io.int.folio.ebsco.com/grafana/d/SqzWB26nk/jmeter-performance-check-in-check-out?orgId=1&from=1692677697470&to=1692680390829&var-percentile=95&var-test_type=fix_load&var-test=circulation_checkIn_nolana3&var-env=int&var-grouping=1s&var-low_limit=250&var-high_limit=750&var-db_name=jmeter&var-sampler_type=All

25 users

http://carrier-io.int.folio.ebsco.com/grafana/d/SqzWB26nk/jmeter-performance-check-in-check-out?orgId=1&from=1692700591022&to=1692703522031&var-percentile=95&var-test_type=fix_load&var-test=circulation_checkIn_nolana3&var-env=int&var-grouping=1s&var-low_limit=250&var-high_limit=750&var-db_name=jmeter&var-sampler_type=All