Create loans POST /loan-storage/loans API Test Report (Honeysuckle)
WIP
Work in progress...
Overview
In this workflow, we are checking the performance of POST /loan-storage/loans API for creating loans in bulk in the Honeysuckle release https://folio-org.atlassian.net/browse/PERF-148 IC's normally create loans in bulk using mod-circulation business logic which is slow. This is an investigation if the same can be done using the mod-circulation-storage module bypassing business logic.
We tested with 1 virtual user for 30 minutes.
Backend:
mod-circulation-storage-12.1.4
okapi-4.3.3
mod-authtoken-2.6.0
Environment:
7.2 million UChi SRS records
7.2 million inventory records
63 FOLIO back-end modules deployed in 110 ECS services
3 okapi ECS services
10 m5.large EC2 instances
1 writer db.r5.xlarge 1 reader db.r5.xlarge AWS RDS instance
INFO logging level
High-Level Summary
For 1 user, in 30 minutes, we can create on average 72,180 loans in bulk by making a request directly to storage API POST /loan-storage/loans. Therefore, we can create 144,361 loans in 1 hour.
On average it takes 25 milliseconds to create 1 loan
Test Runs
1 user can create 71099 loans in 30 minutes by making a request to POST /loan-storage/loans
Requests | Duration | Total loan requests | Success | Fail | Requests/sec | Min | 75th pct | Max(millisecond) | Average (millisecond) | Latency (milliseconds) |
|---|---|---|---|---|---|---|---|---|---|---|
mod-circulation-storage POST /loan-storage/loans | 30 min | 71099 | 71099 | 0 | 39.499 | 0.018 | 25 | 34.9 | 25 | 37 |
SQL query involved during POST /loan-storage/loans
SQL query | Response time (Avg) |
|---|---|
INSERT INTO fs09000000_mod_circulation_storage.loan (id, jsonb) VALUES ($1, $2) RETURNING jsonb | 1 millisecond |
CPU Utilization
CPU utilization increases significantly for okapi but for other modules, it is relatively normal.
Service Memory Utilization
Memory is stable for all modules involved. Okapi is relatively higher but stable at 90%
Appendix
For more raw data of the test run please see the attached for Honeysuckle.