[ 
https://issues.apache.org/jira/browse/FLINK-14845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16982446#comment-16982446
 ] 

Piotr Nowojski commented on FLINK-14845:
----------------------------------------

For the output, writing back the compressed bytes in place of the uncompressed 
ones would be a neat trick, as long as it doesn't complicate the code too much.

{quote}For InputGate, currently, the previous Buffer is guaranteed to be 
recycled before getting next buffer, so we can decompress the compressed Buffer 
to the reusable intermediate buffer in decompressor{quote}
I'm not sure if that's a good idea to relay on such behaviour. I think there 
was not explicit contract that only one single buffer can be polled from an 
InputGate/InputChannel at a time, or is there? Would it be more complicate to 
request a buffer from the network pool?
{quote}support LZ4 compression algorithm and we can use that by default.{quote}
+1 for LZ4 as the default.
{quote}I think we should make it pluggable. The users can implement a factory 
for compressor and decompressor instance creation{quote}
That might be a follow up story. And if we want to make it pluggable, keep in 
mind that it should be using plugin class loader ({{PluginUtils}}, 
{{PluginManager}}). Also, could you list the dependencies that you would like 
to add to the runtime for the default compression (if any)? We might need to 
pluginize the default compressor as well.
{quote}At least two config options should be added, one is for compression 
enable/disable and another is for compression codec (factory).{quote}
I was mainly thinking if you want to expose to the user some compression 
tweaking parameters (affecting compression speed/ratio). I would prefer to 
avoid that, at least in the first version.
{quote}I think users of Flink can benefit from this feature, especially the 
batch users, so it better to make it available for 1.10 {quote}
This might be tight, but we can try to do it.

> Introduce data compression to blocking shuffle.
> -----------------------------------------------
>
>                 Key: FLINK-14845
>                 URL: https://issues.apache.org/jira/browse/FLINK-14845
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Network
>            Reporter: Yingjie Cao
>            Assignee: Yingjie Cao
>            Priority: Major
>
> Currently, blocking shuffle writer writes raw output data to disk without 
> compression. For IO bounded scenario, this can be optimized by compressing 
> the output data. It is better to introduce a compression mechanism and offer 
> users a config option to let the user decide whether to compress the shuffle 
> data. Actually, we hava implemented compression in our inner Flink version 
> and  here are some key points:
> 1. Where to compress/decompress?
> Compressing at upstream and decompressing at downstream.
> 2. Which thread do compress/decompress?
> Task threads do compress/decompress.
> 3. Data compression granularity.
> Per buffer.
> 4. How to handle that when data size become even bigger after compression?
> Give up compression in this case and introduce an extra flag to identify if 
> the data was compressed, that is, the output may be a mixture of compressed 
> and uncompressed data.
>  
> We'd like to introduce blocking shuffle data compression to Flink if there 
> are interests.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to