Skip to content

Instantly share code, notes, and snippets.

@moaminsharifi
Created August 28, 2024 06:57
Show Gist options
  • Save moaminsharifi/5812cbda548ff1563d6aa8f5c6ecae28 to your computer and use it in GitHub Desktop.
Save moaminsharifi/5812cbda548ff1563d6aa8f5c6ecae28 to your computer and use it in GitHub Desktop.
Docker's Memory Management Strategies Docker, as a containerization platform, provides tools to manage memory usage effectively within containers. By default, containers have no memory constraints, which can lead to resource contention on the host system. Docker allows administrators to set memory limits and other resource constraints to mitigat…
Option Description
-m or --memory= Sets a hard limit on the maximum amount of memory the container can use.
--memory-swap Controls the total amount of memory and swap that can be used by the container.
--memory-swappiness Adjusts the kernel's tendency to swap out pages.
--memory-reservation Sets a soft limit that allows the container to exceed the limit under certain conditions.
--kernel-memory Limits the amount of kernel memory the container can use.
--oom-kill-disable Disables the OOM killer for the container, but should only be used with caution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment