[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: |
Xulei (Stone) |
Subject: |
Re: [Qemu-devel] [Question] Qemu's Heap Becomes Very Large and Never Reduce Down |
Date: |
Thu, 16 Nov 2017 03:08:34 +0000 |
> On Wed, Nov 15, 2017 at 02:18:55PM +0100, Paolo Bonzini wrote:
> > On 15/11/2017 04:14, 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.
> >
> > Try with newer QEMU; until recently we used a lot of memory at
> > startup, but it was improved in 2.11.
> >
> > However, I think Anthony also had a patch adding a malloc_trim call in
> > the RCU thread, which improved memory usage. Anthony, do you know if
> > this is still necessary in 2.11?
> >
> Hello Paolo,
>
> Last time, when you traveled in BeiJing, we talked about this malloc_trim()
> solution in RH office. At that time, you asked me to send this patch to
> upstream.
> I can try this patch in the newest Qemu version if you regard this solution
> is
> suitable.
>
> I also want to look for other more better solution, but there are some
> urgency
> tasks interrupt me.
>
> In fact, Anthony also have some other solutions for heap memory deduction
> in
> our intel ClearContainer.
>
Thanks for reply!
I'll test my cases with the upstream qemu ~
In fact, I'd like treat this problem as an unawareness bug. Because:
1) This problem happens NOT during the bootup phase but after several
operations.
2) It happens at a low probability, 5 VMs of 10 hosts * 20 VMs (10 hosts, each
runs 20 VMs).
3)Once it happens, we can NOT deduct the heap memory through unplugging all
disks & nets,
disconnecting VNC, and rebooting guestOS.
4)Refer to Stefan's advice, I have already isolated my tests that do only one
operation persistently
one time. The heap memory does not grow up very high.
I may think specific operation sequence can trigger this BUG.
I'll do some more tests, and supply more useful information for YOU.
BTW, I am now also following intel ClearContainer and Hyper project, I think
they are awesome.
> Regards,
>
> Yang Zhong
>
> > Thanks,
> >
> > Paolo