0

Today we have a VM that sits idle most of the day, but once in a while we throw a time critical batch processing job after it and it runs at 100% CPU for 30 secs.

This approach does not really scale in a cost efficient way since we need to pay for a massive VM to sit idle most of the day.

The batch job is like this:

.\PhotoView.exe SRC "d:\myfiles\file1.ies" DEST "d:\output\"

I'm looking for a service that can help me reduce cost and that can handle the growing load - and was looking at Azure Functions since it can execute an EXE.

But it turns out the PhotoView.exe (http://www.oxytech.it/software/photoview.asp?LN=UK) needs to be installed on a machine to run, xcopy do not seem to work.

Any good ideas are welcome

Rasmus
  • 2,783
  • 2
  • 33
  • 43
  • Does your job need to run at a certain time every day? If that's the case then you can schedule it to come up at a certain time. Once the job is done, it could auto shut down. VMs in shutdown state do not incur compute charges. – Gaurav Mantri Mar 23 '18 at 15:14
  • they still incur storage charges though. – Jay Mar 26 '18 at 03:31

1 Answers1

4

Doable if you can tolerate ~3-5 minutes of delay between invoking execution and actually having the VM executing your binary.

You could start/deallocate the VM with an Azure Function (call the ARM APIs with Managed Service Identity or create a PowerShell Function as it has the ARM cmdlets installed).

Azure Container Instances can be an option as well by spinning up a Windows container. This will probably be faster to cold start than the VM.

What i would do is contact OXYTECH for a portable version of their product. Then simply wrap it in Azure Functions. If they don't have one, this thread should be enough motivation to make it happen. Boxed products don't do well with cloud app development.

evilSnobu
  • 24,582
  • 8
  • 41
  • 71
  • Thanks for a great answer! - If I choose to spin up a VM or a container from Azure Functions I could potentially have many VM or containers active a the same time right? Also is there a cost to spinning a VM or a container up? – Rasmus Mar 24 '18 at 17:09
  • Both Windows/Linux containers should spin up in under one minute in ACI. Naturally, you can spin up more than one instance. Same with VMs, the downside with VMs is you need to provision them beforehand ...unless you go to VM Scale Sets, but that's overkill for running a process for a few seconds. If you can't get a portable binary, Container Instances are your best (and cheapest) bet. They're designed for this very scenario, ephemeral compute. – evilSnobu Mar 24 '18 at 17:19