Cloud and Container Basics

A node has allocatable resources of 4 CPU cores and 8 GiB of memory. Each Pod's container has requests of 500m CPU and 1.5 GiB memory and limits of 1 CPU core and 2 GiB memory. There are no other Pods and no system reservations. Which of the following is the maximum number of Pods that can be placed on this node?

  1. A4
  2. B5
  3. C8
Show answer and explanation

Answer: B. 5

The scheduler places Pods so that the sum of the requests of the Pods on a node does not exceed the allocatable amount, for CPU and for memory separately. CPU allows up to 4000m ÷ 500m = 8 Pods, but memory allows 8 ÷ 1.5 = 5.33…, that is, up to 5. Both conditions must hold, so the answer is 5. Limits are not used for placement, so the limits of the 5 Pods add up to 5 CPU cores and 10 GiB of memory, more than the node has, and resources run short if all Pods use their maximum at the same time.

  • A. This is the value computed from limits (CPU 4 ÷ 1 = 4, memory 8 ÷ 2 = 4). Placement is decided by requests.
  • B. Correct. CPU allows 8 Pods and memory 5, so the smaller number, 5, applies.
  • C. This uses only the CPU requests. The total memory requests must also fit within 8 GiB.
Practice this topic Back to topic

Books on Cloud and Container Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Cloud and Container Basics questions

  1. A managed database service in the cloud (one in which the provider operates the database software) is used. Under the shared responsibility model, which of the following generally remains the user's responsibility?
  2. In the cloud, which of the following is the main purpose of placing web servers and database replicas across several availability zones within the same region?
  3. With serverless functions (FaaS), only the first call to a function that has not been called for a while sometimes responds hundreds of milliseconds to several seconds slower. Which of the following correctly explains this phenomenon?
  4. Cloud storage is used for three purposes: (1) attaching it to a virtual machine as a disk, creating a file system and storing database data files; (2) mounting it from several servers at the same time and using it as a shared directory; (3) reading and writing a large number of images by key (name) through an HTTP API and growing the capacity without deciding it in advance. Which of the following is the appropriate combination of storage types for (1) to (3)?
  5. Virtual machines that are charged only for the time used, at ¥40 per hour (a made-up price), are used. Normally 2 machines run throughout the month (30 days), and on 20 weekdays 4 more are added for 6 hours a day to match the load. Which of the following is the charge for the month?