Optimize session takes a long time to run

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

Before you start
1.
Make sure the session was not running with Optimize|Debug|ExtraVerbose enabled, as this setting causes slow run times.
2.
3.
4.
Set the Optimize server logging level to MEDIUM or LOW.
Run a session to generate a clean log for troubleshooting

Run a session to generate a clean Optimize server log with the HIGH or ALL setting on. While your session is running, do not access any Optimize reports, as this will add data to the log that may confuse things.

When you have the generated log, you will check for 2 things:

*
*
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 Optimize is taking to access the database to set up the data needed for the session.

1.
In the Optimize server log, search for the string: LRE Starting chunk: 0
2.
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.
How to check the amount of time spent processing customer samples (chunks)

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

1.
In the 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 will tell you the total time spent in the CPU-intensive optimization section. If this is where the bulk of the time is being spent (typically, this is the case), 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 applying a set of scores to the offers in that chunk, finding the optimal solutions with those scores for the chunk’s customers by using the core algorithm, then using the result in the outer algorithm to find a new set of scores to try. Each time this happens, it counts as one chunk iteration. The amount of time spent in the CPU-intensive section will be roughly proportional to the average number of iterations per chunk.