You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/22.0/reference/vreplication/flags.md
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,30 @@ weight: 80
7
7
There are several flags that can be specified when `vttablet` is launched that are related to the
8
8
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.
9
9
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 then *each* worker thread could be decompressing a compressed transaction payload concurrently. So
30
+
this is a key factor to keep in mind when considering this setting *if you often have large transactions due to the usage of large JSON or BLOB
0 commit comments