From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXRQr-00081y-SM for qemu-devel@nongnu.org; Thu, 03 Sep 2015 06:07:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZXRQo-000492-MN for qemu-devel@nongnu.org; Thu, 03 Sep 2015 06:07:49 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:52491 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZXRQo-00048Y-B0 for qemu-devel@nongnu.org; Thu, 03 Sep 2015 06:07:46 -0400 References: <1440670734-5616-1-git-send-email-pl@kamp.de> <1440670734-5616-3-git-send-email-pl@kamp.de> <20150827103951.GN24486@redhat.com> <1441273974.557.19.camel@redhat.com> From: Peter Lieven Message-ID: <55E81BED.1080701@kamp.de> Date: Thu, 3 Sep 2015 12:07:41 +0200 MIME-Version: 1.0 In-Reply-To: <1441273974.557.19.camel@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] vnc: allow the Buffer to shrink again List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , "Daniel P. Berrange" Cc: qemu-devel@nongnu.org Am 03.09.2015 um 11:52 schrieb Gerd Hoffmann: > On Do, 2015-08-27 at 11:39 +0100, Daniel P. Berrange wrote: >> On Thu, Aug 27, 2015 at 12:18:52PM +0200, Peter Lieven wrote: >>> currently the Buffer can only grow. This increases Qemu memory footprint >>> dramatically since normally the biggest VNC updates are at connection time. >>> But also after a VNC session has terminated there is one persistent buffer >>> in queue->buffer which I have seen to increase to over 100MB and it is never >>> getting smaller again. >> Do you have any idea what caused the buffer to increase to 100MB in size >> in the first place ? I would expect a full screen update would cause the >> biggest buffer usage, and even for a 1920x1140 screen that should not >> be anywhere near 100MB in size. IOW, i'm wondering if the 100MB usage >> is symptomatic of a more serious bug somewhere else in the VNC code >> that you're just masking you reducing buffer size afterwards. > Cooked up a buffer stats patch (attached). > Buffer sizes are nowhere near 100MB for me (as expected by Daniel). > Individual buffers are in the 1 -> 4 MB range (1920x1080), even summed > up this is more like 10 not 100 MB. > > So, big question remains why they are that big for you? I will try the patch out. Thank you. > > Beside that I think it makes sense to have the shrinking logic in > buffer_reserve too so we don't have to add buffer_shrink calls all over > the place. We need a possibility to shrink the buffer after it has been used. Especially the queue->buffer. Thanks, Peter