Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kafka output LZ4 compression support #4647

Closed
weichuliu opened this issue Jul 10, 2017 · 0 comments · Fixed by #7025
Closed

Kafka output LZ4 compression support #4647

weichuliu opened this issue Jul 10, 2017 · 0 comments · Fixed by #7025

Comments

@weichuliu
Copy link

weichuliu commented Jul 10, 2017

What

Currently Kafka officially supports LZ4 as compression method. (See producer configs)

It is already supported by Sarama. As I checked beats' vendored code on master, it is already there.

However, filebeat (on version 6.0.0-alpha2) itself doesn't support lz4 compression. It would throw the following error:

2017/07/10 21:08:48.985462 outputs.go:101: ERR failed to initialize kafka plugin as output: compression mode 'lz4' unknown accessing 'output.kafka' (source:'filebeat/lz4_test.yml')
2017/07/10 21:08:48.985477 beat.go:539: CRIT Exiting: error initializing publisher: compression mode 'lz4' unknown accessing 'output.kafka' (source:'filebeat/lz4_test.yml')
Exiting: error initializing publisher: compression mode 'lz4' unknown accessing 'output.kafka' (source:'filebeat/lz4_test.yml')

Why we want LZ4

Since we are using filebeat to forward a large amount of logs to our Kafka, using gzip is very CPU consuming on broker side. On the other hand, Kafka's storage with snappy is poorly implememted. (As tested by myself, on 0.10.x, snappy uses 70% disk as uncompressed while gzip uses 10%. This is improved on 0.11.0 but it still uses 35% as uncompressed.)

From this kafka compression benchmark, and this stackoverflow post LZ4 has good performance, along with very high disk effeciency. That's why we would really want to have beats supporting LZ4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant