PTF - Export deleted MARC authority records (Quesnelia) [ECS]

Overview

  • This document contains the results of testing of export deleted MARC authority records via API on the Quesnelia [ECS] release on qcon environment. 

PERF-897 - Getting issue details... STATUS  

Summary

  • Export deleted MARC authority records tests finished successfully on qcon environment using  100K, 300K and 646K records.
  • Comparing Test Duration and Response time between tests with 100K, 300K and 646K records 
    • Test Duration grew up according to grew records count.
    • Response time for 100k and 300k records almost the same, but it grew up almost in two times compared 100k and 646k records.
  • During testing, we noticed that mod-entities-links module used 53% CPU in spikes for 300k, but for 646k records used 39% CPU.
  • No memory leaks are observed.
  • After the first part of the tests, the database was cleaned up by removing deleted MARC authority records. This cleanup negatively affected the duration and response time for the 100k records in the repeated test.

Test Runs 

Test №ScenarioTest ConditionsResults
1Export deleted MARC authority records via API

100k deleted records

Completed
2300k deleted recordsCompleted
3646k deleted recordsCompleted

Test Results

This table contains durations for export deleted MARC authority records and response time (Average) for GET authority-storage/authorities endpoint

ProfileTest Conditions

Test

Duration  sec

Response time Average sec


GET_authority-storage/authorities

Export deleted MARC authority records via API

100k13.3170.261
300k29.1090.288
646k90.0450.514

Export deleted MARC authority records via API

(repeated tests)

100k25.8920.512
300k36.1730.358


Resource utilization for Test №1

 Resource utilization table
CPURAM
mod-entities-links-b17%mod-inventory-b55%
mod-inventory-b10%mod-data-import-b47%
mod-quick-marc-b6.60%mod-circulation-item-b44%
mod-pubsub-b5.50%mod-source-record-storage-b41%
mod-di-converter-storage-b2.10%mod-source-record-manager-b40%
mod-feesfines-b2.00%mod-entities-links-b37%
mod-configuration-b2.00%okapi-b32%
mod-source-record-manager-b1.80%mod-feesfines-b31%
pub-okapi1.60%mod-quick-marc-b30%
mod-source-record-storage-b1.30%mod-di-converter-storage-b29%
okapi-b1.20%mod-patron-blocks-b29%
mod-data-import-b1.00%mod-configuration-b28%
nginx-okapi1.00%mod-users-bl-b26%
mod-remote-storage-b0.80%mod-pubsub-b24%
mod-authtoken-b0.60%mod-authtoken-b19%
mod-circulation-storage-b0.50%mod-circulation-storage-b18%
mod-users-bl-b0.50%mod-remote-storage-b16%
mod-circulation-b0.30%mod-inventory-storage-b13%
mod-patron-blocks-b0.20%nginx-okapi4.00%

Service CPU Utilization

Here we can see that mod-entities-links used 18% CPU in spikes.

Service Memory Utilization

Here we can see that all modules show a stable trend.

DB CPU Utilization

DB CPU was 12%.

DB Connections

Max number of DB connections was 1355.

DB load

                                                                                                                     

Top SQL-queries


#TOP 5 SQL statements
1
select count(aa1_0.id) from authority_archive aa1_0 where aa1_0.deleted=$1 and ?=?
2
select this_.fl_id as fl_id1_53_0_, this_.fl_family as fl_famil2_53_0_, this_.fl_name as fl_name3_53_0_, this_.fl_owner as fl_owner4_53_0_ from mod_serials_management__system.federation_lock this_ 
where this_.fl_name=$1 and this_.fl_family=$2 limit $3 for update of this_
3
select aa1_0.id,aa1_0.source_file_id,aa1_0.created_by_user_id,aa1_0.created_date,aa1_0.deleted,aa1_0.heading,aa1_0.heading_type,aa1_0.identifiers,aa1_0.natural_id,aa1_0.notes,aa1_0.saft_headings,
aa1_0.sft_headings,aa1_0.source,aa1_0.subject_heading_code,aa1_0.updated_by_user_id,aa1_0.updated_date,aa1_0._version from authority_archive aa1_0 where aa1_0.deleted=$1 and 1=1
offset $2 rows fetch first $3 rows only
4
SELECT jsonb FROM cs00000int_mod_permissions.permissions
5
SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull OR (t.typtype = ? AND t.typnotnull) AS attnotnull,a.atttypmod,a.attlen,t.typtypmod,row_number() 
OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, nullif(a.attidentity, ?) as attidentity,nullif(a.attgenerated, ?) as attgenerated,pg_catalog.pg_get_expr(def.adbin, def.adrelid)
AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) J

Resource utilization for Test №2

 Resource utilization table
