Qlik Community

Qlik Scalability

A group dedicated to advancing Qlik scalability and performance. In this group we will share knowledge on how to perform load tests of Qlik products.

Highlighted
Employee
Employee

Pre-caching using the Qlik Sense Scalability Tools (.NET SDK)

Pre-caching is used to trigger certain selections and actions in an app in order to have the calculations cached. This can save valuable time as fetching something from the cache is much faster than performing the needed calculations when the first users enter the system.

During a restart of the Qlik Associative Engine all cached result sets are purged and during a reload, when the source data is modified, the result sets from previously cached calculations become invalid. So, to avoid poor performance for the first users after a restart, the unloading of an app, or a reload it may be beneficial to pre-cache common calculations.

The SDKExerciser in the Qlik Sense Scalability Tools  can be used to perform pre-caching in Qlik Sense and Qlik Sense Enterprise for Windows (QSEfW) deployments (that is, deployments based on Microsoft Windows).

The SDKExerciser is based on the Qlik Sense .NET SDK: https://help.qlik.com/en-US/sense-developer/Subsystems/NetSDKAPI/Content/Sense_NetSDKAPI/Introductio...

Do the following to set up pre-caching using the Qlik Sense Scalability Tools:

1.

Create a pre-caching scenario using the Qlik Sense Scalability Tools.

The tools are available here: https://community.qlik.com/t5/Qlik-Scalability/Qlik-Sense-Scalability-Tools/gpm-p/1490846

When creating the scenario, keep the following differences between pre-caching and load/performance scenarios in mind:

  • Pre-caching scenarios should not use randomization to the same extent as load/performance scenarios.
  • Usually only one concurrent user is needed to build up the cache.
  • Minimize the think times between actions as pre-caching scenarios do not have to replicate reality.

Save the pre-caching scenario as a script file (.json file).

2.

Create a Windows batch file (.bat) that executes the pre-caching scenario.

Example of batch file contents:

C:\ScalabilityTools-5.3.0\SDKExerciser\Feb2019\SDKExerciserConsole.exe config=C:\ScalabilityTools-5.3.0\Scenario\MyPre-cachingScript.json LogDir=C:\ScalabilityTools-5.3.0\PreCache\log\Myapp1\

For information on the SDKExerciser settings, see the documentation for the Qlik Sense Scalability Tools.

Note: When calling the pre-caching script from the batch file, make sure to use the SDKExerciser module version ("Feb2019" in the example above) that corresponds to your Qlik Sense version.

3. Select a scheduling mechanism (for example, the Task Scheduler in Microsoft Windows) and configure it to run the batch file when needed.

 

Cheers from the Scalability Team