Versions Compared

Key

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

References:

...

With previous versions we were able to register 10k cmhandles (in 4 threads) in 12 minutes.
With the current CPS master we sent the 10k cmHandles  around 10 minutes to NCMP, so it is not faster than before. What I see is that NCMP starts getting modules in a background thread (seems to be one thread) and handling one cmhandle takes more seconds.
Currenlty in 12 minutes only 150 cmHandles got available with ready state in NCMP, because getting modules and changing the state is quite slow this way. 

Expected behavior
With previous versions we were able to register 10k cmhandles (in 4 threads) in 12 minutes.

Reproduction

Register huge amount of cmhandles and try to search them.
After 12 minutes there were only ~150cmHandles inready state


Analyzed the logs the summary is as below :

Patch used for testing :

https://gerrit.onap.org/r/c/cps/+/129829/5//COMMIT_MSG

Configurations: 


#ConfigurationDescription
1Number of CPS Instance

1

2Total number of threads to send each batch (Register cm handle)4
3Batch size

100

4To register 1458 cm handlesUsed to send 15 batchs (100 cm handles in each batch)


#Watchdog
Fixed Delay String (in ms)
1
timers:
    advised-modules-sync:
        sleep-time-ms: 

30000

2
timers:
    locked-modules-sync:
        sleep-time-ms: 
300000
3
timers:
   cm-handle-data-sync:
       sleep-time-ms: 
30000


#Data Sync
Enabled ?
1
data-sync:
    cache:
        enabled: 

false


Scenario 1: If there is no cm handle into Advised state

Average time elapsed to get/fetch cm handles by state ADVISED is ~ 3-4 ms

CPS -log :

2022-07-15 04:40:17.918  INFO [cps-application,57eae02b31a98818,57eae02b31a98818] 1 --- [  watchdog-th-9] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to get cm handles by state ADVISED is : 3 ms | Fetched data node size is 0
2022-07-15 04:40:17.918  INFO [cps-application,57eae02b31a98818,57eae02b31a98818] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : No Cm-Handles currently found in an ADVISED state
2022-07-15 04:40:48.003  INFO [cps-application,e1fb65c00a949ce0,e1fb65c00a949ce0] 1 --- [  watchdog-th-9] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to get cm handles by state ADVISED is : 4 ms | Fetched data node size is 0
2022-07-15 04:40:48.003  INFO [cps-application,e1fb65c00a949ce0,e1fb65c00a949ce0] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : No Cm-Handles currently found in an ADVISED state
 

Scenario 2: If we started registering 1458 with configuration mentioned above :


#Operations
Average Time elapsed (in ~ ms)
1To save cm handle state with id Batch #.Iteration #Time elapsed (in ~ ms)
1.1293 
1.284
2.114
2.28
Average Time elapsed per cm handle (in ~ ms)53
2To synchronize, create schema set and anchor with id Batch #.Iteration #Time elapsed (in ~ ms)
1.138393 
1.2599
2.1237 
2.2122
Average Time elapsed per cm handle (in ~ ms)19675.5 
3Delete schema set If exists with idBatch #.Iteration #Time elapsed (in ~ ms)
1.117
1.22
2.12
2.22
Average Time elapsed per cm handle (in ~ ms)11.5
4Get cm handle state with idBatch #.Iteration #Time elapsed (in ~ ms)
1.183
1.27
2.110
2.212
Average Time elapsed per cm handle (in ~ ms)56 
5 To get yang modelsBatch #Batch SizeTime elapsed (in ~ ms)Time elapsed per cm handle (in ~ ms)
160163107105.00
28573733743.56
Average Time elapsed per iteration (in ~ ms)74.28
6To shuffle cm handlesBatch #Batch SizeTime elapsed (in ~ ms)
16010
28570
Average Time elapsed per iteration (in ~ ms)0
7
Get / fetch cm handles by state ADVISED
Batch #Batch SizeTime elapsed (in ~ ms)Time elapsed per cm handle (in ~ ms)
1601

19404

32.28
285734854.06
Average Time elapsed per iteration (in ~ ms)18.17


#Operation
Time
1
Registration of 1458 cm handles started

 04:41:00

21st ADVISED cm handle with B031D6DDF9AA4CA484727B7A497AB27D2022-07-15T04:40:49.307+0000
31458th ADVISED cm handle with BFAB827B9CC652EE60DD2545D55EF0CA2022-07-15T04:41:58.018+0000
41st READY cm handle with 47C5F63DFF44436A6C56AC684B5E48C72022-07-15T04:40:49.307+0000
51458th READY cm handle with BFAB827B9CC652EE60DD2545D55EF0CA2022-07-15T04:41:58.018+0000

