[devel] Отключение swap

Anton Farygin rider на basealt.ru
Чт Ноя 16 14:34:21 MSK 2017


16.11.2017 14:32, Alexey Gladkov пишет:
> On Thu, Nov 16, 2017 at 02:15:13PM +0300, Paul Wolneykien wrote:
>> 16.11.2017 07:29, Anton Farygin пишет:
>>> От swap тоже было бы неплохо избавиться - если ОЗУ более чем достаточно
>>    А подскажите, пожалуйста, как именно это сделать? В /etc/fstab swap
>> раздел закомментирован. `free -m` показывает "Swap: 0 0 0". Я
>> рассчитывал, что после этого, тот же firefox, при нехватке памяти на
>> очередную вкладку, будет закрываться быстро и "молча".
> Вы надеетесь на сегфолт ?
>
> Кстати, у нас везде же по умолчанию overcommit memory.
>
> malloc(3):
>
> By default, Linux follows an optimistic memory allocation strategy. This
> means that when malloc() returns non-NULL there is no guarantee that the
> memory really is available. In case it turns out that the system is out of
> memory, one or more processes will be killed by the OOM killer. For more
> information, see the description of /proc/sys/vm/overcommit_memory and
> /proc/sys/vm/oom_adj in proc(5), and the Linux kernel source file
> Documentation/vm/overcommit-accounting.
>
Более того - при overcommit даже swap не особо помогает.




Подробная информация о списке рассылки Devel