New Hardware Configuration for Decision Optimization

AlainChabrier
3 min readFeb 1, 2022

--

A new hardware configuration is available to solve Decision Optimization models in Cloud Pak for Data.

Since the integration of Decision Optimization (DO) in Watson Studio (WS) and Cloud Pak for Data (CP4D), we had 3 hardware configurations available to run deployed models:

  • S (Small) 2 vCPU and 8 GB RAM
  • M (Medium) 4 vCPU and 16 GB RAM
  • XL (Extra Large) 16 vCPU and 64 GB RAM

We had some requests about why we had nothing in between M and XL. Sometimes M is too small, but XL is too expensive.

Hence we have introduced a new intermediate Large T Shirt Size.

Specifications and costs

The new Large T Shirt Size has 8 CPUs and 32 GB and a multiplier of 50, meaning that 50 CUH are consumed per hour of optimization runtime, as shown in the IBM Cloud catalog. Refer to this previous post on pricing FAQs for a description of the multiplier behavior.

How to use it?

There is nothing new. Just use L (for Large) instead of S (for Small), etc, when appropriate.

When using REST APIs, you can use a code like:

{
"name":"test-Diet-deploy",
"space_id":"my_space_id",
"asset": {
"id": "xxxxxxxxxxxxxxxxxxxxxx"
},
"hardware_spec":{
"name":"L",
"num_nodes": 1
}
}

See this earlier earlier post for a complete description of how to use REST APIs.

When using WML client, you can use a code like:

deployment_props = {
client.deployments.ConfigurationMetaNames.NAME: deployment_name,
client.deployments.ConfigurationMetaNames.DESCRIPTION: deployment_name,
client.deployments.ConfigurationMetaNames.BATCH: {},
client.deployments.ConfigurationMetaNames.HARDWARE_SPEC: {'name': 'L', 'nodes': 1}
}

deployment_details = client.deployments.create(model_uid, meta_props=deployment_props)

See this earlier post for a complete sequence of Python code.

And from the graphical User Interface, just choose the right size when creating the deployment, as follow:

Choose Hardware definition.

As of today, it is not yet possible to use any other hardware configuration than Small in the Decision Optimization Experiments. In order to benefit from more cores and/or memory during model developement, please use Notebooks.

Cores and memory with CPLEX

Using more CPUs is useful mostly when solving Mixed Integer Programs (MIP), where CPLEX will be explore several nodes of the branch and bound tree at the same time on different threads.

You might need to instruct CPLEX to use a certain number of threads setting the right parameter such as in the following docplex code:

mdl.parameters.threads = 16
mdl.solve(log_output=True)

Note that when run in deployment mode, one of the core is used to manage the execution, so that only N-1 cores can be given to the CPLEX engine.

By default, CPLEX is automatically set to use all possible cores when used in CP4D.

When using paralelism with MIPs to accelerate the search, attention should be given to the Parallel Model Switch parameter. With Opportunistic mode, CPLEX will try to benefit as much as possible of parallelism, and as a result, may not follow the exact same path for successive runs even starting from the exact same initial point on the same machine. To really ensure the same path and exact same solutions are found, the Deterministic mode should be used.

Using more memory is also useful when exploring big MIPs, as all the data on the remaining tree to be explored is consuming memory. An alternative is to to allow this to be dumped in the disk, but that will slow the search. You may want to have a look at the Memory Reduction Switch, the Node Storage File Switch and the Memory Available for Working Storage parameters. This post on CPLEX Memory Usage for MIPs from Xavier Nodet provides more details on this topic.

For more stories about AI and DO, or DO in Cloud Pak for Data follow me on Medium, Twitter or LinkedIn.

--

--

AlainChabrier

Former Decision Optimization Senior Technical Staff Member at IBM Opinions are my own and I do not work for any company anymore.