Simply put, my question is why Gurobi on Windows significantly slower compared to Linux (and even WSL2). And one step further, if there's a simple setting I'm missing to make Windows match the performance of Linux?
I was mostly using Gurobi directly on my Windows machine, but for fun also tried out the Compute Server docker image running in WSL2, just to see what the overhead of WSL2 was. It turns out WSL2 was _faster_ in solving than native Windows. This piqued my interest, so going one step further I also tried running on a Ubuntu Live USB. This turned out to be faster still. Note that this means I'm testing all this on the exact same hardware.
I would expect some overhead when using WSL2, but otherwise I would expect native Windows and native Linux to be very similar in performance. I certainly would not expect native Windows to be that slow. The work units seem to not differ _as_ much as the wall time (especially for the seed runs of cost226-UUE), although I'm not sure what this means.
I tested with two models from the MIPLIP2017 set, selected because they had ~5 minute runtimes (i.e. slow enough to measure difference in speed, but not slow enough to have to wait hours for results): bnatt400 and cost266-UUE.
Below I've tried to summarize the results:
Windows CS: Explored 37709 nodes (38178539 simplex iterations) in 427.84 seconds (725.70 work units)
WSL2 CS: Explored 13446 nodes (12109196 simplex iterations) in 270.33 seconds (358.05 work units)
Linux CS: Explored 13446 nodes (12109196 simplex iterations) in 187.45 seconds (358.05 work units)
Windows CS: Explored 174342 nodes (16041645 simplex iterations) in 478.56 seconds (287.37 work units)
WSL2 CS: Explored 168890 nodes (16051099 simplex iterations) in 259.68 seconds (291.48 work units)
Linux CS: Explored 168890 nodes (16051099 simplex iterations) in 188.09 seconds (291.48 work units)
cost266-UUE seed runs
Windows - default seed: Explored 174342 nodes (16041645 simplex iterations) in 478.56 seconds (287.37 work units)
Windows - 100: Explored 164319 nodes (17885279 simplex iterations) in 424.16 seconds (276.17 work units)
Windows - 1000: Explored 200445 nodes (21141094 simplex iterations) in 613.85 seconds (435.11 work units)
Windows - 10000: Explored 221163 nodes (21536535 simplex iterations) in 712.02 seconds (400.61 work units)
wsl2 - default seed: Explored 168890 nodes (16051099 simplex iterations) in 259.68 seconds (291.48 work units)
wsl2 - 100: Explored 170931 nodes (18453681 simplex iterations) in 277.35 seconds (272.70 work units)
wsl2 - 1000: Explored 215428 nodes (21704406 simplex iterations) in 372.57 seconds (420.57 work units)
wsl2 - 10000: Explored 157469 nodes (14988594 simplex iterations) in 234.69 seconds (284.30 work units)
Please sign in to leave a comment.