Jesús López
Jesús López

Reputation: 9241

How much memory and CPU is assigned to each container in a Web App for Containers?

In AWS you can select a combination of CPU and memory for each container, but I don't find that option in Azure.

How much memory and CPU does Azure assign to each container in a Web App for containers?

And

How can I figure out the resources assigned to each container?

For example; Suppose you have an App Service plan P1V2: 210 ACU's and 3.5 Gb RAM. Then You create a Web App for containers, and you deploy 3 contrainers to that web app. How much memory and CPU is assigned to each container?

Upvotes: 4

Views: 2210

Answers (1)

DashleenBhandari-MSFT
DashleenBhandari-MSFT

Reputation: 661

Containers are typically optimized to run just a single application, but the exact needs of those applications can differ greatly. Azure Container Instances provides optimum utilization by allowing exact specifications of CPU cores and memory. You pay based on what you need and get billed by the second.

Pricing Example Example 1: You create a Linux container group with a 1 vCPU, 1 GB configuration once daily during a month (30 days). The duration of each container group is 5 minutes (300 seconds).

Memory duration: Number of container groups * memory duration (seconds) * GB * price per GB-s * number of days

1 container group * 300 seconds * 1 GB * $0.000005 per GB-s * 30 days = $0.045

vCPU duration: Number of container groups * vCPU duration (seconds) * vCPU(s) * price per vCPU-s * number of days

1 container groups * 300 seconds * 1 vCPU * $0.000014 per vCPU-s * 30 days = $0.126

Total billing: Memory duration (seconds) + vCPU duration (seconds) = total cost

$0.045 + $0.126 = $0.171

Example 2: You create a Linux container group with a 1 vCPU, 2 GB configuration 50 times daily during a month (30 days). The container group duration is 150 seconds.

Memory duration: Number of container groups * memory duration (seconds) * GB * price per GB-s * number of days

50 container groups * 150 seconds * 2 GB * $0.000005 per GB-s * 30 days = $2.25

vCPU duration: Number of container groups * vCPU duration (seconds) * vCPU(s) * price per vCPU-s * number of days

50 container groups * 150 seconds * 1 vCPU * $0.000014 per vCPU-s * 30 days = $3.15

Total billing: Memory duration (seconds) + vCPU duration (seconds) = total cost

$2.25 + $3.15 = $5.40

https://learn.microsoft.com/en-us/azure/container-instances/container-instances-overview https://azure.microsoft.com/en-us/pricing/details/container-instances/

Upvotes: -1

Related Questions