qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Question] Qemu's Heap Becomes Very Large and Never Red


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [Question] Qemu's Heap Becomes Very Large and Never Reduce Down
Date: Wed, 15 Nov 2017 11:00:19 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

On Wed, Nov 15, 2017 at 03:14:52AM +0000, Xulei (Stone) wrote:
> Hi, guys
> 
> I met a strange problem, with qemu 2.8.1:
> qemu consumes too many heap memory after several operations and can not 
> release them anymore:
> hot pulg/unplug disk & net, vnc connect/disconnect, guestOS reboot, etc.
> 
> 
> 01a7a000-3b4efe000 rw-p 00000000 00:00 0                                 
> [heap]
> 
> Size:           15520272 kB
> 
> Rss:            14421836 kB
> 
> Pss:            14421836 kB
> 
> Shared_Clean:          0 kB
> 
> Shared_Dirty:          0 kB
> 
> Private_Clean:      1164 kB
> 
> Private_Dirty:  14420672 kB
> 
> Referenced:      7485624 kB
> 
> Anonymous:      14421836 kB
> 
> AnonHugePages:     34816 kB
> 
> Swap:            1098140 kB
> 
> KernelPageSize:        4 kB
> 
> MMUPageSize:           4 kB
> 
> Locked:                0 kB
> 
> VmFlags: rd wr mr mw me ac sd
> 
> My steps are:
> 1) start several VMs all equipped only 8G memory;
> 2) random combining those operations mentioned above;
> 3) after few hours, qemu's Virt memory and RSS both grow too large and never 
> fall down;
> 
> After analysis via /proc/$pid/smaps, I found the VMA of pc.ram does not 
> occupy much
> memory but only becauses of heap section.
> 
> I guess that has some relations of glibc or qemu rcu_thread, but i can not 
> figure it out.
> Is there some patches can fix this problem or does somebody have any idea?

Please try qemu.git/master.

The malloc implementation (glibc, tcmalloc, jemalloc) probably makes a
difference since you are seeing heap growth.

The main question your report raises is that "random combining those
operations mentioned above" makes it hard to identify the operation that
leads to heap growth.  Can you run isolated tests that do only
hotplug/unplug *or* VNC connect/disconnect *or* guest OS reboot, not
everything together?

Thanks,
Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]