Unica Optimize session takes a long time to run

Here are troubleshooting steps that you can follow if you believe your Unica Optimize session is taking too long to run.

Before you start

  1. Make sure that the session is not running with Optimize|Debug|ExtraVerbose enabled, as this setting causes slow run times. Check both the session-level advanced settings and the configuration properties.
  2. Make sure that you are using a DB loader, and that it is properly configured.
  3. If you are using time intervals with your rules, make sure that the contact history tables for your audience level are indexed.
  4. Set Optimize|Logging|loggingLevels to MEDIUM or LOW. Check both the session-level advanced settings and the configuration properties.

Run a session to generate a clean log for troubleshooting

If your Unica Optimize session takes a long time to run after you follow the steps in Before you start, you need to collect detailed information to analyze.

Run a session to generate a clean Unica Optimize server log with the HIGH or ALL setting on. While your session is running, do not access any Unica Optimize reports, as this action adds data to the log that can confuse things. This session might take a longer time to run because you are collecting detailed log data. Remember to reset Optimize|Logging|loggingLevels to MEDIUM or LOW after you collect the clean log.

When you have the generated log, you check for two things:

  • The amount of time spent accessing the database to set up the data that is needed for the session.
  • The amount of time spent processing customer samples (chunks).

How to check the amount of time spent accessing the database

Using the clean log you generated, follow these steps to find out how long Unica Optimize is taking to access the database to set up the data that is needed for the session.

  1. In the Unica Optimize server log, search for the string: LRE Starting chunk: 0
  2. Take the timestamp of this entry, and subtract from it the timestamp of the first entry in the log. The difference is the amount of time spent accessing the database to set up the data that is needed to run the session.

    If the value seems too high, look at the start and end timestamps for the queries that comprise the log section preceding LRE Starting chunk: 0 to identify which one is taking too long.

  3. Then, troubleshoot the task that took too long in the same way as you would any other database performance issue.

How to check the amount of time spent processing customer samples (chunks)

Using the clean log you generated, follow this procedure to find out how long Unica Optimize is taking to process customer samples.

In the Unica Optimize server log, subtract the time stamp from the line matching LRE Starting chunk: 0 from the time stamp of the line matching Run Thread terminated.

This log entry tells you the total time that is spent in the CPU-intensive optimization section. If this action is where the bulk of the time is being spent, you can get a better idea of what is going on by looking at the chunk iterations.

The optimal solution for each chunk is found by iterating through the following steps:

  1. Apply a set of scores to the offers in that chunk
  2. Find the optimal solutions with those scores for the customers in the chunk by using the core algorithm.
  3. Use the result in the outer algorithm to find a new set of scores to try.

Each time Unica Optimize applies a set of scores, it counts as one chunk iteration. The amount of time that is spent in the CPU-intensive section is roughly proportional to the average number of iterations per chunk.