InfoFAQ

InfoFAQ

quarta-feira, 27 de janeiro de 2016

Uso de memoria elevado - VM Red Hat Linux

Uma equipe aqui da empresa estava reportando que algumas VMs com Linux estavam ocupando toda memoria, sem nada rodando ou nada que justificasse ocupar 98% da memoria.

 Se um dia tiverem alguma situação parecida quem sabe isso possa ajudar.

Issue
  • Unable to account for memory usage on a RHEL VMware guest :
  • $ cat free
  •             total      used        free     shared    buffers   cached
  • Mem:       7927536    6071588    1855948       0      22428     209132
  • -/+ buffers/cache:    5840028    2087508
  • Swap:     12582896         92    12582804
  • System shows high memory usage even though applications are not allocating that much memory :
  • $ ps aux | tr -s ' ' | awk 'BEGIN{sum=0}{ sum+=$6 }END{print sum}'
  • 709340
Environment
  • Red Hat Enterprise Linux
  • Vmware ESX server
Resolution
  • Unload the vmmemctl module.
  • The module is loaded by /etc/init.d/vmware-tools. Edit /etc/init.d/vmware-tools and change following line :
   if [ "$vmdb_answer_VMMEMCTL_CONFED" = 'yes' ]; thento
   if [ "$vmdb_answer_VMMEMCTL_CONFED" = 'no' ]; then
  • Unload the module :
# rmmod vmmemctl
  • and then restart the service :
# /etc/init.d/vmware-tools restart
  • Uninstalling vmware-tools is another option.
  • Consulting VMware on this will give more details on this module and it's functionality.
Root Cause
  • This behaviour is caused by the vmmemctl module.
filename:       /lib/modules/2.6.18-92.el5/misc/vmmemctl.ko
author:         VMware, Inc.
description:    VMware Memory Control Driver
  • In some situations, such as heavy memory load in ESX Server, the ESX Server will control the vmmemctl module to allocate guest memory and pin them in "physical" memory.
  • Those "physical" memory can then be reclaimed by ESX Server. This function is called "ballooning". Inflating the balloon increases memory pressure, and the kernel may page out memory pages to the swap space when its memory is scarce. The vmmemctl module does not have an external interface within the guest OS , it only communicates with the ESX Server via a private channel. Therefore, the memory which is allocated by vmmemctl cannot be counted from the guest OS.

Nenhum comentário:

Postar um comentário