...
The test that was run mimic the data-export workflow (PERF-98), making two calls: GET /inventory-storage/item-storage and GET /inventory-storage/holdings-storage but is not designed to behave in the same way as the actual data-exporting workflow (the real workflow , which would pause to process the retrieved records after each API call, for instance). More importantly UUIDs are concatenate in these calls which deviates from the real use case. These tests were run for 15 minutes each
Test #1 and #2 were to establish a baseline and to see if there was any drawbacks to using hard-coded UUIDs in the JMeter test (versus having the UUIDs dynamically filled in at runtime), and the results were pretty much the same in response time, although the database did a lot of I/O lookups for the unique UUIDs test.
We initially started out testing with 8 users. As seen here, for up to 20 UUIDs, the average response time were less than 40ms for both API calls and with minimal errors. As we added more UUIDs, 30 and 40 UUIDs, the response time doubled up and more errors occurred while the request rate is indirectly proportional to the average response time, now down by half from the 1 record baseline test. The database restarted once during the 30 and 40 UUID test runs. Knowing that the data-export use case only sent up to 40 requests per second, we scaled down the number of virtual users to 1 to see if it helps. Here are the results with 1 user:
With one user the request rate was able to be scaled down to a realistic 40 requests/sec. The average response time was less than 30ms for both API calls. Tests also ran for 40 and 50 UUIDs concatenation, and like the 9 users tests, request rate is cut down by half while the response time increased by half. The surprising thing was that even with 50 records the database did not crash during the test run.
CPU Utilization
This graph shows the CPU utilization of the modules in the first six tests. The one that we are interested are mod-inventory-storage which has the highest of all the spikes. With the request rates that were thrown at it and the number of records that it has to process, deserialize from string, the CPU utilization is quite high. The surprising thing is its CPU utilization for the 1-unique-record test is quite low compared to the 1 record, not unique. mod-authtoken's CPU usage is rightly high because it's being called for each API call, but as expected its CPU utilization is less when more records are concatenated as there is not as much need to go to mod-authentication.
The second round of tests runs with 1 virtual users produced the following results: