PTF - Performance Testing of Circulation Logs - Item Barcode Search

PTF - Performance Testing of Circulation Logs - Item Barcode Search

Overview

Summary

  • Performance testing of the Circulation Log Item Barcode Search was conducted against a dataset of 6M+ circulation log entries on the asptc2 environment. Two search types were evaluated — full barcode search and right-truncated barcode search — each tested across four offset levels and three filter combinations.

  • Full barcode search (Test №1) demonstrated stable performance, with average response times of 64–102 ms and 95th percentile under 208 ms across all offsets and filters. Pagination depth and filters had minimal impact on response times.

  • Right-truncated barcode search (Test №2) performed well under default and description filter conditions (avg 158–226 ms), but showed a slower performance with the date filter, where average response times spiked to ~2 seconds (~10× slower). This behavior is reflected in elevated DB CPU utilization (avg 13%, with spikes up to 15%).

  • Resource utilization remained moderate overall. The mod-audit service CPU averaged 22% (max 27%) during full barcode search and increased to 28% (max 31%) during right-truncated search, while memory usage stayed stable in both tests. DB CPU averaged 9% for full barcode search with no visible DB load. For right-truncated search, DB CPU varied significantly by filter: 7% without filters, 8% with the description filter, 13% with spikes to 15% when the date filter was applied — correlating directly with increased response times.

Recommendations & Jiras

https://folio-org.atlassian.net/browse/MODAUD-312

Test Runs

Test 

Search Type

Filters Tested

Pagination Tested

Status

TR-1

Full Barcode Search

None, Date Filter, Description Filter

LIMIT 100
OFFSET 0, 100K, 3.5M, 5.8M

Completed

TR-2

Right-Truncated Barcode Search

None, Date Filter, Description Filter

LIMIT 100
OFFSET 0, 100K, 3.5M, 5.8M

Completed

 

Results

Test №1

This table contains Circulation Log full item barcode search durations across multiple offsets and filter combinations.
Response times are stable across all offsets and filters. Averages range from 64 to 102 ms; 95th percentiles stay within 104–208 ms. Adding date or description filters does not impact. Pagination depth has no impact.

 

 

Default

With date filter

With description filter

Response Times, ms

Average

95% Line

Average

95% Line

Average

95% Line

LIMIT 100 OFFSET 0

102

208

69

115

77

138

LIMIT 100 OFFSET 100000

68

144

69

110

74

128

LIMIT 100 OFFSET 3500000

64

104

65

135

70

115

LIMIT 100 OFFSET 5800000 

77

127

72

127

72

117

 

Test №2
This table contains Circulation Log Right-Truncated item barcode search durations across multiple offset values and filter combinations.
Default and description-filtered queries show stable performance (avg 158–226 ms). However, the date filter shows average response times jumping to ~2 sec and 95th percentile exceeding 2,2sec. This pattern is consistent across all offset values.

 

 

Default

With date filter

With description filter

Response Times, ms

Average

95% Line

Average

95% Line

Average

95% Line

LIMIT 100 OFFSET 0

158

232

1972

2194

192

266

LIMIT 100 OFFSET 100000

174

259

2006

2268

226

326

LIMIT 100 OFFSET 3500000

171

252

2017

2287

210

310

LIMIT 100 OFFSET 5800000 

170

260

2006

2271

207

304

 

Resources Utilization for Test 1

Service CPU Utilization

mod-audit CPU averaged 22% (max 27%)

image-20260605-094839.png

 

Service Memory Utilization 

mod-audit Memory usage was stable

image-20260605-095112.png

 

DB CPU Utilization

DB CPU averaged 9% (max 10%)

image-20260605-095346.png

DB Connections

image-20260605-100109.png

DB load

No visible load was observed during tests

image-20260605-095913.png

 

 

Resources Utilization for Test 2

Service CPU Utilization

mod-audit CPU averaged 28% (max 31%)

image-20260605-101041.png

Service Memory Utilization 

mod-audit Memory usage was stable

image-20260605-101245.png

 

DB CPU Utilization

DB CPU varied by filter: 7% (no filter), 13% with spikes to 15% (date filter), and 8% (description filter).