CPURAM
mod-entities-links-b52%mod-inventory-b55%
mod-inventory-b10%mod-data-import-b47%
mod-quick-marc-b6.90%mod-circulation-item-b44%
mod-pubsub-b5.50%mod-source-record-storage-b41%
nginx-okapi5.30%mod-source-record-manager-b40%
pub-okapi4.80%mod-entities-links-b38%
mod-configuration-b3.10%okapi-b32%
okapi-b2.10%mod-feesfines-b31%
mod-feesfines-b2.10%mod-quick-marc-b30%
mod-di-converter-storage-b2.00%mod-di-converter-storage-b29%
mod-source-record-manager-b1.70%mod-patron-blocks-b29%
mod-source-record-storage-b1.30%mod-configuration-b28%
mod-data-import-b1.10%mod-users-bl-b26%
mod-users-bl-b1.00%mod-pubsub-b24%
mod-authtoken-b0.80%mod-authtoken-b19%
mod-remote-storage-b0.70%mod-circulation-storage-b18%
mod-circulation-storage-b0.60%mod-remote-storage-b17%
mod-circulation-b0.30%mod-inventory-storage-b13%
mod-patron-blocks-b0.20%nginx-okapi4.00%

Service CPU Utilization

Here we can see that mod-entities-links used 53% CPU in spikes.

Service Memory Utilization

Here we can see that all modules show a stable trend.

DB CPU Utilization

DB CPU was 23%.

DB Connections

Max number of DB connections was 1350.

DB load

                                                                                                                     

Top SQL-queries


#TOP SQL statements
1
select aa1_0.id,aa1_0.source_file_id,aa1_0.created_by_user_id,aa1_0.created_date,aa1_0.deleted,aa1_0.heading,aa1_0.heading_type,aa1_0.identifiers,aa1_0.natural_id,aa1_0.notes,aa1_0.saft_headings,aa1_0.sft_headings,
aa1_0.source,aa1_0.subject_heading_code,aa1_0.updated_by_user_id,aa1_0.updated_date,aa1_0._version from authority_archive aa1_0 where aa1_0.deleted=$1 and 1=1 offset $2 rows fetch first $3 rows only
2
select count(aa1_0.id) from authority_archive aa1_0 where aa1_0.deleted=$1 and ?=?
3
SELECT cs00000int_0004_mod_circulation_storage.count_estimate(?)
4
select this_.fl_id as fl_id1_44_0_, this_.fl_family as fl_famil2_44_0_, this_.fl_name as fl_name3_44_0_, this_.fl_owner as fl_owner4_44_0_ from mod_agreements__system.federation_lock this_ where this_.fl_name=$1 and this_.fl_family=$2 limit $3 for update of this_

Resource utilization for Test №3

 Resource utilization table
CPURAM
mod-entities-links-b38%mod-data-import-b49%
mod-inventory-b14%mod-circulation-item-b44%
mod-quick-marc-b8.60%mod-source-record-storage-b42%
mod-pubsub-b5.50%mod-source-record-manager-b41%
nginx-okapi3.80%mod-entities-links-b38%
pub-okapi3.30%mod-inventory-b37%
mod-di-converter-storage-b2.10%okapi-b32%
mod-feesfines-b2.10%mod-di-converter-storage-b32%
mod-configuration-b1.80%mod-feesfines-b31%
mod-source-record-manager-b1.70%mod-quick-marc-b31%
okapi-b1.50%mod-patron-blocks-b29%
mod-source-record-storage-b1.30%mod-configuration-b28%
mod-data-import-b1.20%mod-users-bl-b26%
mod-remote-storage-b0.80%mod-inventory-storage-b25%
mod-authtoken-b0.60%mod-pubsub-b24%
mod-circulation-storage-b0.50%mod-authtoken-b19%
mod-users-bl-b0.50%mod-circulation-storage-b18.00%
mod-circulation-b0.30%mod-remote-storage-b17.00%
mod-patron-blocks-b0.30%nginx-okapi4%

Service CPU Utilization

Here we can see that mod-entities-links used 39% CPU in spikes.

Service Memory Utilization

Here we can see that all modules show a stable trend.

DB CPU Utilization

DB CPU was 43%.

DB Connections

Max number of DB connections was 1355.

DB load

                                                                                                                     

Top SQL-queries


