Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinetrue

...

In this workflow we are checking the performance of the check-in-check-out workflow running in the Fameflower release (

Jira Legacy
serverSystem Jira
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyPERF-9
).  We will test it with 1, 5, 8, and 20 virtual users for 30 minutes.  A longevity test will also be executed to see if there were memory issues.

...

  1. Overall check in, check out time in seconds

    1. Average
    (seconds)50th %tile (seconds)75th %tile (seconds)95th %tile  (seconds)Check-inCheck-outCheck-inCheck-outCheck-inCheck-outCheck-inCheck-out1 user1.0151.2340.961.2771.0711.4091.3221.6535 users1.2361.4881.1561.3931.4641.8691.7042.2198 users1.5121.7511.4031.8521.7412.0312.022.27420 users1.6491.8981.5351.9961.8962.2112.2522.539

    Slow APIs taking more than 100 ms to return

    API1 user (75th %tile)5 users (75th %tile)8 users (75th %tile)20 Users (75th %tile)POST checkout-by-barcode615 ms905 ms906 ms988 ms

    POST checkin-by-barcode 

    548 ms830 ms1053 ms1137 msGet circulation/loans283 ms346 ms449 ms479 msGet inventory/items217 ms232 ms237 ms281 msExcess logging of missing indexes - 64K lines in  45 minutes run. Logging level could be reduced to WARNING or INFO, but at the cost of having less data to work with should there be a need to troubleshoot.
  2. JVM profiling shows JSON de/serialization operations one of the slowest operations.

Test Runs

...

Test

...

Virtual Users

...

Duration

...

OKAPI log level

...

Profiled

...

1.

...

1

...

30 min

...

INFO

...

No

...

2.

...

5

...

30 min

...

INFO

...

No

...

3.

...

8

...

30 min

...

INFO

...

No

...

4.

...

20

...

20 min

...

INFO

...

No

...

5.

...

8

...

42 min

...

INFO

...

Yes

Results

JVM Profiling

...

    1. check in time is 1.51 seconds for a typical use case of 8 users, 1.65 seconds for 20 users
    2. Average check out time is 1.75 seconds for a typical use case of 8 users, 1.90 seconds for 20 users
  1. Slow APIs taking more than 100ms to run 
    1. POST checkout-by-barcode
    2. POST checkin-by-barcode 
    3. Get circulation/loans
    4. Get inventory/items
  2. Excess logging of missing indexes - 64K lines in  45 minutes run. Logging level could be reduced to WARNING or INFO, but at the cost of having less data to work with should there be a need to troubleshoot.
  3. JVM profiling shows JSON de/serialization operations one of the slowest operations.

Test Runs

Test

Virtual Users

Duration

OKAPI log level

OKAPI Version

Profiled

1.

1

30 min

INFO

2.38.0

No

2.

5

30 min

INFO

2.38.0

No

3.

8

30 min

INFO

2.38.0

No

4.

20

20 min

INFO

2.38.0

No

5.

8

42 min

INFO

2.38.0

Yes

Results

  1. Response times


    Average (seconds)50th %tile (seconds)75th %tile (seconds)95th %tile  (seconds)

    Check-inCheck-outCheck-inCheck-outCheck-inCheck-outCheck-inCheck-out
    1 user1.0151.2340.961.2771.0711.4091.3221.653
    5 users1.2361.4881.1561.3931.4641.8691.7042.219
    8 users1.5121.7511.4031.8521.7412.0312.022.274
    20 users1.6491.8981.5351.9961.8962.2112.2522.539


  2. Slow APIs taking more than 100 ms to return

    API1 user (75th %tile)5 users (75th %tile)8 users (75th %tile)20 Users (75th %tile)
    POST checkout-by-barcode615 ms905 ms906 ms988 ms

    POST checkin-by-barcode 

    548 ms830 ms1053 ms1137 ms
    Get circulation/loans283 ms346 ms449 ms479 ms
    Get inventory/items217 ms232 ms237 ms281 ms


JVM Profiling

...

    • Can drill down these methods for more information at : http://ec2-3-93-19-104.compute-1.amazonaws.com/grafana/d/b2iP-9hiz/java-profiling-folio?orgId=1&from=15899401951661590418466176&to=15899434576931590420349447&var-service_tag=mod-circulationinventory&var-aggregation=10s
      • Areas of code that serializes and deserializes JSON objects
        • org.folio.inventory.storage.external.ExternalStorageModuleCollection
        • org.forlio.inventory.resources.Items$$Lambdas...apply()
        • org.folio.okapi.util.LockedStringMap.lambda$getString()
        • org.folio.okapi.util.LockedTypedMap.lambda...handle()
        • org.folio.okapi.managers..proxy
        • org.folio.cql2pgjson.CQL2PgJSON.loadDbSchema
        • org.folio.rest.persist.PostgresClient.deserializeRow
      • Logging
        • org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled
        • org.apache.logging.slf4j.Log4jLogger.info
      • org.joda.time.DateTime.parse
        • org.folio.circulation.domain.Loan.getReturnDate
        • org.folio.circulation.domain.Loan.getDueDate

Database

Database does not show much CPU usage for 1, 5, 8 and 20 users runs.  At maximum only 25% CPU usage for the high case of 20 users.

...

Code Block
languagesql
linenumberstrue
WARNING: Doing SQL query without index for scheduled_notice.jsonb->>'nextRunTime', CQL >>> SQL: nextRunTime < >>> scheduled_notice.jsonb->>'nextRunTime' <'2020-05-20T03:07:08.090Z'
WARNING: Doing FT search without index for request.jsonb->>'pickupServicePointId', CQL >>> SQL: pickupServicePointId = 130d8bff-bdbd-4dc5-a4ac-6d970f4918ff >>> to_tsvector('simple', f_unaccent(request.jsonb->>'pickupServicePointId')) @@ replace((to_tsquery('simple', f_unaccent('''130d8bff-bdbd-4dc5-a4ac-6d970f4918ff''')))::text, '&', '<->')::tsquery
WARNING: Doing FT search without index for request.jsonb->>'requesterId', CQL >>> SQL: requesterId = 001164c0-5466-4822-86f2-dcd2393a7ef7 >>> to_tsvector('simple', f_unaccent(request.jsonb->>'requesterId')) @@ replace((to_tsquery('simple', f_unaccent('''001164c0-5466-4822-86f2-dcd2393a7ef7''')))::text, '&', '<->')::tsquery
WARNING: Doing FT search without index for request.jsonb->>'status', CQL >>> SQL: status = Open >>> to_tsvector('simple', f_unaccent(request.jsonb->>'status')) @@ replace((to_tsquery('simple', f_unaccent('''Open''')))::text, '&', '<->')::tsquery
WARNING: Doing LIKE search without index for jsonb->>'requestId', CQL >>> SQL: requestId == 01819cdb-de38-4562-9835-14071dcaf53d >>> lower(f_unaccent(jsonb->>'requestId')) LIKE lower(f_unaccent('01819cdb-de38-4562-9835-14071dcaf53d'))
WARNING: Doing LIKE search without index for request.jsonb->>'requesterId', CQL >>> SQL: requesterId == 005de89f-bfe1-4bf7-a1e3-f34a707ace21 >>> lower(f_unaccent(request.jsonb->>'requesterId')) LIKE lower(f_unaccent('005de89f-bfe1-4bf7-a1e3-f34a707ace21'))
WARNING: Doing LIKE search without index for patron_action_session.jsonb->>'actionType', CQL >>> SQL: actionType == Check-out >>> lower(f_unaccent(patron_action_session.jsonb->>'actionType')) LIKE lower(f_unaccent('Check-out'))
WARNING: Doing LIKE search without index for scheduled_notice.jsonb->>'triggeringEvent', CQL >>> SQL: triggeringEvent == "Due date" >>> lower(f_unaccent(scheduled_notice.jsonb->>'triggeringEvent')) LIKE lower(f_unaccent('Due date'))
WARNING: Doing LIKE search without index for scheduled_notice.jsonb->'noticeConfig'->>'sendInRealTime', CQL >>> SQL: noticeConfig.sendInRealTime == false >>> lower(f_unaccent(scheduled_notice.jsonb->'noticeConfig'->>'sendInRealTime')) LIKE lower(f_unaccent('false'))
WARNING: Doing SQL query without index for scheduled_notice.jsonb->>'nextRunTime', CQL >>> SQL: nextRunTime < >>> scheduled_notice.jsonb->>'nextRunTime' <'2020-05-20T03:07:08.090Z'
WARNING: Doing SQL query without index for scheduled_notice.jsonb->>'nextRunTime', CQL >>> SQL: nextRunTime < 2020-05-20T00:00:00.000Z >>> scheduled_notice.jsonb->>'nextRunTime' <'2020-05-20T00:00:00.000Z'

CPU Utilization

...

' <'2020-05-20T00:00:00.000Z'

CPU Utilization

mod-inventory-storage

1 user5 users8 users20 users

Average %Range %Average %Range %Average %Range %Average %Range %
Okapi1.860.32-6.855.951.16 - 16.557.921.41-16.0717.522.36-29.85
mod-inventory







mod-inventory-storage








0.400.28 - 3.010.760.32-8.360.620.8-2.1710.25-3

0.940.328 - 4.092.880.36-9.113.331.84-19.727.961.88-14.67

...