libvirt process on hypervisors uses very large amount of memory

Solution Verified - Updated -

Issue

  • The libvirtd memory leak, process grows to 20 GB (or more).
  # top
  top - 14:58:22 up 53 days, 19:57, 13 users,  load average: 2.36, 1.66, 1.07
  Tasks: 681 total,   2 running, 678 sleeping,   0 stopped,   1 zombie
  Cpu(s):  5.4%us,  6.8%sy,  0.0%ni, 87.6%id,  0.2%wa,  0.0%hi,  0.1%si,  0.0%st
  Mem:  49009512k total, 41121572k used,  7887940k free,   230672k buffers
  Swap:  8388600k total,  2463816k used,  5924784k free,   661280k cached

    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
  27867 root      20   0  158m  14m 1860 R 100.0  0.0   8:25.55 gvfs-gdu-volume   
    164 root      25   5     0    0    0 S 54.0  0.0   6491:26 ksmd               
  21498 root      20   0 20.2g  18g 4084 S 44.4 38.9  21477:56 libvirtd  
                         ^^^^^ <= here

  A large amount of messages are output(/var/log/libvirt/libvirtd.log). 

  virFork:282 : cannot fork child process: Cannot allocate memory
  virFork:282 : cannot fork child process: Cannot allocate memory
  virFork:282 : cannot fork child process: Cannot allocate memory
  • Our customer would like to know how to avoid memory leaks as soon as possible.

  • By the way, there is a similar report bz# 891324 which is on RHEL7:
    (https://bugzilla.redhat.com/show_bug.cgi?id=891324) Is this the same issue?

Environment

  • Red Hat Enterprise Linux 6 Update 3
  • Architecture: x86_64
  • Kernel Version: 2.6.32-279.el6
  • libvirt version 0.9.10-21

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content