The ReportGeneratorService issues one query for each log record type for each active test. For performance reasons, the retrieved log records are stored in the ABTestLogRepository's item cache while they are being processed. It is important that a particular query does not return more log records than can be stored in the cache. The number of records retrieved together is a function of the number of entries stored for any given test. A test will automatically log such things as page views, items added to cart, items purchased, and total price. If the number of entries for a test in a report generation window exceeds the cache size, the ReportGeneratorService will have to access the database to retrieve information for each log record not stored in cache, which will result in a significant loss of performance. The default cache size for all log record types is 500K. If it is likely that more than 500K of records will be logged for any of the log data types between runs of the ReportGeneratorService, it is recommended that the item-cache-size of that particular log record type be increased so that all the items can be stored in the cache.

The most common log record type that will experience this problem is the pageVisitLogData item-descriptor. This log record type logs every page visit for all test participants. If it is likely that there will be more than 500K page visits for members of a given test between runs of the ReportGeneratorService, it is recommended that you increase the item-cache-size of the pageVisitLogData item descriptor to a number that will assure that all the log records can be stored in cache. Another option is to turn off the logging for page visits. For more information, see the Turning off Logging section.

You must also be sure to allocate enough memory to handle the cache size. The default setting of a 500K cache size requires 1.5GB of heap space. Memory usage is linear, so increasing the cache size to 1M records will require 3GB of heap space.

Note: The log records are queried on a per-test basis. Therefore, even if 1M page visit records are logged between runs of the ReportGeneratorService, the cache size would not have to be increased if the records were divided evenly among, say, 4 tests. Since there would be only 250K records per test, the cache size of 500K would be sufficient.