From 3090482741501be50be6b47b65cdc8b13c55a91a Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Sat, 18 Jan 2020 10:15:16 +0800 Subject: [PATCH 1/5] config: change the default value of txn-total-size-limit, add comment about its conflict with binlog, --- config/config.toml.example | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.toml.example b/config/config.toml.example index 949f6351a1461..0893ecfabf00e 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -215,9 +215,8 @@ bind-info-lease = "3s" # The limitation of the size in byte for the entries in one transaction. # If using TiKV as the storage, the entry represents a key/value pair. -# WARNING: Do not set the value too large, otherwise it will make a very large impact on the TiKV cluster. -# Please adjust this configuration carefully. -txn-total-size-limit = 1073741824 +# NOTE: If binlog is enabled, this value should be less than 104857600 because the two configurations conflict with each other. +txn-total-size-limit = 104857599 [proxy-protocol] # PROXY protocol acceptable client networks. @@ -327,6 +326,7 @@ capacity = 2048000 [binlog] # enable to write binlog. +# NOTE: If binlog is enabled, txn-total-size-limit should be less than 104857600 because the two configurations conflict with each other. enable = false # WriteTimeout specifies how long it will wait for writing binlog to pump. From 215781d4a9eb2116f41afc2e907b69183c19af13 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Sat, 18 Jan 2020 10:39:33 +0800 Subject: [PATCH 2/5] address comment --- config/config.toml.example | 1 + 1 file changed, 1 insertion(+) diff --git a/config/config.toml.example b/config/config.toml.example index 0893ecfabf00e..bd0e9f30d89f6 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -216,6 +216,7 @@ bind-info-lease = "3s" # The limitation of the size in byte for the entries in one transaction. # If using TiKV as the storage, the entry represents a key/value pair. # NOTE: If binlog is enabled, this value should be less than 104857600 because the two configurations conflict with each other. +# If binlog is disabled, this value is restrict by the RAM size, the recommended value should be at most 1/6 of the RAM size. txn-total-size-limit = 104857599 [proxy-protocol] From 7b3504f2381eb31c623a4943f0917d98b6b4cf71 Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Sat, 18 Jan 2020 10:50:32 +0800 Subject: [PATCH 3/5] fix CI --- config/config.go | 2 +- config/config.toml.example | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.go b/config/config.go index 98eaa02226ab0..9296ead0fe1a8 100644 --- a/config/config.go +++ b/config/config.go @@ -39,7 +39,7 @@ import ( const ( MaxLogFileSize = 4096 // MB // DefTxnTotalSizeLimit is the default value of TxnTxnTotalSizeLimit. - DefTxnTotalSizeLimit = 1024 * 1024 * 1024 + DefTxnTotalSizeLimit = 100 * 1024 * 1024 ) // Valid config maps diff --git a/config/config.toml.example b/config/config.toml.example index bd0e9f30d89f6..27481f5f029a9 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -215,9 +215,9 @@ bind-info-lease = "3s" # The limitation of the size in byte for the entries in one transaction. # If using TiKV as the storage, the entry represents a key/value pair. -# NOTE: If binlog is enabled, this value should be less than 104857600 because the two configurations conflict with each other. -# If binlog is disabled, this value is restrict by the RAM size, the recommended value should be at most 1/6 of the RAM size. -txn-total-size-limit = 104857599 +# NOTE: If binlog is enabled, this value should be less than 104857600 because the two configurations conflict with each other, otherwise this value is restrict by the RAM size. +# The recommended value should be at most 1/6 of the RAM size. there is also a 10G limitation of this value. +txn-total-size-limit = 104857600 [proxy-protocol] # PROXY protocol acceptable client networks. From cec7254c90da2de97b9dad6c2265b88528280e9e Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Sat, 18 Jan 2020 10:51:30 +0800 Subject: [PATCH 4/5] typo --- config/config.toml.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.toml.example b/config/config.toml.example index 27481f5f029a9..2a146e5705114 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -216,7 +216,7 @@ bind-info-lease = "3s" # The limitation of the size in byte for the entries in one transaction. # If using TiKV as the storage, the entry represents a key/value pair. # NOTE: If binlog is enabled, this value should be less than 104857600 because the two configurations conflict with each other, otherwise this value is restrict by the RAM size. -# The recommended value should be at most 1/6 of the RAM size. there is also a 10G limitation of this value. +# The recommended value should be at most 1/6 of the RAM size, there is also a 10G limitation of this value. txn-total-size-limit = 104857600 [proxy-protocol] From a4cbfe9081de484bed9b0092e368277032e6546e Mon Sep 17 00:00:00 2001 From: tiancaiamao Date: Sun, 19 Jan 2020 11:47:48 +0800 Subject: [PATCH 5/5] address comment --- config/config.toml.example | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.toml.example b/config/config.toml.example index 2a146e5705114..b2c1abfcf6b85 100644 --- a/config/config.toml.example +++ b/config/config.toml.example @@ -215,8 +215,8 @@ bind-info-lease = "3s" # The limitation of the size in byte for the entries in one transaction. # If using TiKV as the storage, the entry represents a key/value pair. -# NOTE: If binlog is enabled, this value should be less than 104857600 because the two configurations conflict with each other, otherwise this value is restrict by the RAM size. -# The recommended value should be at most 1/6 of the RAM size, there is also a 10G limitation of this value. +# NOTE: If binlog is enabled, this value should be less than 104857600(10M) because this is the maximum size that can be handled by Pumper. +# If binlog is not enabled, this value should be less than 10737418240(10G). txn-total-size-limit = 104857600 [proxy-protocol] @@ -327,7 +327,7 @@ capacity = 2048000 [binlog] # enable to write binlog. -# NOTE: If binlog is enabled, txn-total-size-limit should be less than 104857600 because the two configurations conflict with each other. +# NOTE: If binlog is enabled, txn-total-size-limit should be less than 104857600(10M). enable = false # WriteTimeout specifies how long it will wait for writing binlog to pump.