Versions Compared

Key

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

...

CPS Core Performance

Test Environment

HardwareSpecifications
CPU13th Gen Intel© Core™ i9-13900H (24 MB cache, 14 cores, up to 5.40 GHz turbo mode)
Memory32 GB RAM (16 GB x 2, DDR5, 4800 MHz)
Storage1 TB M.2 PCIe NVMe SSD
Operating SystemLinux Mint 21.2 Cinnamon (based on Ubuntu 22.04)

Test setupTO DO Laptop specs

The performance tests are written in Groovy (a JVM language). The tests were executed from Intelli-J using the Amazon Corretto 17 JDK.

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

...

In this case, a query that matches a single device node using an absolute cps path is executed.

Fetch descendantsOmit DescendantsDirect DescendantsAll Descendants
Query

//openroadm-device[@device-id="C201-7-1A-14"]

Graph

Image Modified

Image Modified

Image Modified

Time ComplexityLinear on total number of fragments in databaseLinear on total number of fragments in databaseLinear on total number of fragments in database

Query one device out of many using descendant cps path

In this case, a query that matches a single device node using a descendant cps path is executed.

Fetch descendantsOmit DescendantsDirect DescendantsAll Descendants
Query//openroadm-device[@device-id="C201-7-1A-14"]
Graph

Image Modified

Image Modified

Image Modified

Time ComplexityLinear on total number of fragments in databaseLinear on total number of fragments in databaseLinear on total number of fragments in database

Query all devices using absolute cps path

In this case, a query that matches all device nodes using an absolute cps path is executed.

Fetch descendantsOmit DescendantsDirect DescendantsAll Descendants
Query

/openroadm-devices/openroadm-device[@status="success"]

Graph

Image Modified

Image Modified

Image Modified

Time ComplexityLinear on the amount of fragments returned from queryLinear on the amount of fragments returned from queryLinear on the amount of fragments returned from query

Query all devices using descendant cps path

In this case, a query that matches all device nodes using a descendant cps path is executed.

Fetch descendantsOmit DescendantsDirect DescendantsAll Descendants
Query//openroadm-device[@ne-state="inservice"]
Graph

Image Modified

Image Modified

Image Modified

Time ComplexityLinear on the amount of fragments returned from queryLinear on the amount of fragments returned from queryLinear on the amount of fragments returned from query

Commentary

Suggested improvement: For absolute cps path queries, the complexity can be reduced to best-case constant time (so it is no longer linear on the total number of fragments in the database).

...