[Spice-devel] [spice-gtk PATCH v1] spice-channel limiting queue (usbredir memory leak)

Victor Toso victortoso at redhat.com
Mon Oct 5 08:10:11 PDT 2015


Follow up of email [0]. Trying to implement option 4 - Reading less from device.
(yes, not listed in the email).

[0] http://lists.freedesktop.org/archives/spice-devel/2015-September/022003.html

This is a _basic_ attempt to address rhbz#1264156 [1] which is
client side queue growing too fast due poor connection.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1264156

I'm limiting the queue to maximum of 500. This is not exactly random,
I'm testing by redirecting the webcam locally and testing with tc to
simulate slow connection. Locally I can add 170ms latency before start
to loose all frames from the webcam (queue == max). Between 100-150 we
lose some frames but quality is still acceptable IMHO.

Memory does not grow indefinitely anymore.

So, an internal API is acceptable for this? Should it be channel's
specific length? Any better way to implement this?

Any ideas is welcome!

Victor Toso (1):
  spice-channel: check message queue length

 src/channel-usbredir.c   | 7 +++++++
 src/spice-channel-priv.h | 1 +
 src/spice-channel.c      | 9 +++++++++
 3 files changed, 17 insertions(+)

-- 
2.4.3



More information about the Spice-devel mailing list