image-20260605-102455.png

DB Connections

image-20260605-103030.png

 

DB load

image-20260605-103822.png
SELECT jsonb FROM cs00000int_0001_mod_audit.circulation_logs WHERE ((CASE WHEN length(lower(f_unaccent(?))) <= ? THEN left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) >= lower(f_unaccent(?)) ELSE left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) >= left(lower(f_unaccent(?)),?) AND lower(f_unaccent(circulation_logs.jsonb->>?)) >= lower(f_unaccent(?)) END) AND (CASE WHEN length(lower(f_unaccent(?))) <= ? THEN left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) <= lower(f_unaccent(?)) EL
SELECT jsonb FROM cs00000int_0001_mod_audit.circulation_logs WHERE get_tsvector(f_unaccent(circulation_logs.jsonb->>?)) @@ tsquery_phrase(f_unaccent(?)) ORDER BY left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) DESC, lower(f_unaccent(circulation_logs.jsonb->>?)) DESC LIMIT ? OFFSET ?
SELECT jsonb FROM cs00000int_0001_mod_audit.circulation_logs WHERE (lower(f_unaccent(circulation_logs.jsonb->>?)) LIKE lower(f_unaccent(?))) AND (get_tsvector(f_unaccent(circulation_logs.jsonb->>?)) @@ tsquery_phrase(f_unaccent(?))) ORDER BY left(lower(f_unaccent(circulation_logs.jsonb->>?)),?) DESC, lower(f_unaccent(circulation_logs.jsonb->>?)) DESC LIMIT ? OFFSET ?

 

Appendix

Infrastructure

PTF - environment asptc2

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

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

  • MSK ptf-loc

    • 6 m7g.large brokers in 2 zones

    • Apache Kafka version 3.9.x

    • EBS storage volume per broker 300 GiB

  • OpenSearch 2.19 ptf-test cluster

    • r7g.2xlarge.search 4 data nodes

    • r7g.large.search 3 dedicated master nodes

 

 

 

Module

Task Definition Revision

Module Version

Task Count

Mem Hard Limit

Mem Soft Limit

CPU Units

Xmx

Metaspace Size

Max Metaspace Size

mod-remote-storage

3

mod-remote-storage:4.1.0-SNAPSHOT.204

2

4920

4472

64

3960

512

512

mod-remote-storage - Sidecar 1

N/A

folio-module-sidecar:3.0.18.tls

N/A

1024

512

64

256

0

96

mod-ebsconet

2

mod-ebsconet:3.0.0-SNAPSHOT.100

2

1248

1024

64

700

128

256

mod-ebsconet - Sidecar 1

N/A

folio-module-sidecar:3.0.18.tls

N/A

1024

512

64

256

0

96

mod-mosaic

3

mod-mosaic:2.0.0-SNAPSHOT.21

2

1024

896

64

768

88

128

mod-mosaic - Sidecar 1

N/A

folio-module-sidecar:3.0.18.tls

N/A

1024

512

64

256

0

96

edge-sip2

2

edge-sip2:4.1.0-SNAPSHOT.396.tls

2

1024

896

64

768

88

128

mod-consortia-keycloak

2

mod-consortia-keycloak:2.0.0-SNAPSHOT.86.tls

2

5136

4776

512

4416

384

512

mod-consortia-keycloak - Sidecar 1

N/A

folio-module-sidecar:3.0.18.tls

N/A

1024

512

64

256

0

96

mod-tags

4

mod-tags:3.1.0-SNAPSHOT.163

2

1024

896

64

768

88

128

mod-tags - Sidecar 1

N/A

folio-module-sidecar:3.0.18.tls

N/A

1024

512

64

256

0

96

edge-courses

3

edge-courses:1.8.0-SNAPSHOT.1188.tls

2

1024

896

64

768

88

128

mod-inventory-update

2

mod-inventory-update:5.1.1-SNAPSHOT.141

2

1024

896

64

768

88

128

mod-inventory-update - Sidecar 1

N/A

folio-module-sidecar:3.0.18.tls

N/A

1024

512

64

256

0

96

mod-notify

2

mod-notify:3.6.0-SNAPSHOT.287

2

1024

896