Reputation: 1852
We have some code that is fairly CPU, RAM and I/O intensive (it creates lots of temporary files, decompresses, resizes and compresses images). We're trying to integrate this into a "serverless" web application, and seeing as our code only runs on Windows at the moment we're testing it on Azure Functions.
We've observed that our code runs considerably slower on Azure Functions than it does on my local workstation (Core i7-4790, 16GB RAM, SSD). For example, one typical workload gives us these timings:
Dev workstation: 2.47 sec
Azure Functions, "App Service" plan (S3 size): 10.59 sec
Azure Functions, "Consumption" plan: 15.96 sec
We've also found that on the "Consumption" plan, timings vary quite widely - one particular job gave us times varying between 112 and 153 seconds. The same job on the S3 "App Service" plan took between 117 and 119 seconds, and around 31 seconds on my workstation.
Timings on P3 were similar to S3, which is about what I expected as the CPU and RAM specs are the same.
So I have a few questions really:
Upvotes: 9
Views: 1705
Reputation: 35124
You can profile App Service app (including Function App) remotely, see this link. I used Kudu and it worked good.
Really depends on your targets. The timings that your quoted can be perfectly fine for some applications.
This seems to be too broad a question for SO.
A more FunctionApp-ish approach would be to try to break down your long-running function into smaller short-running functions, and thus break down and potentially parallelize the processing.
Upvotes: 1