Memory management for retrieval of classic storage data
- Last UpdatedFeb 27, 2025
- 3 minute read
The AVEVA Historian Indexing Service (aahIndexSvc.exe) is used to retrieve data that was stored by the Classic Storage subsystem.
For large systems, it is possible that loading the tag information from all of the history blocks will require more memory than the 2 GB limit that is imposed by the Windows operating system for a single process. The actual limit may be even be less than 2 GB, if the amount of installed RAM is insufficient.
The total amount of tag information for the history blocks depends not only on the total number of tags, but also on the number of tag versions, which are created during modifications to old data. Therefore, it is recommended that you monitor the memory consumption for all systems, large and small, if you are regularly performing data inserts, updates, or CSV file imports.
To avoid excessive memory consumption by the AVEVA Historian Indexing Service, tune and monitor the service for your system using the following system parameters and system tags.
-
HistoryCacheSize and HistoryDaysAlwaysCached system parameters.
You can limit the maximum amount of memory the Indexing Service can use for tag information by adjusting the value of the HistoryCacheSize system parameter. When this parameter is set 0 (default), the Indexing Service selects a default cache value automatically by taking into account the amount of installed physical memory and the maximum available address space for the process. In some rare cases when some specific performance tuning is needed, you may want to set the HistoryCacheSize parameter manually. In this case, the Indexing Service uses the specified value, but still may automatically change the effective HistoryCacheSize if the specified value is too low or too high.Regardless of whether the effective HistoryCacheSize was selected automatically (default) or specified by you, the Indexing Service manages the cache using a "least-recently used" algorithm. In this algorithm, when there is a request to access a history block that is not currently cached, the Indexing Service unloads the tag information from the least-recently used history block and then loads the tag information from the requested block.
All of these operations are performed automatically in the background, but you may notice a slowness data retrieval if the data is retrieved from a block that is not currently loaded into memory. Keep in mind that the smaller the amount of memory that you allocate for the cache, the potentially longer it may take to service data requests.
To guarantee the maximum retrieval performance for the newest history blocks (for example, if you a running a trend application for the last week), you can "lock" a certain number of the most recent history blocks in the cache. To do this, set the number of days to be locked in the cache by changing the HistoryDaysAlwaysCached system parameter.
-
SysHistoryCacheFaults and SysHistoryCacheUsed system tags.
To determine if you need to clamp the memory used by the Indexing Service, use the Windows Task Manager application or the Performance console to see how much memory is used by the aahIndexSvc.exe process. Also, you can monitor the SysHistoryCacheFaults and SysHistoryCacheUsed system tags. A high number of cache faults may be indicating that the cache size is insufficient. The SysHistoryCacheUsed system tag shows the number of bytes currently used for keeping the tag information. This tag may be helpful to see how much memory is consumed by the tag information, even if the memory management is not enabled.
At any time, you can observe the current status of the history blocks in the AVEVA Historian Management Console. When the tag information from a history block is not loaded into memory, the history block icon is dimmed. You can manually refresh the console window to see changes in the status for the history blocks.