Versions Compared

Key

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

...

  • NCMP CM-handle de-registration moved from average quadratic to linear time (constant rate). De-registering 20,000 CM-handles is thousands of times faster now.
  • CPS Path Queries have moved from worst-case quadratic to linear time complexity. Queries that took days previously take minutes or seconds now.
  • Memory usage during read operations has decreased by more than 90% (10 times less memory).
  • Not only has performance increased, but reliability and robustness. It is now possible for a single batch operation to handle tens of thousands of elements, where it would have failed before.

...

As all CPS Core operations are synchronous, the results here are to be considered as single-threaded operation performance only.

Test data

Test data used complies with uses the Open ROADM YANG model - a real-world model for optical devices. Specifically, openroadm-device nodes, each consisting of 86 fragments, are created. For example, a test that creates 1000 1,000 device nodes will result in 86,000 fragments in the database. Some tests use up to 3000 3,000 device nodes (258,000 fragments - equivalent to around 20,000 CM-handles in NCMP), with four anchors replicating the data, meaning that the system has been tested up to 1 million fragments.

...

Created device nodes11002003004005006007008009001000

Time (seconds)

0.302.364.367.159.7611.5014.7718.4319.7922.1626.54
Fragments86









Observations

  • Storing data nodes has linear time complexity (as expected).
  • Raw performance is roughly 3000 fragments per second for the given test setup.
  • Performance can be improved by enabling write batching (CPS-1795)
  • There are edge cases with exponential complexity (adding books to the bookstore model).

...

Updating data nodes

In this scenario, 1, 1000 000 Open ROADM device nodes are already defined. A number of these existing data nodes will be updated using CpsDataService::updateDataNodeAndDescendants.

Updated device nodes11002003004005006007008009001000

Time (seconds)

0.2212.7928.3844.2351.55

69.46

85.6795.02109.16117.00131.15
Fragments86









Observations

  • Updating data nodes has linear time complexity (as expected).
  • Raw performance is roughly 600 fragments per second for the given model and test setup.
  • Updating data nodes is 5 times slower than storing data nodes.

...

This is the weak spot of all write operations. A custom algorithm comparing existing data against updated data (delta algorithm) may be required to improve performance here. This could also indicate that Hibernate is not being used effectively.

TODO mention json alphabetical sorting

Updating data leaves

In this scenario, 1000 1,000 Open ROADM device nodes are already defined. The data leaves of a number of these existing data nodes will be updated using CpsDataService::updateNodeLeaves.

...