mod-inventory performance testing

mod-inventory performance testing

https://folio-org.atlassian.net/browse/MODDATAIMP-115https://folio-org.atlassian.net/browse/MODDATAIMP-137


Server Environment

AWS t2.2xlarge Instance (8 CPUs, 32GB of RAM, up to 3.0 GHz Intel Scalable Processor)

Resource

POST http://folio-snapshot-latest.aws.indexdata.com/inventory/instances

Request body

{
"hrid" : "in00000999",
"source" : "MARC",
"title" : "Futures, biometrics and neuroscience research Luiz Moutinho, Mladen Sokele, editors",
"alternativeTitles" : [ ],
"editions" : [ ],
"series" : [ "Innovative research methodologies in management / Luiz Moutinho, Mladen Sokele ; Volume 2", "Innovative research methodologies in management Volume 2" ],
"identifiers" : [ {
"identifierTypeId" : "5d164f4b-0b15-4e42-ae75-cfcf85318ad9",
"value" : "101073931X"
}, {
"identifierTypeId" : "8261054f-be78-422d-bd51-4ed9f33c3422",
"value" : "3319643991"
}, {
"identifierTypeId" : "8261054f-be78-422d-bd51-4ed9f33c3422",
"value" : "9783319643991"
}, {
"identifierTypeId" : "8261054f-be78-422d-bd51-4ed9f33c3422",
"value" : "9783319644004"
}, {
"identifierTypeId" : "7e591197-f335-4afb-bc6d-a6d76ca3bace",
"value" : "(OCoLC)ocn992783736"
}, {
"identifierTypeId" : "7e591197-f335-4afb-bc6d-a6d76ca3bace",
"value" : "(OCoLC)992783736"
}, {
"identifierTypeId" : "7e591197-f335-4afb-bc6d-a6d76ca3bace",
"value" : "(DE-599)GBV101073931X"
} ],
"contributors" : [ {
"contributorNameTypeId" : "2b94c631-fca9-4892-a730-03ee529ffe2a",
"name" : "Moutinho, Luiz",
"contributorTypeId" : null,
"contributorTypeText" : null
}, {
"contributorNameTypeId" : "2b94c631-fca9-4892-a730-03ee529ffe2a",
"name" : "Sokele, Mladen",
"contributorTypeId" : null,
"contributorTypeText" : null
} ],
"subjects" : [ "Betriebswirtschaftslehre", "Management", "Wissenschaftliche Methode" ],
"classifications" : [ ],
"publication" : [ {
"publisher" : "Palgrave Macmillan",
"place" : "Cham",
"dateOfPublication" : "[2018]",
"role" : null
} ],
"publicationFrequency" : [ ],
"publicationRange" : [ ],
"electronicAccess" : [ {
"uri" : "http://www.gbv.de/dms/zbw/101073931X.pdf",
"linkText" : "Electronic resource (PDF)",
"materialsSpecification" : null,
"publicNote" : "Address for accessing the table of content. PDF file",
"relationshipId" : null
} ],
"instanceTypeId" : "a2c91e87-6bab-44d6-8adb-1fd02481fc4f",
"instanceFormatIds" : [ ],
"physicalDescriptions" : [ "xxix, 224 Seiten Illustrationen" ],
"languages" : [ "eng" ],
"statisticalCodeIds" : [ ]
}

Request headers

content-type: application/json
x-okapi-tenant: diku
x-okapi-token: [token]

Request client

The tool we used to send requests is JMeter tool with preconfigured thread group. We were changing the "Number of threads" property for different test cases (1,2,4,8,16). Each thread will execute the test plan in its entirety and completely independently of other test threads. Each thread simulates a real user requesting to the server under a test. Multiple threads are used to simulate concurrent connections to server application. JMeter tool is configured on separate local Windows machine: Intel core i7, 16GB RAM. Keep in mind that mod-inventory calls mod-inventory-storage to save an incoming Instance. In it's turn, the mod-inventory-storage does SQL insert query.
And yes, multi-threading is bandaid in this case, and we created specific Jira tickets to receive a batch of Instances in one request (https://folio-org.atlassian.net/browse/MODINV-119).
If you would need more details about test plan, here is it 

Test case start time

05:31:46.918

Test case end time

07:54:06.257

Test case duration

2h 23mins

Average Response time

304 ms

Average sending capacity = 28000 / Test case duration

3.2 Instances per 1 second

Test case start time

20:56:34.592

Test case end time

22:12:31.183

Test case duration

1h 14mins

Average Response time

344ms

Average sending capacity = 28000 / Test case duration

6.3 Instances per 1 second

Test case start time

22:32:34.119

Test case end time

23:09:31.770

Test case duration

37mins

Average Response time

317ms

Average sending capacity = 28000 / Test case duration

12.6 Instances per 1 second

Test case start time

10:40:46.639

Test case end time

11:00:11.094

Test case duration

20mins

Average Response time

329ms

Average sending capacity = 28000 / Test case duration

23.3 Instances per 1 second

Test case start time

11:17:07.248

Test case end time

11:29:21.007

Test case duration

12mins

Average Response time

415ms

Average sending capacity = 28000 / Test case duration

38.8 Instances per 1 second