Versions Compared

Key

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

...

  1. All data under 1 anchors
    1. Under /openroadm-devices we have list of 10,000 openroadm-device[..]
  2. tree-size per 'device' fragments 86 fragments
  3. KB per anchor 333KB ?devices: 333 KB


Single-large object request

Query: cps/api/v1/dataspaces/openroadm/anchors/owb-msa221-anchor/node?xpath=/openroadm-devices/openroadm-device[@device-id='C201-7-13A-5A1']&include-descendants=true

Durations are average of 100 measurements

...

1 object containing all node as descendants (mainly one big list)

Query: cps/api/v1/dataspaces/openroadm/anchors/owb-msa221-anchor/node?xpath=/openroadm-device&include-descendants=true

All queries ran 10-reames

0 ??? Was this wrong ?!
PatchDevicesE2E duration (s)Fragment Query duration (s)Service duration (s)Object Size (KBMB)Object Size #FragmentsGraph

1) Baseline

https://gerrit.onap.org/r/c/cps/+/133482

1,00011.80<0.0311 *12110.740333386,000

2,00028.50<0.0491 *280.4017666172,000
5,00087.00<0.1581 *86.8141,664,9857430,000
10,000201.00<0.4451*2013.0083,329,970860,000

2)

https://gerrit.onap.org/r/c/cps/+/133511/2**

1,0000.50.22320.321332,99730.386,000

2,0001.00.41740.558665,99460.7172,000
5,0002.51.08711.439416649851.7430,000
10,0007.2.92894.049033299703.3860,000
1,0003.01.26231.69173329970.386,000

2,0005.52.31733.17326659940.7172,000
5,00011.05.43345.591616649851.7430,000
10,00025.411.698713.661633299703.3860,000

*Only initial Hibernate query

** 

Observations:

...

, hibernate will lazily fetch data later which is reflected in E2E time

Observations:

  1. PathsSet #2  did perform better than the latest patch! Need to compare Daniel Hanrahan will follow up

Get nodes parallel

Fetch 1 device from a database with 10,000 devices

Bash parallel Curl commands, 1 thread executed 10 Sequential requests with no delays, average response times are reported

Query: cps/api/v1/dataspaces/openroadm/anchors/owb-msa221-anchor/node?xpath=/openroadm-devices/openroadm-device[@device-id='C201-7-13A-5A1']

...

&include-descendants=true

Patch: https://gerrit.onap.org/r/c/cps/+/133511/12

123288499567134
ThreadsE2E duration (s)Succes RatioFragment Query duration (s)
10.082100%0.2382
20.091100%0.0991
30.120100%0.1271
50.1803100%0.1802
100.399.9%0.2833
200.599.5%0.4875
501.0070.982099.4%1.0
1002.344399.7%2.2713
2007.699.7%6.2252
50017.141.4%13.8338
10001,00015.3063 (many connection errors)26.0%11.8669

Graph:

Image Removed

Observations:

...

Graphs:

  1. Average E2E Execution Time
  2. Internal Method Counts (total)

Image Added

Observations

  1. From 10 Parallel request (of 10 sequential request) the client can't always connect and we see time out error (succes ratio <100%)
    1. Sequential request are fired faster than actual responses so from DB perspective they are almost parallel request as well 
  2. Database probably already become bottleneck with 2 threads, effectively firening a total of 20 call very quickly. Its know that the DB connection pool/internal will slow down from 12 or more 'parallel' request

Get 1000 nodes in Parallel with varying thread count

In this test, 1000 requests are sent using curl, but with varying thread count (using --parallel-max option).

Code Block
languagebash
echo -e "Threads\tTime"
for threads in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 30 40 50; do
	echo -n -e "$threads\t"
	/usr/bin/time -f "%e" curl --silent --output /dev/null --fail --show-error \
		--header "Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=" \
		--get "http://localhost:8883/cps/api/v1/dataspaces/openroadm/anchors/owb-msa221-anchor/node?xpath=/openroadm-devices/openroadm-device\[@device-id='C201-7-[1-25]A-[1-40]A1'\]&include-descendants=true" \
		--parallel --parallel-max $threads --parallel-immediate
done

Note the above curl command performs 1000 requests. It is based on globbing in the URL - curl allows ranges such as [1-25]  in the URL, for example:

  http://example.com/archive[1996-1999]/vol[1-4].html

which would expand into a series of 16 requests to:

  • http://example.com/archive1996/vol1.html
  • http://example.com/archive1996/vol2.html
  • ...
  • http://example.com/archive1999/vol4.html

Results

ThreadsTime (s)SpeedupComments
1140.41.0
271.62.02 threads is 2x faster than 1 thread
348.52.9
437.23.8
531.04.5
626.65.3
723.85.9
821.66.5
920.07.0
1018.77.510 threads is 7.5x faster than 1 thread
1117.77.9
1216.88.4There are exactly 12 CPU cores (logical) on test machine
1316.78.4
1416.78.4
1516.88.4
2016.88.4
3016.78.4
4016.88.4
5016.78.4

Graphs

Image Added

Observations

  • There were no failures during the tests (e.g. timeouts or refused connections).
  • Performance increases nearly linearly with increasing thread count, up to the number of CPU cores.
  • Performance stops increasing when the number of threads equals the number of CPU cores (expected).
  • Verbose statistics show that each individual request takes around 0.14 seconds, regardless of thread count (but with multiple CPU cores, requests are really done in parallel).

Data sheets

View file
nameCpsPerformance.xlsx
height250
View file
nameperformanceTest.zip
height250
View file
namePerformance test.postman_collection.json
height250

Test scripts overview 

- performanceTest.sh
   Get 1000 times single large object from thousands of devices (1000, 2000, ..., 10000) and create metric after each run
- performanceRootTest.sh
   Get 10 times the whole data tree as one object from thousands of devices (1000, 2000, ..., 10000) and create metric after each run
- parallelGetRequestTest.sh
   Get one devices parallel from a database with 10000 devices, executed 10 times sequential

- buildup.sh
   Create the dataspace, create the schemaset, create the anchor and create the root node
- owb-msa221.zip
   The schemaset for the tests
- outNode.json
   The input for the root node creation
- createThousandNode.sh
   Helper script for the database creation
- innerNode.json
   The input for the sub node creation
- createMetric.sh
   Helper script for metric creation