Setting System Cache Properties
This section explains how to set system cache properties to maximize event data integrity on an Optimize system. By default, the Optimize Analytic Engine caches event data in memory, which means that, in some cases, data can be lost if system components terminate or experience hardware failure. To provide enhanced event delivery integrity, this property enables you to configure an Optimize Analytic Engine to cache event data to disk so that event data is persisted even if a system component crashes or shuts down for some reason.
Note that disk caching can entail a significant performance penalty on some systems, especially those that process a large number of events; so making decision about caching options is often a matter of balancing performance vs. event integrity. When cache properties are configured for guaranteed event delivery, performance will be degraded to some degree, according to the specifics of your data and system configuration.
Basic cache configuration properties for the Analytic Engine are set using two parameters in the optimize\analysis\conf\wrapper.conf file. The first parameter specifies the desired level of event integrity. The second parameter specifies the local folder to use for persisting event data when it is cached to disk.
The two level settings available for the event caching parameter are as follows.
Normal - This is the default setting, and it is equivalent to having disc caching disabled. For practical purposes, there is no reason to explicitly set event caching to this level.
High - This setting saves event data to a specified disk location. However, event data is held in memory for some time, and if the Analytic terminates abnormally for some reason, that data could be lost. There is some performance degradation, though the exact amount depends on the specific system configuration and the amount of data being processed. The primary performance/event integrity trade-off occurs during Analytic Engine shutdown.
To enable disk caching on a system, you must add the appropriate lines to your wrapper.conf file to point to a valid folder on your system suitable for saving cache information, and you must specify the event guarantee level. The new caching information will take effect when you next start the system. If you implement disk caching, the persistence folder specified must have appropriate security configuration so that the user running the Analytic Engine has permission to write to the folder.
To set system cache properties:
1. Locate and open the Optimize_directory\analysis\conf\wrapper.conf file in a text editor.
2. Based on your system configuration, add the appropriate line to indicate the event caching persistence folder and the desired level of event guarantee. The following examples are sample event caching lines for a system that uses C:\temp (Windows) and /var/log (Linux) as the persistence folder, and High as the event guarantee level:
wrapper.java.additional.300= -Dsag.opt.persistence.dir="C:\temp" wrapper.java.additional.301= -Dsag.opt.event.guarantee=High
3. Save the file and close it. Remember that you must restart your system for any changes to take effect.
Note:
To minimize the potential for data loss, you must exercise caution if you are switching a system between event caching levels. Before switching the event caching setting, shut off the date feed and allow data to be persisted to disk. Then, shutdown the Analytic Engine normally before you make a change to the event caching setting.
4. You must restart your system for changes to take effect.