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

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



On 2015-12-02, Hleb Valoshka wrote:

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

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

По:

  http://serverfault.com/search?q=page+allocation+failure

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

  http://serverfault.com/questions/645831/server-overloaded-acts-like-out-of-memory-but-thats-not-true

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

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

  http://serverfault.com/questions/236170/page-allocation-failure-am-i-running-out-of-memory

    [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
    buffers.

    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.

По

  https://www.google.com.ua/search?q=swapper+mode+0x20

есть:

  https://access.redhat.com/solutions/90883

   * 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.

  https://bugzilla.kernel.org/show_bug.cgi?id=12135

    [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
    /proc/sys/vm/min_free_kbytes.

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666021

    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: