Versions Compared

Key

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

...

The DB CPU utilization percentage also increased over time

It's unclear what (DB connections) caused the DB to use more CPU resources as the test progressed, but looking at the logs there is one query that stood out as being slow:

Code Block
SELECT jsonb,id FROM fs09000000_mod_circulation_storage.loan 
WHERE (lower(fs09000000_mod_circulation_storage.f_unaccent(loan.jsonb->>'userId')) LIKE lower(fs09000000_mod_circulation_storage.f_unaccent('<user UUID>'))) 
AND (lower(fs09000000_mod_circulation_storage.f_unaccent(loan.jsonb->'status'->>'name')) NOT LIKE lower(fs09000000_mod_circulation_storage.f_unaccent('Closed')))

This query at first took a little more than 100ms to run, but toward the end of the test it got to over 500ms on average and spiked to over a second. 

Doing an EXPLAIN ANALYZE on the query shows that it was not using indexes in the query plan despite having the indexes to look up loans by userId and loan status name. 


Here is a view of the CPU utilization. A couple of observations:

  • mod-users seems to take up CPU resources in a cyclical way. 
  • Okapi uses about 450% CPU on average.

Image Added

Here is the Service CPU Utilization graph without Okapi for better clarity of other modules' behaviors.

Image Added

Note that at around 8:00 (on the graph) there are extended spikes for all the modules, Okapi, and the DB. This is due to tooling. The tool for some reasons added another 20 concurrent users to the test. The results for this period had been discarded.

---

Image Added

Image Added

Image Added

A closer look at the CPU graphs without Okapi.

Image Added

Modules CPUs and Memory Utilization

...