0

I have a TiKV setup it has a region-split-size as 96MB, which is the default and raft-log-gc-size-limit is 144MB. How does it impact the tikv cluster. Since it is mentioned that raft-log-gc-size-limit should be 3/4th of region-split-size.

guru107
  • 1,053
  • 1
  • 11
  • 28

1 Answers1

1

You may waste space for storing raft logs and waste network traffic to restore Raft state.

A Region is managed by a Raft group, and it splits when it's data exceeds region-max-size, eg, Region [a,e) may be split into several Regions [a,b), [b,c), [c,d), [d,e) and the size of [a,b), [b,c), [c,d) are around the region-split-size. So TiKV assumes size of a snapshot is around the region-split-size too.

An out of date peer restores state either by snapshot or by raft logs. Raft logs are always preferred. There are two possible outcomes if we store too many raft logs (> region-spilt-size):

  1. Waste network traffic to restore state,
  2. Waste space to store raft logs, older raft logs may never be fetched and sent.
NeilShen
  • 558
  • 6
  • 16
  • Is it fine to reduce `raft-log-gc-size-limit` on a running cluster and do a rolling restart? – guru107 Jan 24 '19 at 05:21
  • Generally, we should not reduce `reduce raft-log-gc-size-limit` as it may cause too many snapshots. For now, we need to do a rolling restart to apply the change. – NeilShen Jan 30 '19 at 06:35