[pve-devel] memory leak in PVE/QMPClient.pm
Alexandre DERUMIER
aderumier at odiso.com
Mon Oct 29 13:23:15 CET 2012
seem to leak slowly for me :(
(I'll check in 1hour)
root at kvm6:~# date && ps -aux|grep pvestatd
Mon Oct 29 13:17:38 CET 2012
root 9820 1.8 0.0 183252 32832 ? S 13:17 0:00 pvestatd
root at kvm6:~# date && ps -aux|grep pvestatd
Mon Oct 29 13:18:04 CET 2012
root 9820 1.4 0.0 183252 32956 ? S 13:17 0:00 pvestatd
root at kvm6:~# date && ps -aux|grep pvestatd
Mon Oct 29 13:18:43 CET 2012
root 9820 1.2 0.0 183252 33016 ? S 13:17 0:00 pvestatd
root at kvm6:~# date && ps -aux|grep pvestatd
Mon Oct 29 13:20:03 CET 2012
root 9820 1.2 0.0 183252 33140 ? S 13:17 0:01 pvestatd
root at kvm6:~# date && ps -aux|grep pvestatd
Mon Oct 29 13:21:08 CET 2012
root 9820 1.1 0.0 183252 33236 ? S 13:17 0:02 pvestatd
root at kvm6:~# date && ps -aux|grep pvestatd
Mon Oct 29 13:22:30 CET 2012
root 9820 1.1 0.0 183252 33356 ? S 13:17 0:03 pvestatd
----- Mail original -----
De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag>
À: "Dietmar Maurer" <dietmar at proxmox.com>
Cc: "Alexandre DERUMIER" <aderumier at odiso.com>, pve-devel at pve.proxmox.com
Envoyé: Lundi 29 Octobre 2012 13:19:16
Objet: Re: [pve-devel] memory leak in PVE/QMPClient.pm
Works now fine to me.
Stefan
Am 29.10.2012 13:15, schrieb Dietmar Maurer:
> OK - fixed. Please test again.
>
>> -----Original Message-----
>> From: Stefan Priebe - Profihost AG [mailto:s.priebe at profihost.ag]
>> Sent: Montag, 29. Oktober 2012 13:05
>> To: Dietmar Maurer
>> Cc: Alexandre DERUMIER; pve-devel at pve.proxmox.com
>> Subject: Re: [pve-devel] memory leak in PVE/QMPClient.pm
>>
>> i would suggest the following:
>>
>> diff --git a/bin/pvestatd b/bin/pvestatd index cb0d5cd..0345fe8 100755
>> --- a/bin/pvestatd
>> +++ b/bin/pvestatd
>> @@ -384,7 +384,7 @@ for (;;) { # forever
>>
>> my $mem = PVE::ProcFSTools::read_memory_usage();
>>
>> - if (!defined($initial_memory_usage)) {
>> + if (!defined($initial_memory_usage) || $cycle < 10) {
>> $initial_memory_usage = $mem->{resident};
>> } else {
>> my $diff = $mem->{resident} - $initial_memory_usage;
>>
>> Mit freundlichen Grüßen
>> Stefan Priebe
>> Bachelor of Science in Computer Science (BSCS) Vorstand (CTO)
>>
>> -------------------------------
>> Profihost AG
>> Am Mittelfelde 29
>> 30519 Hannover
>> Deutschland
>>
>> Tel.: +49 (511) 5151 8181 | Fax.: +49 (511) 5151 8282
>> URL: http://www.profihost.com | E-Mail: info at profihost.com
>>
>> Sitz der Gesellschaft: Hannover, USt-IdNr. DE813460827
>> Registergericht: Amtsgericht Hannover, Register-Nr.: HRB 202350
>> Vorstand: Cristoph Bluhm, Sebastian Bluhm, Stefan Priebe
>> Aufsichtsrat: Prof. Dr. iur. Winfried Huck (Vorsitzender)
>>
>> Am 29.10.2012 13:01, schrieb Stefan Priebe - Profihost AG:
>>> Am 29.10.2012 12:57, schrieb Dietmar Maurer:
>>>> fixed - please test again (sorry)
>>>
>>> My test was too short. Does not work to me:
>>>
>>> Oct 29 12:59:09 cloud1-1202 pvestatd[5868]: starting server Oct 29
>>> 12:59:10 cloud1-1202 pvestatd[5868]: restarting server after 2 cycles
>>> to reduce memory usage (free 35692544 (7036928) bytes) Oct 29 12:59:10
>>> cloud1-1202 pvestatd[5868]: server shutdown (restart) Oct 29 12:59:11
>>> cloud1-1202 pvestatd[5868]: restarting server Oct 29 12:59:21
>>> cloud1-1202 pvestatd[5868]: restarting server after 2 cycles to reduce
>>> memory usage (free 37605376 (5599232) bytes) Oct 29 12:59:21
>>> cloud1-1202 pvestatd[5868]: server shutdown (restart) Oct 29 12:59:21
>>> cloud1-1202 pvestatd[5868]: restarting server Oct 29 12:59:31
>>> cloud1-1202 pvestatd[5868]: restarting server after 2 cycles to reduce
>>> memory usage (free 37605376 (5595136) bytes) Oct 29 12:59:31
>>> cloud1-1202 pvestatd[5868]: server shutdown (restart) Oct 29 12:59:32
>>> cloud1-1202 pvestatd[5868]: restarting server Oct 29 12:59:42
>>> cloud1-1202 pvestatd[5868]: restarting server after 2 cycles to reduce
>>> memory usage (free 37605376 (5599232) bytes) Oct 29 12:59:42
>>> cloud1-1202 pvestatd[5868]: server shutdown (restart) Oct 29 12:59:42
>>> cloud1-1202 pvestatd[5868]: restarting server
>>>
>>> I've seen that it takes up to 10 cycles to have a constant memory size.
>>> I think this is due to the fact that perls garbage collection is not
>>> running every after each cycle.
>>>
>>> Stefan
>
More information about the pve-devel
mailing list