Re: client memory issues with usbredir

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

 



Hi Victor,

On Sep 23, 2015, at 17:27 PM, Victor Toso <lists@xxxxxxxxxxxxxx> wrote:

Hey,

I was taking a look at rhbz#1264156 [1] which leads to a great amount
of memory being used in the client when sharing webcam with usbredir
when the connection is slow enough (not necessary slow but slower then
the webcam data flow).

Looks like there are other bugs about similar issue like rhbz#1201387
[2] with _being slow_ and high memory consumption in the client. I've
also hit fdo#90286 [3] during my local tests...

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

Well, what I was planing to do in order to address the high memory
consumption is the following combination:

1-) Avoid sharing devices when connection is too slow.
   libusb has libusb_get_device_speed function which can possibility
return the operation speed of the device. By having the quality and
speed of the connection we could deny connecting devices that are
too fast.

2-) Limiting the queue size for usbredir
   the memory grows because the queue to send the data grows faster
then network's read. Even with (1) we could hit issues in the long
run. In this case, we could identify by the queue limit being reached.
The solution should be disabling the usbredirection of the device.

This solution is the most robust one probably.


3-) Negotiate capabilities with device
   Not sure how much we can configure from spice-gtk to device
parameters but theoretically it should be possible to change resolution
and quality of the device, making less use of bandwidth.

This is an interesting idea, but will require device/class-specific code unfortunately.

It would be nice to use Bandwidth Allocation mechanisms somehow,
but I can’t think of a technically acceptable way…

~Dmitry.



That's the general idea to address those issues and after talking with
Pavel we agreed that would be good to send an email before diving into
it.

Any thoughts about this? Hints? Patches? :)

side-note:
I'm fairly convinced that channel-usbredir could trigger memory
issues in the server side as happened with channel-webdav in [4] and
[5] although I wasn't able to trigger it yet.

[4] https://bugs.freedesktop.org/show_bug.cgi?id=91350
[5] https://bugs.freedesktop.org/show_bug.cgi?id=91903

cheers,
 Victor Toso
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]