I understand that RAM required for optimization problem is problem specific and some problems require much more memory. I am thinking how much RAM I need for my system and need to decide between getting 32 GB or 64 GB. The processor has 24 threads which means using more threads will require more RAM. Is 32 GB RAM enough for most optimization problems of the form LP, MILP, QP and MIQP problems?
-
5$\begingroup$ The more, the merrier. Problem sizes tend to increase to use available memory. Every extra thread for MILP, MIQP, MISOCP, uses extra memory. Even 64 GB is not very much nowadays. $\endgroup$– Mark L. StoneDec 10, 2021 at 18:44
-
6$\begingroup$ Required RAM is obviously affected by the size of the model, not just the type (LP, MILP, ...). Also, many solvers will swap portions of the model or portions of the search tree to disk, so to some extent less RAM translates to longer run times as opposed to a flat-out failure to solve. $\endgroup$– prubin ♦Dec 10, 2021 at 19:05
-
2$\begingroup$ Have your tested RAM-usage on your current device? I mean, seems highly dependent on specifics of the model and algorithm. $\endgroup$– NatDec 11, 2021 at 8:30
-
$\begingroup$ Following up on this, is there a practical maximum RAM for Gurobi? I just bought a server that can take 256gb. An acquaintance said that anything beyond 128gb in Windows is inefficiency used. Is it worth it just to load this server up to the gills anyways? $\endgroup$– Ralph AsherMay 5, 2022 at 2:55
-
$\begingroup$ The answer to your question very much depends on how you intend to use that server. If you want to be able to run several larger optimization jobs at the same time, try to get as much memory as possible. I have never heard that Windows cannot handle 256GB efficiently but if you're concerned about that, maybe try Linux :-) $\endgroup$– mattmiltenMay 5, 2022 at 5:38
1 Answer
Easy answer: 64 GB
With 24 threads (is this already including hyperthreads? Maybe not, so we are actually talking about 48 threads...) you'll have about 2 and a half GB for every thread - that's not very much if you really want to make good use of those threads. So going for 32 GB is definitely the wrong move and you'll most likely regret this choice.
AFAIK, every competitive optimization solver treats memory as a more or less abundant resource and will often have no difficulties filling it up. You are more likely to use some parameter settings to avoid out-of-memory issues even with 64 GB, so if possible, you should go for even more memory.
-
1$\begingroup$ Thank you. 24 threads includes hyperthreads, ie. max number of threads that can be used $\endgroup$– JonnDec 10, 2021 at 19:35