go-graphite / carbon-clickhouse

Graphite metrics receiver with ClickHouse as storage
MIT License
186 stars 48 forks source link

Add compression for Carbon cache files #31

Closed blind-oracle closed 5 years ago

blind-oracle commented 5 years ago

In case Clickhouse is unavailable for long - it's good to save some space on temporary files. With LZ4 level 5 the files are usually 3-4 times smaller.

  1. Add LZ4 compression support, possibility to add others in the future. Defaults to "none" so configuration is fully backwards-compatible.
  2. Simplify some code structure (points/points-reverse etc)
  3. Add github.com/pierrec/lz4 to deps and vendor
lomik commented 5 years ago

@blind-oracle , fyi

https://github.com/lomik/carbon-clickhouse/commit/4850d1377bd591d2ab0bcee5bc34754f9d044c2b Added extension to compressed files