Model running much slower on new, faster computer

Problems with modeling
Post Reply
en2ec1
User
User
Posts: 9
Joined: 2 years ago

Model running much slower on new, faster computer

Post by en2ec1 »

I just got a new laptop with an 11th gen i9 and 64 Gb RAM. The old laptop was a 10th gen i7 with 32 GB of RAM. Both have fast SSDs. By every metric, the new laptop should be faster than the old laptop. Single threaded performance is meant to be only slightly faster on the new laptop, but it isn't slower.

I have a global energy model that I'm running on a loop through 31 scenarios, using CPLEX. The old laptop takes about 40 minutes to do all 31 scenarios. The new laptop takes 1 hour and 40 minutes to do all 31 scenarios. The model, data and scenarios are identical. They've been copied directly over. I didn't expect a big improvement, but I really didn't expect it to take 2.5 times longer.

Is there some windows or BIOS settings on the new computer that I need to change? I seem to recall something about turning off hyperthreading when I set up the old laptop, but I couldn't find that guidance, so I'm not sure.

I had tried GAMS Studio on the new laptop rather than IDE, and I thought maybe that was the reason. My testing shows that IDE and Studio run the same on the new laptop. Both are much slower than the old laptop.
User avatar
bussieck
Moderator
Moderator
Posts: 1048
Joined: 7 years ago

Re: Model running much slower on new, faster computer

Post by bussieck »

Performance degradation of the size has probably little to do with your old vs. new hardware. I would carefully compare the logs of the runs on the new and old machine and see where they start to differ. I doubt that they are identical (other than different times). I guess on the new machine something in the solve goes very different. Depending on the type of analysis you run (independent scenarios vs. dependent scenarios, i.e. input of the nth scenario depends on the output of the n-1st scenario) the GAMS programs may do very different things on the different machines. Hard to say what's going on exactly without the logs.

-Michael
en2ec1
User
User
Posts: 9
Joined: 2 years ago

Re: Model running much slower on new, faster computer

Post by en2ec1 »

Michael,

Thanks. I was looking at the log files, and it appears that on the first scenario, the new system outperforms the old system, and everything else looks identical. On the next loop and solve, the old system appears to be starting at a point much closer to the optimal; whereas the new system seems to start each new scenario solve from the beginning without any benefit of the previous solution.

The log files are huge, so I won't paste them here. But I'll give you an example. The first iteration in the first scenario starts the same for old and new systems with a value of 8299 and then a final value of 117603. On this first scenario, the new system finds the solution in 39 seconds, while the old system finds it in 49 seconds. That's as I would expect, but then things diverge.

On the old system, the next scenario starts with a first iteration value of 117755 and takes 17.5 seconds to find the optimal of 117752. The new system starts the second scenario at a value of 8299 and takes 69 seconds to find the optimal value of 117752. This pattern repeats throughout the remaining scenarios.

But the thing is, I don't recall doing anything that would make the old system solve in a "smarter" way by starting with the previous solution. I just put a simple loop around my solve statement, changing the capital cost assumptions of a couple of technologies for each scenario as it loops through. I copied over the same option file as well as the same code and data to the new system.

Eric
User avatar
bussieck
Moderator
Moderator
Posts: 1048
Joined: 7 years ago

Re: Model running much slower on new, faster computer

Post by bussieck »

Eric,

I assume you run the same version of GAMS on both computers. What solver are you using? Perhaps, the end of the first scenario and the beginning of the next scenario (for both computers) might be sufficient to tell more.

-Michael
en2ec1
User
User
Posts: 9
Joined: 2 years ago

Re: Model running much slower on new, faster computer

Post by en2ec1 »

Hi Michael,

I am copying some relevant bits from the log files from the old computer and new computer. The beginning and end of the first and second solves for both computers.
The subsequent solves follow the same pattern. Thanks again for your help.

OLD computer 1st solve in loop (cutting out the middle):

IBM ILOG CPLEX 25.1.2 r67455 Released Aug 1, 2018 WEI x86 64bit/MS Windows
--- GAMS/Cplex licensed for continuous and discrete problems.
Cplex 12.8.0.0

Reading parameter(s) from "C:\MOCCE\cplex.opt"
>> IIS 1
Finished reading from "C:\MOCCE\cplex.opt"
Reading data...
Starting Cplex...
Unable to load names.
CPXPARAM_Advance 0
CPXPARAM_Simplex_Limits_Iterations 2000000000
CPXPARAM_TimeLimit 1000
CPXPARAM_Threads 1
CPXPARAM_Parallel 1
CPXPARAM_Tune_TimeLimit 200
Tried aggregator 1 time.
LP Presolve eliminated 9689565 rows and 8715669 columns.
Aggregator did 410105 substitutions.
Reduced LP has 53291 rows, 84518 columns, and 498694 nonzeros.
Presolve time = 2.89 sec. (4478.86 ticks)
Initializing dual steep norms . . .

