CICO + DI "random_page_cost" DB parameter experiments Test Report (Sunflower) [Eureka] [ECS]
Overview
Combined Check-in Check-out (CICO) + Data Import workflow on Eureka based environment in Sunflower ECS release.
The purpose of testing is to determine whether setting
random_page_costto 1.1 has any impact on database behavior or performance.Test was carried out on member tenant.
Compare results with
random_page_costdefault =4and1.1.The current ticket: https://folio-org.atlassian.net/browse/PERF-1157
Summary
Check-In Check-Out tests finished successfully with no failed requests.
Data Import finished successfully during Test 1 - Test 2.
RDS CPU utilization showed an approximate 10% reduction during CICO after adjusting
random_page_costto 1.1.Response times for Check-in and Check-Out are approximately the same, within the standard deviation.
Test Runs
The following table contains tests configuration information:
Test # | Test Conditions | Duration | random_page_cost parameter | Notes |
|---|---|---|---|---|
1 | 20 users CICO + DI (Create PTF 2 profile and 25K records) | 45 min | 4 | DI initiated 15 min after test start |
2 | 20 users CICO + DI (Create PTF 2 profile and 25K records) | 45 min | 1.1 | DI initiated 15 min after test start |
Results Comparison
Response time comparison (in milliseconds) across test phases:
CICO
CICO + DI
CICO after DI completion
CICO | random_page_cost = 4 | random_page_cost = 1.1 | random_page_cost = 1.1 VS 4 | |||||||||
Transaction | NumberOfSamples | Average | pct95 | NumberOfSamples | Average | pct95 | Delta, samplers | Delta,% | Delta, avg | Delta,% | Delta,pc95 | Delta,% |
Check-In Controller | 1447 | 494 | 676 | 1518 | 468 | 723 | 71 | 5% | -26 | -5% | 47 | 7% |
Check-Out Controller | 1860 | 1211 | 1553 | 1997 | 1167 | 1631 | 137 | 7% | -44 | -4% | 78 | 5% |
POST_circulation/check-in-by-barcode (Submit_barcode_checkin) | 1447 | 271 | 420 | 1519 | 257 | 434 | 72 | 5% | -14 | -5% | 14 | 3% |
POST_circulation/check-out-by-barcode (Submit_barcode_checkout) | 1861 | 360 | 511 | 2000 | 360 | 598 | 139 | 7% | 0 | 0% | 87 | 17% |
GET_circulation/loans (Submit_barcode_checkout) | 1861 | 169 | 285 | 2000 | 159 | 266 | 139 | 7% | -10 | -6% | -19 | -7% |
CICO + DI | random_page_cost = 4 | random_page_cost = 1.1 | random_page_cost = 1.1 VS 4 | |||||||||
Transaction | NumberOfSamples | Average | pct95 | NumberOfSamples | Average | pct95 | Delta, samplers | Delta,% | Delta, avg | Delta,% | Delta,pc95 | Delta,% |
Check-In Controller | 1103 | 1324 | 2136 | 1065 | 1365 | 2186 | -38 | -3% | 41 | 3% | 50 | 2% |
Check-Out Controller | 1491 | 4130 | 5732 | 1395 | 4473 | 5669 | -96 | -6% | 343 | 8% | -63 | -1% |
POST_circulation/check-in-by-barcode (Submit_barcode_checkin) | 1101 | 729 | 1261 | 1062 | 754 | 1410 | -39 | -4% | 25 | 3% | 149 | 12% |
POST_circulation/check-out-by-barcode (Submit_barcode_checkout) | 1492 | 1583 | 2280 | 1394 | 1778 | 2567 | -98 | -7% | 195 | 12% | 287 | 13% |
GET_circulation/loans (Submit_barcode_checkout) | 1491 | 569 | 961 | 1392 | 589 | 944 | -99 | -7% | 20 | 4% | -17 | -2% |
CICO after DI completion | random_page_cost = 4 | random_page_cost = 1.1 | random_page_cost = 1.1 VS 4 | |||||||||
Transaction | NumberOfSamples | Average | pct95 | NumberOfSamples | Average | pct95 | Delta, samplers | Delta,% | Delta, avg | Delta,% | Delta,pc95 | Delta,% |
Check-In Controller | 1456 | 533 | 1068 | 1374 | 513 | 989 | -82 | -6% | -20 | -4% | -79 | -7% |
Check-Out Controller | 1882 | 1594 | 2897 | 1798 | 1543 | 2708 | -84 | -4% | -51 | -3% | -189 | -7% |
POST_circulation/check-in-by-barcode (Submit_barcode_checkin) | 1456 | 258 | 646 | 1373 | 246 | 606 | -83 | -6% | -12 | -5% | -40 | -6% |
POST_circulation/check-out-by-barcode (Submit_barcode_checkout) | 1882 | 509 | 1060 | 1794 | 507 | 1109 | -88 | -5% | -2 | 0% | 49 | 5% |
GET_circulation/loans (Submit_barcode_checkout) | 1880 | 222 | 464 | 1794 | 202 | 442 | -86 | -5% | -20 | -9% | -22 | -5% |
Resources Utilization
CPU Utilization
Top used modules across test phases: CICO, CICO + DI, CICO after DI completion:
Test #1
Test #2
Memory Utilization
Memory usage showed stable trends with no spikes for both Test #1 and Test #2:
Test #1
Test #2
RDS CPU Utilization
RDS CPU utilization showed around 10% reduction for CICO phases during Test #2 (with adjusted random_page_cost to 1.1):
Test #1
Test #2
RDS Database Connections
Connections for both Test #1 and Test #2 remained approximately the same:
Test #1
Test #2
Database load
Test #1
Test #2
Database health metrics
Tuples Read rate dropped from max 18.65M/sec (Test #1) to 4.546M/sec (Test #2), indicating more efficient query execution with adjusted random_page_cost:
Test #1
Test #2
Appendix
Infrastructure
PTF - environment secon
14 r7g.2xlarge EC2 instances located in US East (N. Virginia)us-east-1
1 instance of db.r7g.xlarge database instance: Writer instance
MSK fse-test
4 kafka.m7g.xlarge brokers in 2 zones (2 brokers per zone)
Apache Kafka version 3.7.x, metadata mode - KRaft
EBS storage volume per broker 300 GiB
auto.create.topics.enable=true
log.retention.minutes=480
default.replication.factor=3
revision - 26
Methodology/Approach
1. Preparation Steps:
The random_page_cost parameter configuration at the DB instance level via the parameter group.
For the Test 1, the default value of 4 was used.
For the Test 2, the value was adjusted to 1.1.
2. Data preparation scripts.
Data preparation for each test takes up to 10 minutes and consists of truncating involved in testing tables, populating data and updating statuses of items.
To prepare data establish connection by AWS key
Run CICO_db_preparation.sh script located in /scripts folder. Before use the file tenats.csv to edit the list of tenants to restore the database.
Files location: Buckets/fse-ptf/Scripts/CICO/Secon/
3. Test Configuration:
Run CICO test with 20 concurrent users for 45 minutes.
To start test from AWS instance (load generator) use template for the command. Test locally before start.
LG jmeter command
sh jmeter.sh -n -t /home/ptf/testdata/secon/CICO/circulation_checkInCheckOut_secon.jmx -l /home/ptf/testdata/secon/CICO/secon_20vusers.jtl -j /home/ptf/testdata/secon/CICO/secon_jmeter.log -JGlobal_duration=2700 -JCICO_vusers=20 |
Run a Data Import on member tenant after waiting for 15 minutes.