Configuring the Cache Flush Time and Threshold Limits

You can define the Flush Time Limit, Upper Threshold and Lower Threshold features to limit the amount of cache memory that can be used to contain historic data files—this reduces the possibility of the server running out of memory when users are performing searches on historic data.

By default, the server flushes as much data as possible every 60 seconds. The duration of each flush is defined by the Flush Time Limit (1000 milliseconds by default). When a flush occurs, the server also monitors the amount of data that remains unflushed. If this amount is higher than the Upper Threshold limit, the server automatically decreases the flush interval to 30 seconds so that the data is flushed more frequently. If the amount of unflushed data is still higher than the Upper Threshold, the server will decrease the flush interval to 15 seconds. The server can continue to decrease the flush interval until it reaches 1 second and will continue to adjust the interval according to the amount of unflushed data. Typically, the flush interval will remain at 60 seconds or will fluctuate between 60 seconds and 30 seconds or 30 seconds and 15 seconds depending on the amount of data being searched.

If the server monitors the unflushed data and detects that the amount of unflushed data is lower than the Lower Threshold, the server will increase the flush interval. This helps to ensure that the server's resources are not wasted on flushing the data too frequently. When the amount of unflushed data is less than the Lower Threshold amount, the server will double the flush interval. If the unflushed data continues to be below the Lower Threshold amount, the server will double the flush interval again. The server can continue to double the flush interval until it reaches 60 seconds. If the unflushed data continues to be below the Lower Threshold amount, the server will continue to flush it once every 60 seconds.

On many systems, the default settings for the Cache Size, Flush Time Limit, Upper Threshold and Lower Threshold are appropriate and do not need to be altered. However, if memory usage is causing performance issues on your system, you may want to adjust the cache size, flush limit, and threshold settings.

To specify the Cache size:

  1. Access the Geo SCADA Expert Server Configuration Tool.
  2. Expand the Historic Configuration branch.
  3. Select the historical data type you require, Alarm Summary, Configuration Changes Auditing, Event Journal or Historic Data.

  4. Enter the required Flush Time Limit in milliseconds (between 50 and 30000 milliseconds). Remember that if you set the Flush Time Limit too low, there might be insufficient time for the flush to complete. Similarly, if you set the Flush Time Limit too high, the database might lock for extended periods while the flushing takes place. In both cases, these types of problems would only occur on busy systems.
    NOTICE

    SYSTEM PERFORMANCE MAYBE SEVERELY AFFECTED

    When historic data is being flushed to disk it is done under a write lock so for the duration of the Flush time limit the database is write locked. If you increase the flush time you also increase the duration of the database write lock which may affect the performance of the system.
    Flush performance can also be affected by anti-virus and defragmentation applications, which may require suitable exclusions to be configured.
    Ensure the values do not affect the performance of the system.
  5. Set the Upper Threshold and Lower Threshold amounts as required (both are defined in MB). You need to set the Upper Threshold to a higher amount than the Lower Threshold (Geo SCADA Expert will not allow you to apply an Upper Threshold that is a lower percentage than the Lower Threshold).

    On many systems, the default settings of 51 MB and 25 MB are appropriate. If you change these settings you should review the system performance to ensure the system is operating as expected.

  6. Right-click on the system icon in the tree-structure, and select the Apply Changes option to apply the changes.

For information on the other Historic Configuration settings, refer to the list of features at the start of this section (see Historic Configuration Settings).

If you are unfamiliar with the server configuration process, we recommend that you proceed to define the Search Limits for Historic Data Searches.


Disclaimer

Geo SCADA Expert 2020