Automatic Model Loading on Server Startup: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
QPR ProcessAnalyzer models can be loaded automatically into the server memory already when the server starts. When models are large and loading takes a long time, it's useful to preload the models. The automatic loading can be switched on in the '''Model properties''' dialog (available in the models list in the header) in the '''Details''' tab by changing the '''Load Model on Startup''' checkbox.  
QPR ProcessAnalyzer models can be loaded automatically into the server memory already when the server starts. When models are large and loading takes a long time, it's useful to pload the models in advance. The automatic loading can be switched on in the '''Model properties''' dialog (available in the models list in the header) in the '''Details''' tab by changing the '''Load Model on Startup''' checkbox.  


For models that are set to load automatically on server startup, you also need to set the '''Drop Unused Model After'' setting to a large value (as shown by the previous example), to make sure that it remains in the memory even if it's not used (e.g. ''100.00:00:00'').
For models that are set to load automatically on server startup, you also need to set the '''Drop Unused Model After'' setting to a large value to make sure that it remains in the memory even if it's not used (e.g. ''100.00:00:00'').


It's possible to control how many models are loaded simultaneously at maximum, to limit how much server capacity the model loading can use. The default value is two models at the same time. To change this setting, see the [[PA_Configuration_database_table_in_QPR_ProcessAnalyzer|PA_Configuration table]]. This setting only affects the model loading on startup (not model loading initiated by users). If loading of a model fails, the loading just continues to the next model.
It's possible to control how many models are loaded simultaneously at maximum, to limit how much server capacity the model loading can use. The default value is two models at the same time. To change this setting, see the [[PA_Configuration_database_table_in_QPR_ProcessAnalyzer|PA_Configuration table]]. This setting only affects the model loading on startup (not model loading initiated by users). If loading of a model fails, the loading continues to the next model.


For the setting to work, [[Installing_QPR_ProcessAnalyzer_Server#IIS_Configuration|IIS configuration]] for the QPR ProcessAnalyzer Server need to be in place.
Model loading is also started, when running a calculation for the model. When a calculation, that initiated a model loading, is cancelled, model loading is still continued. If a calculation is waiting for a model to be loaded, and model loading is cancelled, an error is returned to user waiting for the calculation.


Model loading into memory can be initiated by:
Note also the [[Roles_and_Permissions_in_QPR_ProcessAnalyzer#Model_Permissions|security context used to load models]].
* Running a calculation for a model. When a calculation, that initiated a model loading, is cancelled, model loading will not be cancelled. If a calculation is waiting for a model to be loaded, and model loading is cancelled, an error is returned to user waiting for the calculation results.
* Specifying LoadOnStartup configuration parameter for that model.
* Running ResetModelCache or ResetModelCacheByModelId functions with parameter ReloadModel=true
 
When ResetModelCache is called for a model that is currently being loaded, model loading is stopped.
 
Model is loaded in a security context that has the following permissions:
* For the project of the model being loaded: GenericRead, GenericWrite
* Global permissions: RunScripts
 
Model loading is  visible as a separate operation in the operation log (#1027#) that supports cancellation.


[[Category: QPR ProcessAnalyzer]]
[[Category: QPR ProcessAnalyzer]]

Revision as of 13:34, 29 June 2021

QPR ProcessAnalyzer models can be loaded automatically into the server memory already when the server starts. When models are large and loading takes a long time, it's useful to pload the models in advance. The automatic loading can be switched on in the Model properties dialog (available in the models list in the header) in the Details tab by changing the Load Model on Startup checkbox.

For models that are set to load automatically on server startup, you also need to set the 'Drop Unused Model After setting to a large value to make sure that it remains in the memory even if it's not used (e.g. 100.00:00:00).

It's possible to control how many models are loaded simultaneously at maximum, to limit how much server capacity the model loading can use. The default value is two models at the same time. To change this setting, see the PA_Configuration table. This setting only affects the model loading on startup (not model loading initiated by users). If loading of a model fails, the loading continues to the next model.

Model loading is also started, when running a calculation for the model. When a calculation, that initiated a model loading, is cancelled, model loading is still continued. If a calculation is waiting for a model to be loaded, and model loading is cancelled, an error is returned to user waiting for the calculation.

Note also the security context used to load models.