ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 294 - DOP-C01 discussion

Report
Export

What flag would you use to limit a Docker container's memory usage to 128 megabytes?

A.
-memory 128m
Answers
A.
-memory 128m
B.
-m 128m
Answers
B.
-m 128m
C.
--memory-reservation 128m
Answers
C.
--memory-reservation 128m
D.
-m 128MB
Answers
D.
-m 128MB
Suggested answer: B

Explanation:

Docker can enforce hard memory limits, which allow the container to use no more than a given amount of user or system memory, or soft limits, which allow the container to use as much memory as it needs unless certain conditions are met, such as when the kernel detects low memory or contention on the host machine. Some of these options have different effects when used alone or when more than one option is set. Most of these options take a positive integer, followed by a suffix of b, k, m, g, to indicate bytes, kilobytes, megabytes, or gigabytes.

Option -m or --memory=

Description The maximum amount of memory the container can use. If you set this option, the minimum allowed value is 4m (4 megabyte).

Reference: https://docs.docker.com/engine/admin/resource_constraints/#memory

asked 16/09/2024
Alper Atar
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first