centos large amount of memory occupied (kswap process high CPU utilization to 100%) of the solution

Problem Description:  
    When viewing by free, probably more than half of physical memory allocated to the cache inside, such a large cache depletion is caused by reason of memory, while using the top or ps check process when, kswapd process load is high, the general more than 90%, the effect kswapd memory recovery process is used, the amount of memory to ensure that the system is idle in a suitable physical memory range, it is recovered according to a certain ratio of the system not currently active (default ratio is 5%), that is, cache and buffer occupied.
    In the Red Flag Server version 4.0 or 4.1 (kernel less than 2.4.21-9.30 should all have this problem) to install the database or application appears on the OA probability is relatively high, because these applications have a need to exchange large amounts of data between the memory and hard drive, which should belong to a kernel BUG, marked on the SP1 patch 4.1 would not have this situation.

Solution:

  The default value of inactive_clean_percent adjusted from 5 to 100, the aim is to reclaim memory provided kswapd ratio is 100%, which would be:

  # echo 100 > /proc/sys/vm/inactive_clean_percent

    If we can solve the problem, the best of this command is added to rc.local inside.

Guess you like

Origin www.cnblogs.com/baker95935/p/12641551.html