设置Linux中可用的总物理内存的限制 [英] Setting limit to total physical memory available in Linux
问题描述
我知道我应该设置mem=MEMORY_LIMIT
.但是我不知道在运行时或引导期间要去哪里,以便为操作系统可以控制的总物理内存设置限制.
I know that I am supposed to set mem=MEMORY_LIMIT
. But I do not know where to go, during runtime, or during boot time, in order to set a limit to the total physical memory that the OS has control of.
我正在运行I/O基准测试,我想限制可用的整体物理内存量.
I am running I/O benchmarks, and I would like to limit the amount of overall physical memory that is available.
推荐答案
我找到了想要的答案.基本上,设置总可用物理内存的参数是"mem = MEMORY_LIMIT".这是内核引导参数.您需要在内核引导参数中添加"mem = 1G",以获取最大1GB的可用物理内存.有关如何添加内核启动参数的更多信息,请参见 https://wiki.ubuntu.com/Kernel/KernelBootParameters
I found the answer I was looking for. Basically, the parameter that sets the total available physical memory is "mem=MEMORY_LIMIT". And this is a kernel boot parameter. You need to add, say "mem=1G" for maximum of 1GB available physical memory to the kernel boot parameter. For more info on how to add kernel boot parameters look at https://wiki.ubuntu.com/Kernel/KernelBootParameters
这篇关于设置Linux中可用的总物理内存的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!