0
votes

I am running an optimization model (using Google.OrTools) that I build in .Net framework. When I run in my local, the application was running with a CPU of more than 99%, so my team has decided to move this application to Azure ScaleSet where I have one VM and I configured to Scale up to 10 VMs. The problem I face is the same >99% CPU only in my main VM even though new VMs have been added (scaled-up), the CPU on that VMs are <1%. I am now confused about working with ScaleSets in Azure.

In my above case, I am thinking that the job has not been shared with other VMs. How can I resolve this?

Please note that I am running my application using a Console Application and this job does not have frequent connections with database and also Drive, this job is a purely mathematical problem.

3
Is your team certain that your workload needs to scale out rather than scaling up? (Larger size rather than more VMs.) Can your code take advantage of multiple VMs without changes to your code?Mike Sherrill 'Cat Recall'
Hi Mike, Larger size comes with the large price and also this job that we have won't be executed frequently so we don't want to have a separate large size VM and keep it running continuously. Can you please explain how can I make my code to take advantage of multiple VMs?Joe 89
Could you please tell me how do you config the Azure VMSS?Jason Ye
I have included the Virtual Machine Scale Set in Azure and under Scaling Settings I have configured to ScaleOut when my ScaleSet Average Percentage CPU > 70 with Increase instance count by 5 and Scale In when the CPU<70 with decrease instance count by 1.Joe 89
Also, note that even running one job on my machine takes CPU of 99% (meaning it does not depend on the number of requests that I give to the system)Joe 89

3 Answers

1
votes

Customer will use Azure VMSS as the front endpoint(Or backend pool).

Azure VMSS autoscale ability reduces the management overhead to monitor and tune your scale set as customer demand changes over time.

Azure VMSS will use Azure load balancer to route traffic to all VMSS instances, in this way, all instances CPU usage are consistent.

If your service running without other requests, or other connections, the CPU usage is 99%, it means you should resize that VM to a high size.

1
votes

First, your preferences and your budget don't determine whether your workload can scale out rather than scale up.

An Azure scale set includes some backend VMs and a load balancer. The load balancer distributes requests to the backend servers.

Your workload can take advantage of an Azure scale set if it consists of multiple, independent requests. The canonical example of this kind of workload is a web server. Running this kind of workload on an Azure scale set doesn't usually require any changes to code.

You might be able to run your workload on a scale set if you have a single request that can be broken down into smaller pieces that can be processed independently. For this kind of parallel processing to work, you'd probably have to rewrite some of your code. The load balancer would see these smaller pieces as multiple requests.

Other ways to improve mathematical performance include

  • using a different, more appropriate language,
  • running your code on a GPU rather than a CPU, or
  • leveraging a third-party system, like Wolfram Mathematica.

I'm sure there are other ways.

0
votes

Imagine you have 10 physical machines in the lab. How would you split up this task to run faster, on all the machines?

A scale set is a collection of VMs. To make use of scale sets, and autoscale, your compute intensive job needs to be parallelizable. For example, if you can split it into many sub-tasks, then each VM in the scale set can request a sub-task, compute it, send the result somewhere for aggregation, and request another task.

Here is an example of a compute intensive task running on 1000 VMs in a scale set: https://techcommunity.microsoft.com/t5/Microsoft-Ignite-Content-2017/The-journey-to-provision-and-manage-a-thousand-VM-application/td-p/99113