Learn how to properly configure CPU resource limits for Azure Container Instances in a container group to prevent negative impact between containers. Discover the solution to this AZ-104 certification exam question.
Table of Contents
Question
You have an Azure subscription that contains a container group named Group1. Group1 contains two Azure container instances as shown in the following table.
Name | Resource request | Resource limit |
---|---|---|
container1 | 2 CPUs | 2 CPUs |
contrainer2 | 3 CPUs | 4 CPUs |
You need to ensure that container2 can use CPU resources without negatively affecting container1.
What should you do?
A. Increase the resource limit of container1 to three CPUs.
B. Increase the resource limit of container2 to six CPUs.
C. Remove the resource limit for both containers.
D. Decrease the resource limit of container2 to two CPUs.
Answer
D. Decrease the resource limit of container2 to two CPUs.
Explanation
To ensure that container2 can use CPU resources without negatively affecting container1, you should decrease the resource limit of container2 to two CPUs.
In the current configuration, container2 has a resource request of 3 CPUs but a higher resource limit of 4 CPUs. This means that container2 can potentially use more CPU than it requested, up to the 4 CPU limit. If container2 tries to use more than 3 CPUs, it may take CPU resources away from container1, which only has a 2 CPU resource request and limit.
By decreasing container2’s resource limit to 2 CPUs, you cap its maximum CPU usage to match the 2 CPU limit of container1. This prevents container2 from being able to use more CPU than container1, ensuring container1 always has access to its requested 2 CPUs.
The other options are not optimal because:
A) Increasing container1’s limit to 3 CPUs doesn’t help as container1 only requested 2 CPUs.
B) Increasing container2’s limit to 6 CPUs allows it to potentially use even more CPU and starve container1.
C) Removing the resource limits entirely eliminates the protection against one container using too much CPU and impacting the other.
Therefore, decreasing container2’s resource limit to 2 CPUs is the best solution to ensure it cannot negatively impact container1 by using more CPU than container1 has available. This demonstrates understanding of how resource requests and limits work together in Azure Container Instances.
Microsoft AZ-104 certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Microsoft AZ-104 exam and earn Microsoft AZ-104 certification.