Bug 100097 - do zero-copy in gstreamer for decoding
Summary: do zero-copy in gstreamer for decoding
Status: RESOLVED MOVED
Alias: None
Product: Spice
Classification: Unclassified
Component: RFE (general) (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-07 10:04 UTC by Victor Toso
Modified: 2018-06-03 10:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
massif on mjpeg stream (47.48 KB, text/plain)
2017-03-07 10:04 UTC, Victor Toso
Details
massif on vp8 stream (179.57 KB, text/plain)
2017-03-07 10:05 UTC, Victor Toso
Details

Description Victor Toso 2017-03-07 10:04:59 UTC
Created attachment 130109 [details]
massif on mjpeg stream

I did a quick test doing streaming with mjpeg and vp8 to compare the memory usage in the client. In this test I played a ~2 min video in the guest in maximized window.

With mjpeg we have a peak of 34.13 MB which is somewhat fine.

With vp8 we got a peak of 205.6 MB, mostly around gstreamer code.

For now, I can see two ways to improve the code:

1-) Having some memory pool in spice-channel to avoid malloc for each new message. In the code itself we already have a FIXME for that, saying:

> /* FIXME: do not allow others to take ref on in, and use realloc here?
>  * this would avoid malloc/free on each message?

2-) Doing zero-copy with gstreamer, like we do in server for encoding.

Attaching massif data for future reference
Comment 1 Victor Toso 2017-03-07 10:05:39 UTC
Created attachment 130110 [details]
massif on vp8 stream
Comment 2 Victor Toso 2017-03-07 10:09:18 UTC
* Note that I did sw decoding
* spice-gtk is ecb4de270587 (master)
* spice-server is 9af182b67a (master)
Comment 3 Frediano Ziglio 2017-03-13 13:16:08 UTC
Avoiding malloc/free every time should not affect massif, massif by default shows current memory.
About GStreamer I think is worth checking the buffering of the various plugins in the pipeline. I discovered a problem in the current design and we keep a uncompressed queue instead of the compressed one.
Comment 4 GitLab Migration User 2018-06-03 10:25:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/spice/spice/issues/8.


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.