In this article:

Setting Up Caching

Loading Data to Global Cache

Loading Cached Data to RAM

Saving Data on Global Cache Use

Global Cache Management Console

Memory Use and Performance

Scenarios of Global Cache Use

Logging of Executed Operations

Global Cache Constraints

Working with Global Cache

Multidimensional cubes and dictionaries store data in flat relational structures. When working with multidimensional cubes, a query is executed for data selection from relational structures, then data selection results should be loaded and built into multidimensional structures. If there is much data, fragmentation of index information of relational structures, a number of conditions during query execution selection, loading and building in multidimensional structures, it may require much time to be executed. To speed up Foresight Analytics Platform, there is a built-in capability for working with data cache of dictionaries, standard cubes and cube views and virtual cubes. When cache is used, the previously loaded and built multidimensional structure is saved in DBMS and is loaded to RAM on the first work with the object.

There are two modes for working with cache:

Both modes can be used to cache data of dictionaries and cubes.

Setting Up Caching

To cache data of cubes and dictionaries using global cache, save objects in multidimensional form in DBMS.

The availability of data caching for cubes and dictionaries depending on the caching mode in the web application in Linux OS and Windows OS:

Caching mode Cube Dictionary
Session
Cross-session

The availability of data caching for cubes and dictionaries depending on the caching mode in the desktop application in Windows OS:

Caching mode Cube Dictionary
Session
Cross-session

Conventions:

- caching is available.

- caching is unavailable.

NOTE. Working with configured and created cache is available for cubes and dictionaries of any type of applications and the OS in use.

Session Caching Settings

To use session caching of cubes in the desktop application in Windows OS:

  1. Specify the global value for the CacheType string parameter in the InMem section in the settings.xml file or in system registry settings of Windows OS.

NOTE. If the InMem section or the CacheType string parameter are absent, create them manually. The InMem section should be filled on all client computers.

  1. Select a cube, which data should be cached, in the object navigator.

  2. Enable caching for the selected object using the Cacheable Object checkbox on the Cache tab in the object properties.

  3. Select the database, in which a special storage structure will be created, in the drop-down list. If a default database is set in the current repository, it will be displayed in the drop-down list. When database changes, cache is deleted, and a new empty special storage structure is created in the selected database.

  4. Click the Update Cache button to save the built multidimensional object in the database. Take into account that all cube data is saved in the database. To save cube cache by a specific selection, use the global cache management console. Features of working with cache:

    • If an object is parametric, cache should be created for all necessary sets of parameter values. The dialog box for setting parameter opens on clicking the Update Cache button.

    • If shortcuts are created for standard cubes, an individual cache can be created and set up for a shortcut. If the shortcut does not have cache, source cube cache is used.

To use session caching of dictionaries in the desktop application in Windows OS:

  1. Specify the global value for the CacheType string parameter in the InMem section in the settings.xml file or in system registry settings of Windows OS.

NOTE. If the InMem section or the CacheType string parameter are absent, create them manually. The InMem section should be filled on all client computers.

  1. Select a dictionary, which data should be cached, in the object navigator.

  2. Enable caching for the selected object using the Cacheable Object checkbox on the Cache tab in the object properties.

  3. Select the database, in which a special storage structure will be created, in the drop-down list. If a default database is set in the current repository, it will be displayed in the drop-down list. When database changes, cache is deleted, and a new empty special storage structure is created in the selected database.

  4. Click the Update Cache button to save the built object in the database. Take into account that all dictionary elements is saved in the database. Features of working with cache:

    • If an object is parametric, cache should be created for all necessary sets of parameter values. The dialog box for setting parameter opens on clicking the Update Cache button.

After executing the operations a dictionary or cube can be used in the session cache mode when the object will be loaded to RAM on its first use, and additional queries to DBMS will not be executed on the next use of the object within the current session.

Cross-Session Caching Settings

To use cross-session cache:

  1. Specify the global value for the CacheType string parameter in the InMem section in the settings.xml file or in system registry settings of Windows OS or Linux OS based on them.

NOTE. If the InMem section or the CacheType string parameter are absent, create them manually. The InMem section should be filled in on all client computers in the desktop application, or on BI server in the web application.

  1. Additional settings:

NOTE. If the Dimensions section or the Cache integer parameter are absent, create them manually. The Dimensions section should be filled on all client computers if the desktop application is used, or on BI server if the web application is used.

After executing additional settings a dictionary can be used in the cross-session cache mode when the object will be loaded to RAM on its first use, and additional queries to DBMS will not be executed on any use of the object within the active session for the current BI server node.

Loading Data to Global Cache

There are various methods of data loading to global cache:

NOTE. After setting or changing settings in the settings.xml file or in system registry settings, restart the desktop application or BI server.

Selection of a global cache loading mode depends on the tasks to be solved and data sources structure.

Loading Cached Data to RAM

A cached object is loaded to RAM on the first use of this object. Then, depending on the settings, object data will be available only for the current user when session mode is used, or to all users when cross-session mode is used. All further object use will be executed in RAM, and additional queries to DBMS will not be created.

