qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] qemu core file size


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] qemu core file size
Date: Tue, 7 Nov 2017 18:00:07 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 07/11/17 17:16, Wanpeng Li wrote:
> 2017-11-07 14:12 GMT+08:00 Alexey Kardashevskiy <address@hidden>:
>> On 07/11/17 17:02, Wanpeng Li wrote:
>>> Hi Alexey,
>>> 2017-11-07 13:46 GMT+08:00 Alexey Kardashevskiy <address@hidden>:
>>>> On 07/11/17 01:08, Paolo Bonzini wrote:
>>>>> On 06/11/2017 13:18, Wanpeng Li wrote:
>>>>>> 2017-11-06 20:02 GMT+08:00 Paolo Bonzini <address@hidden>:
>>>>>>> On 06/11/2017 12:59, Fam Zheng wrote:
>>>>>>>>>> Could you point out the patchset for the fix?
>>>>>>>>> Between 447b0d0b9ee8a0ac216c3186e0f3c427a1001f0c and
>>>>>>>>> 092aa2fc65b7a35121616aad8f39d47b8f921618.
>>>>>>>> Not sure how these relate to the core size, but I've tested upstream
>>>>>>>> (ec7a8bf0b8f7dc7288fe8745464ee8217528cc6c) and with 
>>>>>>>> dump-guest-core=off the core
>>>>>>>> file is 363M, still significantly larger than rss (~73M).
>>>>>>>>
>>>>>>>> What is bloating the core file?
>>>>>>>
>>>>>>> My guess would have been fragmented heap.  The core file, unlike the
>>>>>>> RSS, includes all the mmaped memory (e.g. from shared libraries) that
>>>>>>> has never been used.
>>>>>>>
>>>>>>> For example, all the Ceph/Gluster/PulseAudio/SPICE/whatever libraries
>>>>>>> are included in the core file but likely are not in the RSS.
>>>>>>
>>>>>> Do you mean not use Memory API will avoid the fragmented heap?
>>>>>
>>>>> The high memory usage from the memory API causes excessive
>>>>> fragmentation.  Alexey's work should help reducing memory usage and thus
>>>>> the fragmentation.
>>>>
>>>> Since centos6 does not have this issue and centos7 does, I'd suggest
>>>> MALLOC_ARENA_MAX&co
>>>> https://www.gnu.org/software/libc/manual/html_node/Memory-Allocation-Tunables.html
>>>
>>> Thanks for the inputs. What's the recommend glibc.malloc.arena_max
>>> value from you? :)
>>
>> I have no idea, you have to try different values as you are the one who is
>> unhappy about the sizes :) I do not normally mess with this as things
>> should just work with the defaults whatever they are.


So I tried:
- QEMU with "-smp 8" and "(gdb) generate-core-file 1"  creates 820MB file;
- QEMU with "-smp 256" creates 11GB file,
- QEMU with "-smp 256" with MALLOC_ARENA_MAX=1 creates 2.5GB file,
- QEMU with "-smp 128" with MALLOC_ARENA_MAX=1 creates 1.3GB file;
- QEMU with "-smp 1" creates 290MB file;
- QEMU with "-smp 1" with MALLOC_ARENA_MAX=1 creates 222MB file.


It is "qemu-system-ppc64 -nodefaults -m 2G -enable-kvm -S" (i.e. stopped)
pretty much.


-- 
Alexey



reply via email to

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