Skip to content

Commit bbb6163

Browse files
committed
Document flag added in vitessio/vitess#17220
Signed-off-by: Matt Lord <mattalord@gmail.com>
1 parent 152222e commit bbb6163

File tree

1 file changed

+24
-0
lines changed
  • content/en/docs/22.0/reference/vreplication

1 file changed

+24
-0
lines changed

content/en/docs/22.0/reference/vreplication/flags.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@ weight: 80
77
There are several flags that can be specified when `vttablet` is launched that are related to the
88
VReplication functionality. Some of the flags are relevant when tablets are acting as targets and others when tablets are acting as sources in a VReplication workflow.
99

10+
#### binlog-in-memory-decompressor-max-size
11+
12+
**Type** integer\
13+
**Unit** bytes\
14+
**Default** (134217728) 128MiB\
15+
**Applicable on** source
16+
17+
This is not a VReplication specific flag, but it does affect VReplication handling of [compressed transaction payloads when `binlog_transaction_compression` is enabled](https://dev.mysql.com/doc/refman/en/binary-log-transaction-compression.html) on the source mysqld instances. This flag limits the memory used when decompressing and processing these events and their payload. When the *compressed* payload size
18+
is smaller than this value the payload is decompressed using in-memory buffers. If larger than this size then the decompression will be done
19+
as a stream, with the maxium memory used for the stream also set by this flag. The in-memory decompression is much faster but because the
20+
*uncompressed* payload can be N times larger than the decompressed one — the compressed payload is limited by MySQL's
21+
[`max_allowed_packet`](https://dev.mysql.com/doc/refman/en/server-system-variables.html#sysvar_max_allowed_packet) size but the size of the
22+
uncompressed payload is not strictly limited — the default value can lead to out-of-memory errors in memory constrained environments.
23+
24+
This is a typical trade-off between memory usage and execution time. You will likely want to decrease this value if you are running in memory
25+
constrained environments where you do not have several multiples of the flag's value of memory available. In contrast, if you have a lot of memory
26+
available you may want increase this value to speed up the decompression process for larger payloads.
27+
28+
{{< info >}}
29+
If you are using [multi-threaded replication](https://dev.mysql.com/doc/mysql-replication-excerpt/en/replication-options-replica.html#sysvar_replica_parallel_workers)
30+
then *each* worker thread could be decompressing a compressed transaction payload concurrently. So this is a key factor to keep in mind when
31+
considering this setting *if you often have large transactions due to the usage of large JSON or BLOB values, large bulk writes, etc.*
32+
{{< /info >}}
33+
1034
#### relay_log_max_size
1135

1236
**Type** integer\

0 commit comments

Comments
 (0)