LINUX.ORG.RU

История изменений

Исправление post-factum, (текущая версия) :

vm.overcommit_memory=2 запрещает оверкоммит. Теоретически, процесс, запрашивающий больше значения, определяемого overcommit_ratio, должен быть убит ядром. Я так понимаю.

Всё так:

overcommit_memory
=================

This value contains a flag that enables memory overcommitment.

When this flag is 2, the kernel uses a "never overcommit" policy that attempts to prevent any overcommit of memory.

overcommit_kbytes
=================

When overcommit_memory is set to 2, the committed address space is not permitted to exceed swap plus this amount of physical RAM.

overcommit_ratio
================

When overcommit_memory is set to 2, the committed address space is not permitted to exceed swap plus this percentage of physical RAM.

Но на вопрос «зачем» это не отвечает. Равно как и на вопрос, чем тебе неугоден оверкоммит.

vm.vfs_cache_pressure=20

Насколько я понимаю, этот параметр регулирует, насколько активно ядро будет вытеснят из памяти кеш файловых систем. Чем меньше значение, тем меньше ядро выгружает этот кеш. Опять же, я рассказываю так, как понимаю и не спорю с тобой.

На всякий случай, здесь идёт речь не о page cache, а о dentry/inode cache:

vfs_cache_pressure
==================

This percentage value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects.

At the default value of vfs_cache_pressure=100 the kernel will attempt to reclaim dentries and inodes at a "fair" rate with respect to pagecache and swapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will never reclaim dentries and inodes due to memory pressure and this can easily lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.

И это опять же не отвечает на вопрос, зачем ты менял значение.

Исходная версия post-factum, :

vm.overcommit_memory=2 запрещает оверкоммит. Теоретически, процесс, запрашивающий больше значения, определяемого overcommit_ratio, должен быть убит ядром. Я так понимаю.

Всё так:

overcommit_memory
=================

This value contains a flag that enables memory overcommitment.

When this flag is 2, the kernel uses a "never overcommit" policy that attempts to prevent any overcommit of memory.

overcommit_kbytes
=================

When overcommit_memory is set to 2, the committed address space is not permitted to exceed swap plus this amount of physical RAM.

overcommit_ratio
================

When overcommit_memory is set to 2, the committed address space is not permitted to exceed swap plus this percentage of physical RAM.

Но на вопрос «зачем» это не отвечает. Равно как и на вопрос, чем тебе неугоден оверкоммит.

vm.vfs_cache_pressure=20

Насколько я понимаю, этот параметр регулирует, насколько активно ядро будет вытеснят из памяти кеш файловых систем. Чем меньше значение, тем меньше ядро выгружает этот кеш. Опять же, я рассказываю так, как понимаю и не спорю с тобой.

На всякий случай, здесь идёт речь не о page cache, а о dentry/inode cache:

vfs_cache_pressure
==================

This percentage value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects.

At the default value of vfs_cache_pressure=100 the kernel will attempt to reclaim dentries and inodes at a "fair" rate with respect to pagecache and swapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will
never reclaim dentries and inodes due to memory pressure and this can easily lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.

И это опять же не отвечает на вопрос, зачем ты менял значение.