![]() To configure this additional RAM space, define the total amount of swap memory. Although this is a useful feature, it is not a recommended practice as it slows down performance. It does this by ignoring the memory limitation and writing directly to the disk. Using the swap option allows you to store data even after all RAM assigned to the container has been used up. For example, to limit the container with 1 GB of RAM, add -memory="1g".įor example, to run an instance of an Ubuntu container and set the memory limit to 1 GB, the command is: sudo docker run -it -memory="1g" ubuntu Set Swap to Disk Memory Limit The value of memory_limitshould be a positive integer followed by the suffix b, k, m, or g (short for bytes, kilobytes, megabytes, or gigabytes). The command should follow the syntax: sudo docker run -it -memory="" Within the command, specify how much memory you want to dedicate to that specific container. Alternatively, you can use the shortcut -m. To limit the maximum amount of memory usage for a container, add the -memory option to the docker run command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |