<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Victor,<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2015, at 17:27 PM, Victor Toso <<a href="mailto:lists@victortoso.com" class="">lists@victortoso.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Hey,<br class=""><br class="">I was taking a look at rhbz#1264156 [1] which leads to a great amount<br class="">of memory being used in the client when sharing webcam with usbredir<br class="">when the connection is slow enough (not necessary slow but slower then<br class="">the webcam data flow).<br class=""><br class="">Looks like there are other bugs about similar issue like rhbz#1201387<br class="">[2] with _being slow_ and high memory consumption in the client. I've<br class="">also hit fdo#90286 [3] during my local tests...<br class=""><br class="">[1] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1264156" class="">https://bugzilla.redhat.com/show_bug.cgi?id=1264156</a><br class="">[2] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1201387" class="">https://bugzilla.redhat.com/show_bug.cgi?id=1201387</a><br class=""></div></blockquote><blockquote type="cite" class=""><div class="">[3] <a href="https://bugs.freedesktop.org/show_bug.cgi?id=90286" class="">https://bugs.freedesktop.org/show_bug.cgi?id=90286</a></div></blockquote><blockquote type="cite" class=""><div class=""><br class="">Well, what I was planing to do in order to address the high memory<br class="">consumption is the following combination:<br class=""><br class="">1-) Avoid sharing devices when connection is too slow.<br class=""> libusb has libusb_get_device_speed function which can possibility<br class="">return the operation speed of the device. By having the quality and<br class="">speed of the connection we could deny connecting devices that are<br class="">too fast.<br class=""><br class="">2-) Limiting the queue size for usbredir<br class=""> the memory grows because the queue to send the data grows faster<br class="">then network's read. Even with (1) we could hit issues in the long<br class="">run. In this case, we could identify by the queue limit being reached.<br class="">The solution should be disabling the usbredirection of the device.<br class=""></div></blockquote><div><br class=""></div><div>This solution is the most robust one probably.</div><br class=""><blockquote type="cite" class=""><div class=""><br class="">3-) Negotiate capabilities with device<br class=""> Not sure how much we can configure from spice-gtk to device<br class="">parameters but theoretically it should be possible to change resolution<br class="">and quality of the device, making less use of bandwidth.<br class=""></div></blockquote><div><br class=""></div><div>This is an interesting idea, but will require device/class-specific code unfortunately.</div><div><br class=""></div><div>It would be nice to use Bandwidth Allocation mechanisms somehow,</div><div>but I can’t think of a technically acceptable way…</div><div><br class=""></div><div>~Dmitry.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><br class="">That's the general idea to address those issues and after talking with<br class="">Pavel we agreed that would be good to send an email before diving into<br class="">it.<br class=""><br class="">Any thoughts about this? Hints? Patches? :)<br class=""><br class="">side-note:<br class="">I'm fairly convinced that channel-usbredir could trigger memory<br class="">issues in the server side as happened with channel-webdav in [4] and<br class="">[5] although I wasn't able to trigger it yet.<br class=""><br class="">[4] <a href="https://bugs.freedesktop.org/show_bug.cgi?id=91350" class="">https://bugs.freedesktop.org/show_bug.cgi?id=91350</a><br class="">[5] <a href="https://bugs.freedesktop.org/show_bug.cgi?id=91903" class="">https://bugs.freedesktop.org/show_bug.cgi?id=91903</a><br class=""><br class="">cheers,<br class=""> Victor Toso<br class="">_______________________________________________<br class="">Spice-devel mailing list<br class=""><a href="mailto:Spice-devel@lists.freedesktop.org" class="">Spice-devel@lists.freedesktop.org</a><br class="">http://lists.freedesktop.org/mailman/listinfo/spice-devel<br class=""></div></blockquote></div><br class=""></div></body></html>