[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: почему ядро не сбрасывает кэш?

On 2015-12-02, Hleb Valoshka wrote:

> Вы вопрос-то прочитали?

Между строк )) По последующей дискусии вьехал.



есть несколько интересных обсуждений:


    Theres a lot of free memory, but these zones are totally fragmented

Посмотреть можно по cat /proc/buddyinfo.


    [why to "sysctl -w vm.min_free_kbytes=65536"]

    Swap-less machines, where you don’t want incoming network traffic to
    overwhelm the kernel and force an OOM before it has time to flush any

    x86 machines, for the same reason: the x86 architecture only allows DMA
    transfers below approximately 900MB of RAM. So you can end up with the
    bizarre situation of an OOM error with tons of RAM free.





   * Increase vm.min_free_kbytes value, for example to a higher value than a single allocation request.
   * Change vm.zone_reclaim_mode to 1 if it's set to zero, so the system can reclaim back memory from cached memory.


    [SKIP]while transferring a 54GB backup (single file) through a 1Gbps link[/SKIP]

    the network is allocating memory faster than the VM system is reclaiming it.
    Everything should recover and run to completion.

    You should be able to make the warning go away by increasing


    There is a common problem that network hardware may require multi-page
    buffers, which we can't allocate (without swapping, which is not
    possible in the network stack) if memory is nearly full and fragmented.
    This case is similar but slightly different: the multi-page allocation
    is for a new socket for a TCP connection.

Итого везде приводится один и тот же рецепт:

  vm.min_free_kbytes = 65536

иногда упоминается vm.zone_reclaim_mode.

Мне было интересно покопаться, до настоящего момента о указанном выше ничего
не знал.

Best regards!

Reply to: