Bug 62188 - RFE: Automatically disable compression for local-only
Summary: RFE: Automatically disable compression for local-only
Status: RESOLVED FIXED
Alias: None
Product: Spice
Classification: Unclassified
Component: server (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-11 18:49 UTC by Zeeshan Ali
Modified: 2015-03-13 14:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Zeeshan Ali 2013-03-11 18:49:48 UTC
For local-only case (client and server on the same machine), compression is quite redundant as we can assume very high bandwidth so no need to waste CPU time on compressing/decompressing.

In theory we should first address bug#62187 but in practice (testing with varrious OSs), I have observed that we don't really get lipsync when playing HD videos fullscreen (pretty common scenario now a days). I suspect its because of decoding of video/audio in the guest combined with compression and decompression of SPICE stream on the same CPU and CPU being unable to manage it. Before you ask my host:


CPU: Intel® Core™ i5 CPU M 540 @ 2.53GHz × 4
RAM: 8G
Comment 1 Zeeshan Ali 2014-10-22 19:41:49 UTC
ping?
Comment 2 Marc-Andre Lureau 2014-10-22 22:08:23 UTC
there is already some code to adjust compression settings depending on bandwidth.

For local case only, we should be able to figure out if the socket is unix (does Boxes use that these days?), and disable compression completely then. I think this might doable relatively easily, but the benefit is still marginal since most adjustements are already made.
Comment 3 Zeeshan Ali 2014-10-22 22:58:22 UTC
(In reply to Marc-Andre Lureau from comment #2)
> there is already some code to adjust compression settings depending on
> bandwidth.
> 
> For local case only, we should be able to figure out if the socket is unix
> (does Boxes use that these days?), and disable compression completely then.
> I think this might doable relatively easily, but the benefit is still
> marginal since most adjustements are already made.

Cool. Boxes doesn't yet use unix socket but I was hoping I fix that before 3.16. I am not entirely sure I understand yet how to achieve that but I hope to learn from the pointers provided by teuf and danpb:

https://bugzilla.gnome.org/show_bug.cgi?id=738573
Comment 4 Zeeshan Ali 2015-02-24 23:45:43 UTC
(In reply to Zeeshan Ali from comment #3)
> (In reply to Marc-Andre Lureau from comment #2)
> > there is already some code to adjust compression settings depending on
> > bandwidth.
> > 
> > For local case only, we should be able to figure out if the socket is unix
> > (does Boxes use that these days?), and disable compression completely then.
> > I think this might doable relatively easily, but the benefit is still
> > marginal since most adjustements are already made.
> 
> Cool. Boxes doesn't yet use unix socket but I was hoping I fix that before
> 3.16. I am not entirely sure I understand yet how to achieve that but I hope
> to learn from the pointers provided by teuf and danpb:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=738573

OK, that is done now (at least on Boxes side). Does spice already disables compression when connected through unix socket?
Comment 5 Marc-Andre Lureau 2015-02-24 23:59:07 UTC
(In reply to Zeeshan Ali from comment #4)
> OK, that is done now (at least on Boxes side). Does spice already disables
> compression when connected through unix socket?

there are already heuristics to tune compression depending on bandwidth.

recently, I added some more code to disable some unnecessary steps when using unix socket: http://cgit.freedesktop.org/spice/spice/commit/?id=72cc0cff710f8be3e721fed82ab2ce519f03ccb4

Imho, there are still things possible left, but this is quite clearly low priority.
Comment 6 Zeeshan Ali 2015-02-25 00:35:49 UTC
(In reply to Marc-Andre Lureau from comment #5)
> (In reply to Zeeshan Ali from comment #4)
> > OK, that is done now (at least on Boxes side). Does spice already disables
> > compression when connected through unix socket?
> 
> there are already heuristics to tune compression depending on bandwidth.
> 
> recently, I added some more code to disable some unnecessary steps when
> using unix socket:
> http://cgit.freedesktop.org/spice/spice/commit/
> ?id=72cc0cff710f8be3e721fed82ab2ce519f03ccb4
> 
> Imho, there are still things possible left, but this is quite clearly low
> priority.

Cool. Please feel free to close this bug then.
Comment 7 Zeeshan Ali 2015-02-25 13:26:47 UTC
AFAIK "WORKSFORME" means "the bug might be valid but I just can't reproduce it" so not the right resolution IMHO but up to you..
Comment 8 Marc-Andre Lureau 2015-03-13 14:27:50 UTC
more heuristic recently http://cgit.freedesktop.org/spice/spice/commit/?id=6b4c036bdba53ddafde0a706c6de5d2172c09b25


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.