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
Created attachment 130110 [details]
massif on vp8 stream
* Note that I did sw decoding
* spice-gtk is ecb4de270587 (master)
* spice-server is 9af182b67a (master)
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.
-- 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.