Average time to make all 1458 cm handles from ADVICED to READY state is: ~ 10 minutes

First Batch:

First iteration:

2022-07-15 04:41:37.407  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to get cm handles by state ADVISED is : 19404 ms | Fetched data node size is 601
2022-07-15 04:41:37.408  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to shuffle  advisedCmHandles list of size : 601 is 0 ms
2022-07-15 04:42:40.516  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to get yang model cm handles is : 63107 ms
2022-07-15 04:42:40.600  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to get cm handle state with id 6D3F803EFCCB92F84FEE3CAEEEC0C48D is : 83 ms
2022-07-15 04:42:40.618  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to deleteSchemaSetIfExists with id 6D3F803EFCCB92F84FEE3CAEEEC0C48D is : 17 ms
2022-07-15 04:43:19.011  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to syncAndCreateSchemaSetAndAnchor with id 6D3F803EFCCB92F84FEE3CAEEEC0C48D is : 38393 ms
2022-07-15 04:43:19.307  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to executeAdvisedCmHandlePoll saveCmHandleState with id 6D3F803EFCCB92F84FEE3CAEEEC0C48D is : 293 ms
2022-07-15 04:43:19.307  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : 6D3F803EFCCB92F84FEE3CAEEEC0C48D is now in READY state

Second iteration :

2022-07-15 04:43:19.314  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to get cm handle state with id CA29889D3AE24486DD95344AEC60E0F7 is : 7 ms
2022-07-15 04:43:19.317  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to deleteSchemaSetIfExists with id CA29889D3AE24486DD95344AEC60E0F7 is : 2 ms
2022-07-15 04:43:19.916  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to syncAndCreateSchemaSetAndAnchor with id CA29889D3AE24486DD95344AEC60E0F7 is : 599 ms
2022-07-15 04:43:20.001  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to executeAdvisedCmHandlePoll saveCmHandleState with id CA29889D3AE24486DD95344AEC60E0F7 is : 84 ms
2022-07-15 04:43:20.001  INFO [cps-application,8ffa50adfe3fb407,8ffa50adfe3fb407] 1 --- [  watchdog-th-9] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : CA29889D3AE24486DD95344AEC60E0F7 is now in READY state

Second Batch:

First iteration: 

2022-07-15 04:45:51.513  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to get cm handles by state ADVISED is : 3485 ms | Fetched data node size is 857
2022-07-15 04:45:51.513  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to shuffle  advisedCmHandles list of size : 857 is 0 ms
2022-07-15 04:46:28.851  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.ncmp.api.inventory.sync.SyncUtils  : Time elapsed to get yang model cm handles is : 37337 ms
2022-07-15 04:46:28.861  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to get cm handle state with id F11218269B0D31012FBAFF88F9B4A345 is : 10 ms
2022-07-15 04:46:28.864  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to deleteSchemaSetIfExists with id F11218269B0D31012FBAFF88F9B4A345 is : 2 ms
2022-07-15 04:46:29.101  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to syncAndCreateSchemaSetAndAnchor with id F11218269B0D31012FBAFF88F9B4A345 is : 237 ms
2022-07-15 04:46:29.116  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to executeAdvisedCmHandlePoll saveCmHandleState with id F11218269B0D31012FBAFF88F9B4A345 is : 14 ms
2022-07-15 04:46:29.116  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : F11218269B0D31012FBAFF88F9B4A345 is now in READY state

Second iteration:

2022-07-15 04:46:29.128  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to get cm handle state with id D79ADF6E3AE62A2D450BEB0F14565EE1 is : 12 ms
2022-07-15 04:46:29.131  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to deleteSchemaSetIfExists with id D79ADF6E3AE62A2D450BEB0F14565EE1 is : 2 ms
2022-07-15 04:46:29.254  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to syncAndCreateSchemaSetAndAnchor with id D79ADF6E3AE62A2D450BEB0F14565EE1 is : 122 ms
2022-07-15 04:46:29.262  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : Time elapsed to executeAdvisedCmHandlePoll saveCmHandleState with id D79ADF6E3AE62A2D450BEB0F14565EE1 is : 8 ms
2022-07-15 04:46:29.262  INFO [cps-application,acf4595802b71109,acf4595802b71109] 1 --- [ watchdog-th-10] o.o.c.n.a.i.sync.ModuleSyncWatchdog      : D79ADF6E3AE62A2D450BEB0F14565EE1 is now in READY state