linux-了解/ proc / sys / vm / lowmem_reserve_ratio
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了linux-了解/ proc / sys / vm / lowmem_reserve_ratio,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2261字,纯文字阅读大概需要4分钟。
内容图文
![linux-了解/ proc / sys / vm / lowmem_reserve_ratio](/upload/InfoBanner/zyjiaocheng/948/aad12f67bf094778a414a08019d8b084.jpg)
通过阅读Documentation / sysctl / vm.txt中的说明,我无法理解变量“ lowmem_reserve_ratio”的含义.
我也尝试过搜索它,但是找到的所有解释都与vm.txt中存在的相似.
如果sb解释它或提及它的一些链接,这将非常有帮助.
这里是原始的解释:-
The lowmem_reserve_ratio is an array. You can see them by reading this file.
-
% cat /proc/sys/vm/lowmem_reserve_ratio
256 256 32
-
Note: # of this elements is one fewer than number of zones. Because the highest
zone's value is not necessary for following calculation.
But, these values are not used directly. The kernel calculates # of protection
pages for each zones from them. These are shown as array of protection pages
in /proc/zoneinfo like followings. (This is an example of x86-64 box).
Each zone has an array of protection pages like this.
-
Node 0, zone DMA
pages free 1355
min 3
low 3
high 4
:
:
numa_other 0
protection: (0, 2004, 2004, 2004)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pagesets
cpu: 0 pcp: 0
:
-
These protections are added to score to judge whether this zone should be used
for page allocation or should be reclaimed.
In this example, if normal pages (index=2) are required to this DMA zone and
watermark[WMARK_HIGH] is used for watermark, the kernel judges this zone should
not be used because pages_free(1355) is smaller than watermark + protection[2]
(4 + 2004 = 2008). If this protection value is 0, this zone would be used for
normal page requirement. If requirement is DMA zone(index=0), protection[0]
(=0) is used.
zone[i]'s protection[j] is calculated by following expression.
(i < j):
zone[i]->protection[j]
= (total sums of present_pages from zone[i+1] to zone[j] on the node)
/ lowmem_reserve_ratio[i];
(i = j):
(should not be protected. = 0;
(i > j):
(not necessary, but looks 0)
The default values of lowmem_reserve_ratio[i] are
256 (if zone[i] means DMA or DMA32 zone)
32 (others).
As above expression, they are reciprocal number of ratio.
256 means 1/256. # of protection pages becomes about "0.39%" of total present
pages of higher zones on the node.
If you would like to protect more pages, smaller values are effective.
The minimum value is 1 (1/1 -> 100%).
解决方法:
与您有相同的问题,我用Google搜索(很多),偶然发现apon this page,它可能(或可能不会)比内核文档更容易理解.
(我在这里不引用,因为它不可读)
内容总结
以上是互联网集市为您收集整理的linux-了解/ proc / sys / vm / lowmem_reserve_ratio全部内容,希望文章能够帮你解决linux-了解/ proc / sys / vm / lowmem_reserve_ratio所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。