cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
745
Views
10
Helpful
6
Replies

Parallel dry-run

suvdeshm
Cisco Employee
Cisco Employee

Is there any way to do dry-run in parallel ? What is the best way to design this for best performance? There are more than 200 devices. Dry-run is while applying template on device. There is no service.

6 Replies 6

crenners
Cisco Employee
Cisco Employee

Lockless dry-run, which would enable you to run dry-run in parallel, is introduced with NSO 6.0. In previous versions of NSO, the dry-run diff is calculated within the critical section of the transaction, under the global transaction lock, which prohibits you from running dry-run concurrently.

If you are running with NSO 6.0, I would probably try to limit the number of requests you do in parallel to something equivalent to the number of cores you have available or slightly below to get the best performance.

Can you share any information on this? Do I have to enable it? 

crenners
Cisco Employee
Cisco Employee

You don't need to enable it, but you might have to get acquainted with the new concurrency control model for NSO and what that means for your system.
If you want more background on this I would recommend that you to read the following chapters in the user guide:
https://developer.cisco.com/docs/nso/guides/#!what-is-new-in-nso-nso-6-0/nso-6-0
https://developer.cisco.com/docs/nso/guides/#!nso-concurrency-model/nso-concurrency-model
There are also two presentations on the same topic here:
https://www.youtube.com/channel/UCVMgxfH4h4XyNV8VxSMtgnQ

Thank you @crenners . I can present this to the customer as it means upgrading to 6.0. Just to summarize if the apply-template on device-group is invoked parallel processing for commit dry-run will happen internally and better performance is expected in 6.0.

Is that correct?

To get that parallelism you would have to write code that starts multiple threads dividing individual device apply-template dry runs amongst those threads  and collecting all the results. The device-group apply-template action creates one big transaction with all the changes so cannot exploit the parallelism that can exist across different transactions in NSO 6

 

Thanks @snovello.