## Conclusion

+ Principles and Usage of TiKV MVCC In-Memory Engine (IME). Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#tikv-mvcc-in-memory-engine>

+ Monitoring Metrics for TiKV MVCC In-Memory Engine (IME). Please refer to：<https://docs.pingcap.com/tidb/stable/grafana-tikv-dashboard/#in-memory-engine>

+ Analyze the obsolete MVCC versions and excessive keys
. Please refer to：<https://docs.pingcap.com/tidb/stable/analyze-slow-queries/#obsolete-mvcc-versions-and-excessive-keys>

+ PCTA / PCTP Exam Knowledge Points:
  + The TiKV MVCC In-Memory Engine (IME) can only accelerate read requests that scan a large number of MVCC versions. Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#can-the-in-memory-engine-reduce-write-latency-and-increase-write-throughput>

  + TiKV MVCC In-Memory Engine (IME) is primarily used to accelerate queries that need to scan a large number of MVCC historical versions, that is, the total number of versions scanned (total_keys) is much greater than the number of versions processed (processed_keys). Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#tikv-mvcc-in-memory-engine>

  + TiKV MVCC In-Memory Engine (IME) is suitable for the following scenarios: 1.The application that requires querying records that are frequently updated or deleted. 2.The application that requires adjusting tidb_gc_life_time to retain historical versions in TiDB for a longer period (for example, 24 hours). Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#tikv-mvcc-in-memory-engine>

  + After you enable the TiKV MVCC In-Memory Engine (IME) , TiKV automatically selects the Regions to load based on the read traffic and MVCC amplification of the Region. Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#automatic-loading>

  + If memory usage reaches 90% of capacity and new Regions need to be loaded, then the TiKV MVCC In-Memory Engine (IME)  selects and evicts Regions based on read traffic. Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#automatic-loading>

  + The `Region Cache Hit` panel indicates The number of times data is successfully retrieved from the Region cache, while the `Region Cache Hit Rate` panel indicates the hit rate from the Region cache of the TiKV MVCC In-Memory Engine (IME). Please refer to：<https://docs.pingcap.com/tidb/stable/grafana-tikv-dashboard/#in-memory-engine>

  + This parameter `in-memory-engine.enable` is the switch for the TiKV MVCC In-Memory Engine (IME) feature, which is disabled by default. You can set it to `true` to enable it. The TiKV MVCC In-Memory Engine (IME) caches the latest written MVCC versions in memory, and implements an MVCC GC mechanism independent of TiDB. Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#usage>

  + The parameter `in-memory-engine.capacity` controls the memory size available to the TiKV MVCC In-Memory Engine (IME) . The default value is `10%` of the system memory, and the maximum value is `5 GiB`. Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#usage>

  + The parameter `in-memory-engine.mvcc-amplification-threshold` controls the threshold for the TiKV MVCC In-Memory Engine (IME)  to select and load Regions based on MVCC read amplification. The default value is `10`, indicating that if reading a single row in a Region requires processing more than `10` MVCC versions, this Region might be loaded into the TiKV MVCC In-Memory Engine (IME). Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#usage>

  + The TiKV MVCC In-Memory Engine (IME) is disabled by default. After you enable it, you need to restart TiKV. Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#usage>

  + Each TiKV Server can independently enable the TiKV MVCC In-Memory Engine (IME) feature.Please refer to：<https://docs.pingcap.com/tidb/stable/tikv-in-memory-engine/#usage>
