Skip to main content

Running time increase when running multiple models

Answered

Comments

1 comment

  • Dan Steffy
    Gurobi Staff Gurobi Staff

    Hello Assia,

    It looks like when running multiple jobs in parallel, you are oversubscribing the usage of the CPU. You can see a clue when comparing the time and work done between the two runs:

    196.46 seconds (339.24 work units)
    988.68 seconds (339.24 work units)

    The second run did the same amount of work but simply took more time. This suggests that you had several processes running simultaneously and that the number of threads they were collectively using was larger than the number of cores on the machine. This situation causes some threads to sit idle, waiting for turns to be scheduled on one of the CPU cores.

    Thread count was 32 (of 112 available processors)

    I suggest setting the Gurobi Threads parameter to a lower value for your runs. This will restrict the number of threads used by each Gurobi process. You could experiment with different values, but a good starting point would be to set Threads to a value such that the number of Threads used by each Gurobi process, multiplied by the number of processes you will run concurrently, is no larger than the number of available CPU cores on the machine you are using.

    I hope this helps,

    -Dan

    0

Please sign in to leave a comment.