From 12cab58194000046133e10dc6ab8306a9ba7a983 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 14 Nov 2019 14:58:57 -0800 Subject: [PATCH] logging/gelf: recommend to disable compression It was discovered that compression in gelf logging driver is highly inefficient in terms of CPU. IOW, lots of CPU is used when compression is enabled. The natural solution would be to change the default to `none`, i.e. no compression, but that would break some setups (in particular, using Logstash < 7.4). The only option left is to warn the user about the consequences of leaving the compression enabled. For more background details, please see https://github.com/moby/moby/pull/40101 Signed-off-by: Kir Kolyshkin --- config/containers/logging/gelf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/containers/logging/gelf.md b/config/containers/logging/gelf.md index 49aa4f0aab..81ec55f904 100644 --- a/config/containers/logging/gelf.md +++ b/config/containers/logging/gelf.md @@ -80,7 +80,7 @@ The `gelf` logging driver supports the following options: | Option | Required | Description | Example value | | :------------------------- | :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------- | | `gelf-address` | required | The address of the GELF server. `tcp` and `udp` are the only supported URI specifier and you must specify the port. | `--log-opt gelf-address=udp://192.168.0.42:12201` | -| `gelf-compression-type` | optional | `UDP Only` The type of compression the GELF driver uses to compress each log message. Allowed values are `gzip`, `zlib` and `none`. The default is `gzip`. | `--log-opt gelf-compression-type=gzip` | +| `gelf-compression-type` | optional | `UDP Only` The type of compression the GELF driver uses to compress each log message. Allowed values are `gzip`, `zlib` and `none`. The default is `gzip`. Note that enabled compression leads to excessive CPU usage, so it is highly recommended to set this to `none`. | `--log-opt gelf-compression-type=gzip` | | `gelf-compression-level` | optional | `UDP Only` The level of compression when `gzip` or `zlib` is the `gelf-compression-type`. An integer in the range of `-1` to `9` (BestCompression). Default value is 1 (BestSpeed). Higher levels provide more compression at lower speed. Either `-1` or `0` disables compression. | `--log-opt gelf-compression-level=2` | | `gelf-tcp-max-reconnect` | optional | `TCP Only` The maximum number of reconnection attempts when the connection drop. An positive integer. Default value is 3. | `--log-opt gelf-tcp-max-reconnect=3` | | `gelf-tcp-reconnect-delay` | optional | `TCP Only` The number of seconds to wait between reconnection attempts. A positive integer. Default value is 1. | `--log-opt gelf-tcp-reconnect-delay=1` |