[Sunflower] [non-ECS] edge-patron - Sunflower Parameters Testing
Overview
This document summarizes the results of edge-patron API testing with different parameters and its values in edge-patron service and mod-circulation service. There're just two requests:
GET /patron/account/{id}?includeLoans=true&includeCharges=true&includeHolds=true&apiKey=<API_KEY> This one retrieves data by user id
POST /patron/account/{id}/instance/{instanceId}/hold This one creates requests for the item by instance id for the specified user id
Tests carried out in Sunflower release on a non-ecs environment ( secp1 in our case, central tenant - fs09000000).
Jira
PERF-1165: edge-patron - Sunflower Parameters TestingClosed
Summary
All tests completed successfully. Tested API requests with default values perform almost on the same level if to compare with different combinations of parameters except of test #5 with 30 milliseconds improvement where null_keycloak_key_cache_ttl_ms parameter was 15000.
GET /patron/account/{id}
Best performance: Test #4 (136.02 ms, -8.62 ms vs baseline).
Most regression: Test #7 (161.30 ms, +16.66 ms vs baseline).
POST /patron/account/{externalSystemId}/instance/{instanceId}/hold
Best performance: Test #5 (442.29 ms, -31.04 ms vs baseline).
Most regression: Test #8 (512.99 ms, +39.66 ms vs baseline).
Memory consumption for all modules shows a stable trend. No memory leaks are suspected. Edge-patron service used 30% of memory during all tests.
Service CPU utilization corresponded to the load and almost didn't grow during tests due to small load.
DB CPU utilization grew from 8% to 14% mostly. Some spikes up to 18% happened.
Additional retesting of test #6 was performed to see how not warmed up environment can affect the results. There's a possibility of additional latency 50-100 milliseconds if to measure performance without warming up.
Test runs
Test # | Module | Parameter | Value | Deployment |
|---|---|---|---|---|
Baseline | edge-patron | default | none | secp1-edge-patron:8 |
#1 | edge-patron | keycloak_key_cache_ttl_ms | 3600000 | secp1-edge-patron:9 |
#2 | edge-patron | keycloak_key_cache_ttl_ms | 1800000 | secp1-edge-patron:10 |
#3 | edge-patron | keycloak_key_cache_ttl_ms | 900000 | secp1-edge-patron:11 |
#4 | edge-patron | null_keycloak_key_cache_ttl_ms | 30000 | secp1-edge-patron:12 |
#5 | edge-patron | null_keycloak_key_cache_ttl_ms | 15000 | secp1-edge-patron:13 |
#6 | edge-patron | keycloak_key_cache_capacity | 1000 | secp1-edge-patron:14 |
#7 | edge-patron | keycloak_key_cache_capacity | 500 | secp1-edge-patron:15 |
#8 | edge-patron | keycloak_key_cache_capacity | 2000 | secp1-edge-patron:16 |
#9 | edge-patron | keycloak_key_cache_capacity | 250 | secp1-edge-patron:18 |
#10 | mod-circulation | HTTP_MAXPOOLSIZE | 100 | secp1-mod-circulation:9 |
#11 | mod-circulation | HTTP_MAXPOOLSIZE | 50 | secp1-mod-circulation:10 |
#12 | mod-circulation | HTTP_MAXPOOLSIZE | 200 | secp1-mod-circulation:11 |
Test Results
The deltas are not significant to take into account.
Test # | GET Avg (ms) | POST Avg (ms) | Δ GET vs Baseline | Δ POST vs Baseline |
|---|---|---|---|---|
Baseline | 144.64 | 473.33 | – | – |
#1 | 152.19 | 469.8 | 🟠 +7.55 | 🟢 -3.53 |
#2 | 144.3 | 459.96 | 🟢 -0.34 | 🟢 -13.37 |
#3 | 137.95 | 442.63 | 🟢 -6.69 | 🟢 -30.70 |
#4 | 136.02 | 442.89 | 🟢 -8.62 | 🟢 -30.44 |
#5 | 138.14 | 442.29 | 🟢 -6.50 | 🟢 -31.04 |
#6 | 150.99 | 468.56 | 🟠 +6.35 | 🟢 -4.77 |
#7 | 161.3 | 496.55 | 🟠 +16.66 | 🟠 +23.22 |
#8 | 159.38 | 512.99 | 🟠 +14.74 | 🟠 +39.66 |
#9 | 151.11 | 492.36 | 🟠 +6.47 | 🟠 +19.03 |
#10 | 155.71 | 508.45 | 🟠 +11.07 | 🟠 +35.12 |
#11 | 146.31 | 501.09 | 🟠 +1.67 | 🟠 +27.76 |
#12 | 147.75 | 494.7 | 🟠 +3.11 | 🟠 +21.37 |
Resource utilization
Service CPU Utilization
Average CPU utilization during the tests
Service name | Value |
|---|---|
mod-users-keycloak-b | 17.92294007 |
mod-inventory-b | 8.827531636 |
mod-pubsub-b | 8.125584744 |
mod-inventory-storage-b | 6.453365187 |
mod-users-bl-b | 4.592981165 |
mod-circulation-item-b | 4.506043517 |
mod-circulation-b | 4.169754641 |
mod-circulation-storage-b | 3.716903571 |
mod-circulation-bff-b | 3.429674114 |
mod-patron-blocks-b | 1.144754505 |
Service Memory Utilization
Memory usage was on level 30% for edge-patron service during all tests
DB CPU Utilization
DB CPU spiked to 18% maximum for all tests
DB Connections
DB connections were 1330 during all tests
DB load
Tests baseline - #5
Tests #6 - #12
Appendix
Infrastructure
PTF - environment Sunflower (secp1)
14 r7g.2xlarge EC2 instances located in US East (N. Virginia)us-east-1
1 database instance, writer
Name: db.r6g.xlarge
Memory GIB: 32 GB
vCPUs: 4 vCPUs
MSK fse-test
4 kafka.m7g.xlarge brokers in 2 zones
Apache Kafka version 3.7.x
EBS storage volume per broker 300 GiB
auto.create.topics.enable=true
log.retention.minutes=480
default.replication.factor=2