Full Cache

When full cube cache is used, the use of data in any slice results in loading of all cache to RAM, which may take longer time than working without cache, if the selection, by which data should be obtained, is not very large. In this case more memory will be used than without cache because all cue data will be stored in RAM.

If working with data does not assume the use of all data, one can divide data by parameters to save to cache in parts or to set selection on creating cache.

Cache by Parameters

If cache was saved for different parameter values, cache can be loaded to RAM for each parameter in parallel using different indicators.

NOTE. The cache by parameters is only available for parametric cubes and dictionaries.

Saving Data on Global Cache Use

If the data loaded to RAM was changed and saved to source, it will be visible to users until cache is in RAM. If cache was unloaded from RAM and loaded to it again, the changed data will not be visible.

As global cache is stored separately from cube and dictionary data, when the source data is changed in source objects, it is not loaded to cache automatically.

To update cache data, click the Update Cache button in object properties or "warm-up" cache again using the cache "warm-up" wizard of the global cache management console. Take into account features of saving data for full cache or cache by parameters in multi-user mode:

Global Cache Management Console

To open the console:

http://<IP address or DNS server name>/fp10.x/app/cache.html#repo=<repository identifier>

NOTE. To work with the global cache management console, the repository should contain the Cube Cache extension installed.

Available settings:

Creating Data Cache

To create data cache and select a cacheable object, click the Set Up button in the cache creation wizard area on the console start page.

After executing the operation the Cache Model tab opens:

Determine settings:

Select cube for caching

Create and edit cache records

Delete cache record

Cache "Warm-up" Wizard

To populate a cache record with data, click the Set Up button in the cache creation wizard area on the console start page.

After executing the operation the Cache Warm-up tab opens:

Determine settings:

Select cube for cache "warm-up"

Set up cache "warm-up" method

Monitoring

To view records loaded to BI server memory, click the Set Up button in the memory monitoring wizard area on the console's start page.

The page will display a list of cache records that are currently loaded to memory. To clear the data matrix of any cache record, select it and click the Clear button. The record remains loaded but the number of points for it will be zero.

Memory Use and Performance

Before making a decision whether to use data caching, see work speed and memory use values. The indicators presented below depend on the hardware, DBMS server load, and other conditions.

Memory use depends on:

Averaged indicators of dictionary memory use and performance:

Number of dictionary elements, mln.

Amount and type of data of custom attributes

The first opening without cache, sec.

The first opening with cache, sec.

The second opening with "warned up" cache, sec.

Memory, Mb

1

-

5.93

1.81

0

273.2

1

3 integer, 2 string

6.49

2

0

320.5

1

5 integer, 5 string

6.59

2.05

0

355.6

3

-

16.95

5.15

0

849

3

3 integer, 2 string

17.99

5.7

0

952.5

3

5 integer, 5 string

18.43

6.31

0

1055.2

Averaged indicators of memory use and performance for cubes with real data type:

Number of records, mln.

Number of dimensions

Number of facts

The first opening without cache, sec.

The first opening with cache, sec.

The second opening with "warned up" cache, sec.

Memory, Gb

10

5

1

19.7

3.6

0

0.52

10

5

5

52.0

31.6

0

2.3

10

10

1

43.2

4.6

0

0.68

10

10

5

67.2

35.7

0.01

3.2

10

18

1

67

9

0.01

1.2

10

18

5

90.3

48.4

0.01

4.8

100

5

1

216.6

40.4

0.01

4.7

100

10

1

279.4

48.2

0.01

6.5

100

18

1

567.6

135.4

0.01

9.3

Take into account the effect of cube settings and cube structure on the amount of necessary RAM:

If the system is out of RAM during cache loading:

Scenarios of Global Cache Use

Use global cache if the following scenario is implemented:

When making a decision whether to use data caching in Foresight Analytics Platform, take into account that:

To be able to work with different data fragments in different time periods, use cache by parameters instead of full cache. To use cache by parameters, determine one or several object parameters and create your own cache fragment for each combination of parameters. "Warm-up" of each such cache fragment is managed separately, and any of them can always be added or removed from the common fragment pool.

Logging of Executed Operations

Data cache management console is used to log operations executed by the user. When the console opens for the first time, log storage tables will be created in the Cube Cache extension in the Service Objects folder. The console should be opened by the user who is a repository administrator.

The following tables are created:

NOTE. To ensure correct creating of tables, which store cache work log, the repository can be created based on PostgreSQL DBMS, and a default database should be set up in the repository.

By default, all repository users can access tables. If required, the administrator should set up access permissions according to developed system requirements.

Global Cache Constraints

Before making a decision whether to use data caching, see the constraints:

When executing data analysis and building reports based on cubes with enabled global cache, using the Analytical Queries (OLAP), Dashboards, Reports, Interactive Data Entry Forms tools, the following functions are not available:

See also:

In-Memory Data Caching