RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1460191 - RFE: enable LZ4 compression in spice-server
Summary: RFE: enable LZ4 compression in spice-server
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: spice
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.1
Assignee: Snir Sheriber
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On: 1432958
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-09 10:53 UTC by David Jaša
Modified: 2023-09-14 03:59 UTC (History)
9 users (show)

Fixed In Version: spice-0.14.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1460198 (view as bug list)
Environment:
Last Closed: 2020-01-22 09:18:19 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Jaša 2017-06-09 10:53:40 UTC
Description of problem:
LZ4 is good algorithm in both low CPU utilization and high compression ratio so it would be nice to have it as a RHEL default.
This bug depends on lz4 library inclusion in el7.

Version-Release number of selected component (if applicable):
RHEL 7.4 / spice-server-0.12.8-2.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Victor Toso 2017-06-09 10:59:04 UTC
That would be great in 7.5, yes!

Comment 3 Christophe Fergeau 2017-09-22 09:39:26 UTC
This strongly depends on bug#1432958 (inclusion of lz4 package in el7) which is not fixed yet, so for now cannot move forward with this bug.

Comment 7 David Jaša 2018-02-28 20:42:04 UTC
The spice-server-0.14.0-2.el7.x86_64 is built against lz4:
# ldd /usr/lib64/libspice-server.so.1 | grep lz
        liblz4.so.1 => /lib64/liblz4.so.1 (0x00007f5a2b979000)

but the server can't be run with lz4 image compression specified:
/usr/libexec/qemu-kvm -vga qxl -monitor stdio -spice addr=::,port=5800,disable-ticketing,image-compression=lz4
qemu-kvm: spice: invalid image compression: lz4

When run without image-compression and connecting from client with --spice-preferred-compression=lz4 set, lz4 compression doesn't look like being selected either:
- client:
(virt-viewer:10238): GSpice-DEBUG: channel-display.c:968 display-2:0: spice_display_channel_up: cache_size 83886080, glz_window_size 50327552 (bytes)
(virt-viewer:10238): GSpice-DEBUG: channel-display.c:526 display-2:0: changing preferred compression to 7

- server:
(process:18497): Spice-DEBUG: display-channel.c:2380:display_channel_update_compression: jpeg disabled
(process:18497): Spice-DEBUG: display-channel.c:2381:display_channel_update_compression: zlib-over-glz disabled

No mention of lz4 use either in LAN or WAN conditions.

Comment 9 Victor Toso 2018-03-05 07:13:29 UTC
Moving to 7.6

Comment 10 Christophe Fergeau 2018-06-19 18:10:45 UTC
(In reply to David Jaša from comment #7)
> The spice-server-0.14.0-2.el7.x86_64 is built against lz4:
> # ldd /usr/lib64/libspice-server.so.1 | grep lz
>         liblz4.so.1 => /lib64/liblz4.so.1 (0x00007f5a2b979000)
> 
> but the server can't be run with lz4 image compression specified:
> /usr/libexec/qemu-kvm -vga qxl -monitor stdio -spice
> addr=::,port=5800,disable-ticketing,image-compression=lz4
> qemu-kvm: spice: invalid image compression: lz4
> 

This is 'expected', as https://patchwork.ozlabs.org/patch/432677/ was never resolved.

> When run without image-compression and connecting from client with
> --spice-preferred-compression=lz4 set, lz4 compression doesn't look like
> being selected either:
> - client:
> (virt-viewer:10238): GSpice-DEBUG: channel-display.c:968 display-2:0:
> spice_display_channel_up: cache_size 83886080, glz_window_size 50327552
> (bytes)
> (virt-viewer:10238): GSpice-DEBUG: channel-display.c:526 display-2:0:
> changing preferred compression to 7

'7' is indeed lz4

> 
> - server:
> (process:18497): Spice-DEBUG:
> display-channel.c:2380:display_channel_update_compression: jpeg disabled
> (process:18497): Spice-DEBUG:
> display-channel.c:2381:display_channel_update_compression: zlib-over-glz
> disabled
> 
> No mention of lz4 use either in LAN or WAN conditions.

These messages are actually unrelated. At the moment there are no logs when setting the preferred compression algorithm, https://gitlab.freedesktop.org/spice/spice/blob/master/server/dcc.c#L1073
I'll add one upstream ;)

Comment 12 David Blechter 2018-12-10 17:02:25 UTC
RFE is moving to rhel 8, where it will be triaged and prioritized

Comment 13 Martin Tessun 2019-11-25 08:24:45 UTC
Hi David,

looks like this is already working. Can you please doublecheck and CLOSE CURRENTRELEASE in case it does?
We might need a RHV RFE for that eventually.

Thanks!
Martin

Comment 14 Frediano Ziglio 2020-01-22 08:59:12 UTC
While looking at another bug I was checking shared object, of spice-server (RHEL 8.2), you can see that LZ4 is enabled:

$ objdump -T libspice-server.so.1|grep LZ4
0000000000000000      DF *UND*  0000000000000000              LZ4_decompress_safe_continue
0000000000000000      DF *UND*  0000000000000000              LZ4_compress_fast_continue
0000000000000000      DF *UND*  0000000000000000              LZ4_decompress_safe
0000000000000000      DF *UND*  0000000000000000              LZ4_compress_default
0000000000000000      DF *UND*  0000000000000000              LZ4_freeStream
0000000000000000      DF *UND*  0000000000000000              LZ4_createStreamDecode
0000000000000000      DF *UND*  0000000000000000              LZ4_createStream
0000000000000000      DF *UND*  0000000000000000              LZ4_freeStreamDecode
0000000000000000      DF *UND*  0000000000000000              LZ4_compressBound


I assume this bug can be closed.

Comment 15 David Blechter 2020-01-22 09:18:19 UTC
closing based on #c14

Comment 16 Red Hat Bugzilla 2023-09-14 03:59:00 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.