Iteration log . . .
Iteration: 1 Dual objective = 8299.227883
.....
Iteration: 95814 Dual objective = 117818.385780
Removing perturbation.
Iteration: 95821 Scaled dual infeas = 7.946542
Iteration: 95881 Dual objective = -64619551.040973
LP status(1): optimal
Cplex Time: 48.52sec (det. 59628.70 ticks)

Optimal solution found.
Objective : 117603.493128

NEW computer 1st solve in loop:

IBM ILOG CPLEX 38.2.1 96226ea8 Feb 19, 2022 WEI x86 64bit/MS Window

--- GAMS/Cplex Link licensed for continuous and discrete problems.

Reading parameter(s) from "C:\Model\cplex.opt"
>> IIS 1
Finished reading from "C:\Model\cplex.opt"

--- GMO setup time: 0.00s
--- GMO memory 3339.85 Mb (peak 3410.12 Mb)
--- Cplex 20.1.0.1 link memory 291.86 Mb (peak 758.98 Mb)
--- Starting Cplex

Version identifier: 20.1.0.1 | 2021-04-07 | 3a818710c
CPXPARAM_Advance 0
CPXPARAM_Threads 1
CPXPARAM_MIP_Display 4
CPXPARAM_MIP_Pool_Capacity 0
CPXPARAM_MIP_Tolerances_AbsMIPGap 0
Tried aggregator 1 time.
LP Presolve eliminated 9689564 rows and 8715669 columns.
Aggregator did 410105 substitutions.
Reduced LP has 53291 rows, 84518 columns, and 498694 nonzeros.
Presolve time = 3.49 sec. (5285.24 ticks)
Initializing dual steep norms . . .

Iteration log . . .
Iteration: 1 Dual objective = 8299.227883
......
Iteration: 95042 Dual objective = 117603.429724

--- LP status (1): optimal.
--- Cplex Time: 38.97sec (det. 54641.97 ticks)


Optimal solution found
Objective: 117603.493129


The SECOND solve old computer:

IBM ILOG CPLEX 25.1.2 r67455 Released Aug 1, 2018 WEI x86 64bit/MS Windows
--- GAMS/Cplex licensed for continuous and discrete problems.
Cplex 12.8.0.0

Reading parameter(s) from "C:\MOCCE\cplex.opt"
>> IIS 1
Finished reading from "C:\MOCCE\cplex.opt"
Reading data...
Starting Cplex...
Space for names approximately 1360.28 Mb
Use option 'names no' to turn use of names off
CPXPARAM_Advance 2
CPXPARAM_Simplex_Limits_Iterations 2000000000
CPXPARAM_TimeLimit 1000
CPXPARAM_Threads 1
CPXPARAM_Parallel 1
CPXPARAM_Tune_TimeLimit 200
Tried aggregator 1 time.
LP Presolve eliminated 9689565 rows and 8715669 columns.
Aggregator did 410105 substitutions.
Reduced LP has 53291 rows, 84518 columns, and 498694 nonzeros.
Presolve time = 3.78 sec. (6568.62 ticks)
Using devex.

Iteration log . . .
Iteration: 1 Objective = 117755.946229
......
Iteration: 21957 Dual objective = 117752.285050
LP status(1): optimal
Cplex Time: 17.50sec (det. 28022.96 ticks)

Optimal solution found.
Objective : 117752.285050

The SECOND solve for the new computer:

Reading parameter(s) from "C:\Model\cplex.opt"
>> IIS 1
Finished reading from "C:\Model\cplex.opt"

--- GMO setup time: 0.00s
--- Space for names approximately 1360.28 Mb
--- Use option 'names no' to turn use of names off
--- GMO memory 3339.85 Mb (peak 3410.12 Mb)
--- Dictionary memory 0.00 Mb
--- Cplex 20.1.0.1 link memory 291.86 Mb (peak 2119.26 Mb)
--- Starting Cplex

Version identifier: 20.1.0.1 | 2021-04-07 | 3a818710c
CPXPARAM_Advance 2
CPXPARAM_Threads 1
CPXPARAM_MIP_Display 4
CPXPARAM_MIP_Pool_Capacity 0
CPXPARAM_MIP_Tolerances_AbsMIPGap 0
Tried aggregator 1 time.
LP Presolve eliminated 9689564 rows and 8715669 columns.
Aggregator did 410105 substitutions.
Reduced LP has 53291 rows, 84518 columns, and 498694 nonzeros.
Presolve time = 4.16 sec. (7765.74 ticks)
Elapsed time = 5.69 sec. (10381.64 ticks, 1 iterations)

Iteration log . . .
Iteration: 1 Dual objective = 8299.227883
.......
Iteration: 107246 Dual objective = 117751.918731

--- LP status (1): optimal.
--- Cplex Time: 69.36sec (det. 113107.47 ticks)


Optimal solution found
Objective: 117752.285051
Post Reply