Building the perfect MIPping machine [dual]

Yesterday’s post explained why I prefer to run solver on fast machines over big machines and gave a short example why. In today’s post, I provide some very personal guidelines on how to determine what kind of machine you might need to solve MIPs.  Beware: this post is more based on personal experiences than hard data.

How much RAM do you need?

A small problem with 2000 variables can require more memory than another problem which is significantly larger. You only need a lot of RAM if the kind of models you solve requires storing a large MIP search tree. Two examples:

  • absH6high_5n30, an inventory-routing problem instance from Coelho & Laporte has about 31700 binary variables and around 250,000 nonzeros. The size of the search tree grows very quickly; let this problem run for about one hour and the tree will consume 32 GB or RAM.
  • S19_02_1999 is a supply chain design instance from M’Barek, Martel & D’Amours. It has 150k variables and around 500k nonzeros. Although the problem takes more than 10 hours to solve using CPLEX 12.6, the MIP tree never gets larger than 50 megabytes, so the whole optimization process never consumes more than 400 MB of RAM.

When the solver exceeds the allowed RAM on your machine (or sometimes even before), it will start storing the nodes in files on your hard drive. Disks are several orders of magnitude slower than memory, so this is likely to slow down the execution by a substantial margin.

Whether an instance consumes a lot of memory or not depends on many factors. Structure is more significant than problem size in this regard. I am not aware of any method that could accurately predict the amount of memory needed to solve a MIP. The best to do is to run the problem in the interactive solver and monitor tree size and memory usage. (If you’re using a CPLEX API, you can export the model through the ExportModel method). A good thing is that the pattern is usually quite similar for different instances of the same models, assuming much of the data is similar. That is, if you do production planning for a company, much of the information won’t change between daily runs, and chances are that you will encounter a similar behavior over and over.

Again, read the log to understand which resources are consumed at which point in the search.

What types of processors are best?

I’m not a microprocessor expert, but I’ve experienced that the choice of processors also significantly impact performance. Past are the times when CPU clock speed meant everything: don’t rely too much on it. Also important is the presence of proper math accelerators, as well as the amount of internal cache. According to my experience, here is what I would suggest:

  • Intel Xeon processors are the best in line for doing long optimization runs. As of today, the Ivy-Bridge generation of processors from the EP line (labeled as Xeon E5-xxxx) are a good choice. The EX line are probably even better (Xeon E7-xxxx) but at more than 2000$ apiece, they are a bit too costly for my budget. I am also not sure if they have enough cache to make good use of their 12 cores. If anyone has any data on that, I’d be glad to update this post.
  • If you can’t get your hands on Xeon, then core i7 processors are the next best choice. I’ve been surprised at the good performance of the new i7-3770 equipped workstations we have. They are also very inexpensive. Finally, while not all models make good use of 12 cores, 4 are more likely to be used throughout the run.
  • Processors designed for laptops and mobile systems are not suited to the extreme amount of number-crunching done by solvers. Most sacrifice proper cooling systems to reduce the weight and dimensions of the computer. Processors often make up for this by having sensors that reduce the energy consumption and performance of the processor to avoid overheating, thus slowing the computer progressively during the optimization.

If you absolutely have to run solvers on your laptop or tablet, check the power settings of your computer to make sure it is working at full speed.

How many cores?

While allowing the solver to use more cores will reduce the average clock time required to solve MIPs, this is not always the case; in fact, adding core sometimes increase solution times. I have studied this phenomenon before – see the data for CPLEX and Gurobi. Between 4 and 8 cores seem to be a sweet spot for efficiency, as not all models will make good use of 12, 16 or 24 cores.

These are my personal tastes. Feel free to comment on my recommendations!


  1. Hi Marc,
    Very interesting post, thanks, and timely since we’re debating what specs to go for on a new mipping machine.

    Do you have particular reasons for preferring Xeons over the i7s? There’s an extensive (though somewhat old) post here debating the various merits. The main benefits discussed seem to not be overly related to MIP performance:
    – ECC RAM support. Tiny to small speed detriment but avoids hangs/crashes to do memory errors.
    – Bigger cache, though the non-ridiculous Xeon’s are basically the same.
    – More PCIe bandwidth (LGA2011-based Xeons), unlikely to be important for MIP since it seems to mostly relate to e.g. GPU communication.

    Would be nice to know whether the same speed Xeon is really worth the extra.

    We’re also working to get CPlex running on our cluster (, I’ll let you know when we have some benchmark results from there.

Speak Your Mind