#TOP 5 SQL statements
1
select aa1_0.id,aa1_0.source_file_id,aa1_0.created_by_user_id,aa1_0.created_date,aa1_0.deleted,aa1_0.heading,aa1_0.heading_type,aa1_0.identifiers,aa1_0.natural_id,aa1_0.notes,aa1_0.saft_headings,
aa1_0.sft_headings,aa1_0.source,aa1_0.subject_heading_code,aa1_0.updated_by_user_id,aa1_0.updated_date,aa1_0._version from authority_archive aa1_0 where aa1_0.deleted=$1 and 1=1
offset $2 rows fetch first $3 rows only
2
WITH cte AS (SELECT count(*) AS total_count FROM cs00000int_0001_mod_source_record_manager.job_execution WHERE subordination_type <> ? AND ? AND status IN (?, ?, ?) AND job_profile_id NOT IN (?, ?) 
AND file_name NOT IN (?) AND subordination_type NOT IN (?) AND NOT job_profile_hidden AND NOT is_deleted) SELECT j.*, cte.*, p.total_records_count total,
p.succeeded_records_count + p.error_records_count currently_processed, (select jsonb_agg(x) composite_data from (select status, count(?) cnt, sum(p
3
select count(aa1_0.id) from authority_archive aa1_0 where aa1_0.deleted=$1 and ?=?
4
WITH cte AS (SELECT count(*) AS total_count FROM cs00000int_0001_mod_source_record_manager.job_execution WHERE subordination_type <> ? AND ? AND status <> ? AND ui_status IN (?, ?, ?) 
AND subordination_type NOT IN (?) AND NOT job_profile_hidden AND NOT is_deleted) SELECT j.*, cte.*, p.total_records_count total, p.succeeded_records_count + p.error_records_count currently_processed,
 (select jsonb_agg(x) composite_data from (select status, count(?)  cnt, sum(p1.total_records_count) total_records_co
5
select this_.fl_id as fl_id1_53_0_, this_.fl_family as fl_famil2_53_0_, this_.fl_name as fl_name3_53_0_, this_.fl_owner as fl_owner4_53_0_ from mod_serials_management__system.federation_lock this_ 
where this_.fl_name=$1 and this_.fl_family=$2 limit $3 for update of this_

Appendix

Infrastructure

PTF - environment Quesnelia (qcon)

  • 10 m6i.2xlarge EC2 instances located in US East (N. Virginia)us-east-1

  • 1 instance of db.r6.xlarge database instance: Writer instance

  • OpenSearch

    • domain: fse

    • Number of nodes: 6

    • Version: OpenSearch_2_7_R20240502

  • MSK - tenat

    • 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

    • Kafka consolidated topics enabled


 Quesnelia modules memory and CPU parameters
ModuleTask Def. RevisionModule VersionTask CountMem Hard LimitMem Soft limitCPU unitsXmxMetaspaceSizeMaxMetaspaceSize
qcon-pvt








Thu May 23 10:47:25 UTC 2024








mod-remote-storage1mod-remote-storage:3.2.024920447210243960512512
mod-finance-storage1mod-finance-storage:8.6.021024896102470088128
mod-ncip1mod-ncip:1.14.42102489612876888128
mod-agreements1mod-agreements:7.0.0215921488128000
mod-ebsconet1mod-ebsconet:2.2.0212481024128700128256
mod-consortia1mod-consortia:1.1.023072204812820485121024
mod-organizations1mod-organizations:1.9.02102489612870088128
mod-serials-management1mod-serials-management:1.0.02248023121281792384512
mod-settings1mod-settings:1.0.32102489620076888128
mod-search9mod-search:3.3.0-SNAPSHOT.224225922480204814405121024
edge-dematic1edge-dematic:2.2.01102489612876888128
mod-data-import1mod-data-import:3.1.01204818442561292384512
mod-tags1mod-tags:2.2.02102489612876888128
mod-authtoken3mod-authtoken:2.15.121440115251292288128
edge-courses1edge-courses:1.4.02102489612876888128
mod-inventory-update1mod-inventory-update:3.3.02102489612876888128
mod-notify1mod-notify:3.2.02102489612876888128
mod-configuration1mod-configuration:5.10.02102489612876888128
mod-orders-storage1mod-orders-storage:13.7.02102489651270088128
edge-caiasoft1edge-caiasoft:2.2.02102489612876888128
mod-login-saml1mod-login-saml:2.8.02102489612876888128
mod-erm-usage-harvester1mod-erm-usage-harvester:4.5.02102489612876888128
mod-password-validator1mod-password-validator:3.2.0214401298128768384512
mod-licenses1mod-licenses:6.0.02248023121281792384512
mod-gobi1mod-gobi:2.8.02102489612870088128
mod-bulk-operations1mod-bulk-operations:2.0.023072260010241536384512
mod-fqm-manager1mod-fqm-manager:2.0.12300026001282048384512
edge-dcb1edge-dcb:1.1.02102489612876888128
mod-graphql1mod-graphql:1.12.12102489612876888128
mod-finance1mod-finance:4.9.02102489612870088128
mod-erm-usage1mod-erm-usage:4.7.02102489612876888128
mod-batch-print1mod-batch-print:1.1.02102489612876888128
mod-copycat1mod-copycat:1.6.02102451212876888128
mod-lists1mod-lists:2.0.02300026001282048384512
mod-entities-links1mod-entities-links:3.0.0225922480400144001024
mod-permissions2mod-permissions:6.5.02168415445121024384512
pub-edge1pub-edge:2023.06.142102489612876800
mod-orders1mod-orders:12.8.022048144010241024384512
edge-patron1edge-patron:5.1.02102489625676888128
edge-ncip1edge-ncip:1.9.22102489612876888128
mod-users-bl1mod-users-bl:7.7.021440115251292288128
mod-invoice1mod-invoice:5.8.021440115251292288128
mod-inventory-storage2mod-inventory-storage:27.2.0-SNAPSHOT.73824096369020483076384512
mod-user-import1mod-user-import:3.8.02102489612876888128
mod-sender1mod-sender:1.12.02102489612876888128
edge-oai-pmh1edge-oai-pmh:2.9.021512136010241440384512
mod-data-export-worker1mod-data-export-worker:3.2.123072204810242048384512
mod-rtac1mod-rtac:3.6.02102489612876888128
mod-circulation-storage1mod-circulation-storage:17.2.022880259215361814384512
mod-source-record-storage1mod-source-record-storage:5.8.025600500020483500384512
mod-calendar1mod-calendar:3.1.02102489612876888128
mod-event-config1mod-event-config:2.7.02102489612876888128
mod-courses1mod-courses:1.4.102102489612876888128
mod-circulation-item1mod-circulation-item:1.0.021024896128000
mod-inventory3mod-inventory:20.2.022880259210241814384512
mod-email1mod-email:1.17.02102489612876888128
mod-circulation2mod-circulation:24.2.122880259215361814384512
mod-pubsub1mod-pubsub:2.13.02153614401024922384512
mod-di-converter-storage2mod-di-converter-storage:2.2.22102489612876888128
edge-orders1edge-orders:3.0.02102489612876888128
edge-rtac1edge-rtac:2.7.12102489612876888128
mod-users1mod-users:19.3.12102489612876888128
mod-template-engine1mod-template-engine:1.20.02102489612876888128
mod-patron-blocks1mod-patron-blocks:1.10.021024896102476888128
mod-audit1mod-audit:2.9.02102489612876888128
edge-fqm1edge-fqm:2.0.02102489612876888128
mod-source-record-manager1mod-source-record-manager:3.8.025600500020483500384512
nginx-edge1nginx-edge:2023.06.1421024896128000
mod-quick-marc1mod-quick-marc:5.1.01228821761281664384512
nginx-okapi1nginx-okapi:2023.06.1421024896128000
okapi-b1okapi:5.3.03168414401024922384512
mod-feesfines1mod-feesfines:19.1.02102489612876888128
mod-invoice-storage1mod-invoice-storage:5.8.021872153610241024384512
mod-service-interaction1mod-service-interaction:4.0.12204818442561290384512
mod-dcb1mod-dcb:1.1.02102489612876888128
mod-patron1mod-patron:6.1.02102489612876888128
mod-data-export1mod-data-export:5.0.01204815241024000
mod-oai-pmh1mod-oai-pmh:3.13.024096369020483076384512
edge-connexion1edge-connexion:1.2.02102489612876888128
mod-notes1mod-notes:5.2.021024896128952384512
mod-kb-ebsco-java1mod-kb-ebsco-java:4.0.02102489612876888128
mod-login1mod-login:7.11.02144012981024768384512
mod-organizations-storage1mod-organizations-storage:4.7.02102489612870088128
mod-data-export-spring1mod-data-export-spring:3.2.01204818442561536384512
pub-okapi1pub-okapi:2023.06.142102489612876800
mod-eusage-reports1mod-eusage-reports:2.1.12102489612876888128


Methodology/Approach

Export deleted MARC authority records were started from CarrierIO (QCON_ECS_Export_Deleted_Recordson a qcon Quesnelia [ECS] environment..

Test runs:

  • Test 1: Tested export 100k deleted MARC authority records,  started on Central Office tenant(cs00000int) with one user.
  • Test 2: Tested export 300k deleted MARC authority records,  started on Central Office tenant(cs00000int) with one user.
  • Test 3: Tested export 646k deleted MARC authority records,  started on Central Office tenant(cs00000int) with one user.
  • After tests all deleted MARC authority records were removed from Database and added again, then repeat tests with 100k and 300k MARC authority records on Central Office tenant(cs00000int) with one user.

At the time of the test run, Grafana was not available. As a result, response times for Export deleted MARC authority records were taken from a .jtl files. These results were visualized in JMeter using a Listener (Response Times Over Time).