<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
Hi,<br>
<div class="moz-cite-prefix">On 05/10/2016 02:25 PM, Christophe
Fergeau wrote:<br>
</div>
<blockquote cite="mid:20160510112515.GG15244@edamame.cdg.redhat.com"
type="cite">
<pre wrap="">Have you measured how much of a gain lz4 compression gives for some use
cases?
</pre>
</blockquote>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px; display: block; padding: 9.5px; margin: 0px 0px 10px; line-height: 14.3px; color: rgb(51, 51, 51); word-break: break-all; word-wrap: break-word; border: 0px; border-radius: 0px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: white;">
I've made some testing- when compressing usb storage device with ntfs
fs it's mostly depends on the files which are being transfer, the
compression ratio can be 9:10 for already-compressed\binary files and up to 1:9
for documents\code\other files (and during mounting empty\not-full fs-
the compression ratio is always very high since a lot of "empty" data is
being sent). so basically the results seems pretty good for file systems
-with the camera device the compression ratio was not high (data is already
compressed)
-for devices with small data packets (e.g keyboard) data will be sent
uncompressed
The perf testing has shown that the cpu is not being significantly
influenced by the compression.</pre>
<blockquote cite="mid:20160510112515.GG15244@edamame.cdg.redhat.com"
type="cite">
<pre wrap="">
Christophe
On Thu, May 05, 2016 at 02:43:32PM +0300, Snir Sheriber wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Compressed message type is CompressedData which contains compression
type (1 byte) followed by the uncompressed data size (4 bytes) followed
by the compressed data size (4 bytes) followed by the compressed data
---
common/client_marshallers.h | 1 +
common/messages.h | 7 +++++++
spice.proto | 15 +++++++++++++++
3 files changed, 23 insertions(+)
diff --git a/common/client_marshallers.h b/common/client_marshallers.h
index 728987e..2074323 100644
--- a/common/client_marshallers.h
+++ b/common/client_marshallers.h
@@ -33,6 +33,7 @@ SPICE_BEGIN_DECLS
typedef struct {
void (*msg_SpiceMsgEmpty)(SpiceMarshaller *m, SpiceMsgEmpty *msg);
void (*msg_SpiceMsgData)(SpiceMarshaller *m, SpiceMsgData *msg);
+ void (*msg_SpiceMsgCompressedData)(SpiceMarshaller *m, SpiceMsgCompressedData *msg);
void (*msgc_ack_sync)(SpiceMarshaller *m, SpiceMsgcAckSync *msg);
void (*msgc_pong)(SpiceMarshaller *m, SpiceMsgPing *msg);
void (*msgc_disconnecting)(SpiceMarshaller *m, SpiceMsgDisconnect *msg);
diff --git a/common/messages.h b/common/messages.h
index f537950..d001850 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -55,6 +55,13 @@ typedef struct SpiceMsgData {
uint8_t data[0];
} SpiceMsgData;
+typedef struct SpiceMsgCompressedData {
+ uint8_t type;
+ uint32_t uncompressed_size;
+ uint32_t compressed_size;
+ uint8_t compressed_data[0];
+} SpiceMsgCompressedData;
+
typedef struct SpiceMsgEmpty {
uint8_t padding;
} SpiceMsgEmpty;
diff --git a/spice.proto b/spice.proto
index 4a0778d..ea29fb0 100644
--- a/spice.proto
+++ b/spice.proto
@@ -120,6 +120,19 @@ message Data {
uint8 data[] @end @ctype(uint8_t);
} @nocopy;
+enum8 data_compression_type {
+ NONE,
+ LZ4,
+ INVALID,
+};
+
+message CompressedData {
+ data_compression_type type;
+ uint32 uncompressed_size;
+ uint32 compressed_size;
+ uint8 compressed_data[] @end;
+} @ctype(SpiceMsgCompressedData);
+
struct ChannelWait {
uint8 channel_type;
uint8 channel_id;
@@ -1373,8 +1386,10 @@ channel SmartcardChannel : BaseChannel {
channel SpicevmcChannel : BaseChannel {
server:
Data data = 101;
+ CompressedData compressed_data = 102;
client:
Data data = 101;
+ CompressedData compressed_data = 102;
};
channel UsbredirChannel : SpicevmcChannel {
--
2.5.5
_______________________________________________
Spice-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/spice-devel">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a>
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>