Azure VM assessment - is it better to have 80 single-core machines or 10 8-core machines?

I am limited to a piece of software that uses one core for each instance of the program. It will start the SQL Server work queue and return the results to the server. Thus, the more instances I have, the faster the overall project is executed. I played a little with Azure VM and I can speed up the process in two ways.

1) I can run the application on one main virtual machine, clone this virtual machine and run it as much as I need to speed up the work.

OR

2) I can run the application 8 times on an 8-core virtual machine, ... again clone this virtual machine and run it as much as I need to speed up the work.

During testing, I noticed that the acceleration is about the same for adding 8 single-core virtual machines and 1 8-core virtual machine. Assuming this is true, would it be better to have single-core machines?

Pricing is a bit of a mystery, be it real time CPU usage or what. This is a bit simpler using the 8-core approach, when spinning machines and removing them takes a lot of time, but I think it can be automated.

It seems from some pricing pages that a multiple single-core VM approach will cost less?

Side question: so what can I do, for example, shell scripts to just add virtual machines of a certain image and launch the application, and then start closing them when I get close to completion? After creating the virtual machines, would there be some way to launch the application without having to remotely access each of them and run it?

+8
azure azure-virtual-machine azure-powershell
source share
3 answers

Billing

According to the Windows Azure Virtual Machine Cost Information , the virtual machines charge in minutes ( wall clock ). Prices are in the form of hourly rates (60 minutes) and are billed depending on the total number of minutes when the virtual machines are running for an hour.

In July 2013, 1 Small VM (1 virtual core) costs $ 0.09 / hour; 8 Small virtual machines (8 virtual cores) cost $ 0.72 per hour; 1 Extra Large VM (8 virtual cores) costs $ 0.72 per hour (same as 8 small virtual machines).

VM dimensions and performance

The sizes of virtual machines differ not only in the number of cores and RAM, but also in the performance of network I / O , in the range from 100 Mbit / s for small to 800 Mbit / s for additional Large.

Emergency Small VMs are quite limited in CPU and I / O power and inadequate for workloads such as you described.

For single-threaded I / O-bound applications, such as those described in the question, an extra-large virtual machine may have an edge due to the faster response time for each request.

It is also recommended that you test workloads that run 2, 4, or more processes per core. For example, 2 or 4 processes in a Small VM and 16, 32 or more processes in an Extra Large VM to find an adequate balance between CPU and I / O loads (assuming that you are not using more RAM than is available).

Auto scaling

Auto-scaling virtual machines is built directly into Windows Azure . It can be based on either CPU load or the length of the Windows Azure queue.

Another alternative is to use specialized tools or services to monitor server load and run PowerShell scripts to add or remove virtual machines as needed.

Auto start

You can use Windows Scheduler to automatically launch tasks when Windows starts.

+5
source share

I would say that, ceteris paribus, and this code will really be tied to the processor and will not be useful to any shared memory running several processes on the same machine, you should choose single-core machines , not multi-core machines.

Causes:

Isolate error areas

Scaling, rather than up, is best done when possible, because it naturally isolates errors. If one of your small nodes falls, it affects only one process. If large node crashes, several processes are omitted.

Load balancing

Windows Azure, like any multi-user system, is a shared resource. This means that you are more likely to compete for CPU cycles with other workloads. Having small virtual machines gives you a better chance that they will be distributed between the physical servers in the data center that have the best resource situation at the time the computers are prepared (you would have to make sure to stop and free the virtual machines before restarting them again to allow azure fabric placement algorithms to select the best hosts). If you used large virtual machines, there would be less chance of finding a suitable host with optimal rivalry to host many virtual cores.

Virtual processor scheduling

It's not entirely clear how virtual processor scheduling differs from physical scheduling, but it's something worth reading. The main thing to remember is that hypervisors such as VMware ESXi and Hyper-V (which runs Azure) plan several virtual cores together rather than separately. Therefore, if you have an 8-core virtual machine, the physical host must have 8 physical cores at the same time before it can start the virtual processor. The more virtual cores, the more unlikely that the host will have sufficient physical cores at any given time (even if 7 physical cores are free, the VM cannot work). This can lead to a paradoxical effect, which leads to the fact that the virtual machine will work worse when more virtual processor cores are added to it. http://www.perfdynamics.com/Classes/Materials/BradyVirtual.pdf

In short, one vCPU machine is more likely to receive a fraction of the physical processor than 8 vCPUs, all the rest are equal.

And I agree that the prices are basically the same, with the exception of the slightly higher storage costs for storing many small virtual machines compared to the smaller large ones. But storage in Azure is much less expensive than computing, so the likelihood that it will not give any economic scale.

Hope this helps.

+12
source share

Pricing: "Machine hours of operation * VM-size / hour speed * number of copies"

eg. You have 8 Core VM (Extra Large) that runs for a month (30 days) (30 * 24) * $ 0.72 * 1 = $ 518.4

for 8 single cores it will be (30 * 24) * 0.09 * 8 = $ 518.4

Therefore, I doubt that there will be any difference in price. One advantage of using smaller machines and β€œscaling” is when you have more granular control over scalability. An extra-large car will consume more idle dollars than 2-3 small cars.

Yes, you can definitely script this. Assuming these are IaaS machines, you can add a script to run Windows, if on PaaS you can use Run Task . " Link

+2
source share

All Articles