Commit 609d4ea8 authored by yacovm's avatar yacovm
Browse files

[FAB-14578] Sane defaults for block cutting



A max of 10 transactions per block is too low because
it creates tiny blocks. We should increase it to a
saner value which is more optimized for throughput
instead of letting the users always do it themselves.

Correspondingly, 256 blocks circulating the consensus
is too high and should be tuned down appropriately.

Change-Id: Ib2f2c0f9c1875102e14d73f054f67103036b3d8d
Signed-off-by: default avataryacovm <yacovm@il.ibm.com>
parent 3c816064
......@@ -185,9 +185,9 @@ var genesisDefaults = TopLevel{
Addresses: []string{"127.0.0.1:7050"},
BatchTimeout: 2 * time.Second,
BatchSize: BatchSize{
MaxMessageCount: 10,
MaxMessageCount: 500,
AbsoluteMaxBytes: 10 * 1024 * 1024,
PreferredMaxBytes: 512 * 1024,
PreferredMaxBytes: 2 * 1024 * 1024,
},
Kafka: Kafka{
Brokers: []string{"127.0.0.1:9092"},
......@@ -197,7 +197,7 @@ var genesisDefaults = TopLevel{
TickInterval: "500ms",
ElectionTick: 10,
HeartbeatTick: 1,
MaxInflightMsgs: 256,
MaxInflightMsgs: 5,
MaxSizePerMsg: 1048576,
SnapshotInterval: 100 * 1024 * 1024, // 100MB
},
......
......@@ -250,7 +250,7 @@ Orderer: &OrdererDefaults
# Max Message Count: The maximum number of messages to permit in a
# batch. No block will contain more than this number of messages.
MaxMessageCount: 10
MaxMessageCount: 500
# Absolute Max Bytes: The absolute maximum number of bytes allowed for
# the serialized messages in a batch. The maximum block size is this value
......@@ -272,7 +272,7 @@ Orderer: &OrdererDefaults
# will contain only that message. Because messages may be larger than
# preferred max bytes (up to AbsoluteMaxBytes), some batches may exceed
# the preferred max bytes, but will always contain exactly one transaction.
PreferredMaxBytes: 512 KB
PreferredMaxBytes: 2 MB
# Max Channels is the maximum number of channels to allow on the ordering
# network. When set to 0, this implies no maximum number of channels.
......@@ -329,7 +329,7 @@ Orderer: &OrdererDefaults
# MaxInflightMsgs limits the max number of in-flight append messages
# during optimistic replication phase.
MaxInflightMsgs: 256
MaxInflightMsgs: 5
# MaxSizePerMsg limits the max size of each append message. Smaller
# value lowers the raft recovery cost(initial probing and message
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment