OAI-PMH Baseline report (Honeysuckle)
















PERF-122 - Getting issue details... STATUS

Overview

The purpose of this document is to obtain baseline numbers for the OAI-PMH workflow from the edge API.  These numbers include typical resource usage for one user test and response times for different calls.

There are two types of calls, and the only difference is in "metadataPrefix" which can be "marc21" or "marc21_withholdings".  Each of these calls may have a "startDate" parameter.

Backend

  • mod-oai-pmh:3.2.2, mod-oai-pmh:3.2.4
  • edge-oai-pmh:2.3.0
  • mod-inventory-storage:19.4.3
  • okapi:4.2.2

Environment:

  • 61 back-end modules deployed in 110 ECS services
  • 3 okapi ECS services
  • 8 m5.large  EC2 instances
  • 2 db.r5.xlarge AWS RDS instance (1 reader, 1 writer)
  • 1 mod-oai-pmh ECS services (to easy troubleshoot)
  • INFO Okapi logging level
  • Load balancer timeouts increased to 4000 seconds.
  • nginx timeouts extended to 3600 seconds.

Summary

"marc21" metadataPrefix working much faster than "marc21_withholdings" . Few basics numbers about both matadataPrefix :

1) marc21 metadataPrefix:

  • Response time for both tests (including start date and without it) is 6.5 - 6.6 seconds on 75%/95% percentiles;
  • mod-oai-pmh CPU usage did not grow higher than ~30%. (usually it not higher than 15%);
  • Other modules didn't show visible RAM usage. Ram usage of OAI_PMH was near 110 -119 %;
  • RDS CPU usage usually stay on 15 % rate. 

2) marc21_withholdings metadataPrefix:

  • Response time for test without  start date 483-495 seconds on 75%/95% percentiles;
  • Response time for test with start date is 530-539 seconds on 75%/95% percentiles;
  • Higher CPU usage on modules than in previous cases.
    • 170-200% on mod-inventory-storage;
    • 9-100% on mod OAI-PMH;
  • RAM usage mod-oai-pmh was near 110 -119 %;
  • RDS CPU usage was 60-70 %. 

3) The performance degrades as

  • The <tenantId>_mod-oai-pmh.instances table is filled up with records. When the number of records approaches 40M, a call [oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=${APIKey}&start=${Date}] that used to take 7 minutes now takes longer than 40 minutes.
  • After several runs (5-7), the oai-pmh calls take longer than 20 minutes even though the instances table is empty. mod-pubsub needs to be restarted for it to return results within 7 minutes again.
RequestAverage (sec)75th %tile (sec)95th %tile (sec)Request Rate (RPS)note
/oai?verb=ListRecords&metadataPrefix=marc21&apikey=<apiKey>6.5626.5926.6610.15
/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=<apiKey>452.200483.202495.3250.002
/oai?verb=ListRecords&metadataPrefix=marc21&apikey=<apiKey>&start=<date>6.5666.5926.6340.15
/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=<apiKey> &start=<date>521.345530.289539.2000.002
/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=<apiKey> &start=<date>462.685471.778485.8820.002Truncated mod_oai_pmh.instances table



Please Note: that on ptf env. getaway timeout value on public load-balancer was increased from 400 to 4000 seconds. While default value on our prod env. is 400 seconds, calls that includes marc21_withholdings metadataPrefix won't work and will fail with 504 "Getaway Timeout".

Test runs

Test

Virtual Users

RequestDuration (sec)Version OAI_PMHNotes
11GET https://<edge_url>/oai?verb=ListRecords&metadataPrefix=marc21&apikey=<apiKey>1800mod-oai-pmh:3.2.2
21GET https://<edge_url>/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=<apiKey>1800mod-oai-pmh:3.2.2
31GET https://<edge_url>/oai?verb=ListRecords&metadataPrefix=marc21&apikey=<apiKey>&start=<date>1800mod-oai-pmh:3.2.2
41GET https://<edge_url>/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=<apiKey> &start=<date>1800mod-oai-pmh:3.2.2
51GET https://<edge_url>/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=<apiKey> &start=<date>1800mod-oai-pmh:3.2.4Truncated _mod_oai_pmh.instances table
61GET https://<edge_url>/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=<apiKey>1800mod-oai-pmh:3.2.4Truncated _mod_oai_pmh.instances table


Detailed Results

Test 1

RequestTotal callsMin (sec)50th pct (sec)75th pct (sec)95th pct (sec)99th pct (sec)Max(sec)
/oai?verb=ListRecords&metadataPrefix=marc21&apikey=[APIKey]2835.3076.5626.5926.6616.7799.683


Service CPU usage

MOD OAI-PMH CPU usage 


MOD OAI-PMH Memory usage


Memory usage on other modules looks the same. 


DB CPU utilization:

Test 2

RequestTotalMin50th pct75th pct95th pct99th pctMax
/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=[APIKey]5427.606452.200483.202495.325495.325495.325

Service CPU usage:


mod-oai-pmh memory usage


DB CPU Usage 


Test 3


RequestTotalMin50th pct75th pct95th pct99th pctMax
/oai?verb=ListRecords&metadataPrefix=marc21&apikey=[APIKey]&start=2020-11-022835.3156.5666.5926.6346.6996.932


Service CPU usage:


MOD OAI-PMH CPU usage


RDS CPU usage



Test 4

RequestTotalMin50th pct75th pct95th pct99th pctMax
/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=[APIKey]&start=2020-11-024502.896521.345530.289539.200539.200539.200


Service CPU usage 



Mod Inventory storage CPU usage


MOD OAI-PMH cpu usage



RDS CPU usage


Test 5

RequestTotalReq/sMin50th pct75th pct95th pct99th pctMax
/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=[APIKey]&start=2020-11-0240.002430.239462.685471.778485.882485.882485.882


Service CPU usage:

Relevant modules: 

  • mod-oai-pmh - 165% -189%;
  • mod-inventory-storage - 160%-180%;
  • okapi - 30%;


Service Memory usage:





DB CPU usage:





Test 6 



RequestTotalMin50th pct75th pct95th pct99th pctMax
/oai?verb=ListRecords&metadataPrefix=marc21_withholdings&apikey=[APIKey]5401.649431.011433.710435.981435.981435.981

Service CPU usage:

mod-inventory-storage - 150%-220%

mod-oai-pmh - 130 -170

okapi 40-5% 

RDS CPU usage: