## Overview

<!-- markdownlint-disable MD032 -->
> [!NOTE]
> This lab only supports Chrome browser.

The TiDB Cluster Sizing Tool is designed for both TiDB Cloud Dedicated and TiDB Self-Managed environments. Before using it, we recommend saving it as a separate file, as it is read-only on Lark. It is available for PingCAP professionals and partners.

Note the highlighted portion in the screenshot about TiDB and TiKV nodes configuration, the practice will use the same configuration for the lab TiDB cluster.

  ![80%](https://lab-static.pingcap.com/quick-demo/demo-301-1-en.png)

+ Storage Layer
  + [Need input] Replica Count: Default is 3 replicas.
  + [Need input] Storage per TiKV: Each TiKV node has a maximum storage capacity limit, 4TB.
  + [Need input] Compression Ratio: Data is usually compressed in TiDB. An estimated value is 40%.
  + [Need input] Storage Capacity Threshold (Storage Water Level): For healthy system operation and to avoid storage overload, administrators usually define an storage usage alert threshold like 80%.

+ SQL Layer
  + [Need input] Total QPS: The total desired QPS of the TiDB cluster.
  + [Defined by test result] QPS per Node: The QPS a single node can handle under certain latency requirements.
  + [Defined by test result] Performance Attenuation Coefficient: As the number of nodes increases, individual node performance may degrade due to network latency, resource contention, etc.

### Source Data Volume Vs. TiKV Server Count

   The minimum number of TiKV servers = `CEIL(Existing Data Size x Compression Ratio / Capacity Threshold / TiKV Node Storage Space) x Replica Number`

### Performance Requirements Vs. TiKV and TiDB Server Count

   The minimum number of TiDB/TiKV servers = `CEIL(Total QPS / QPS per Node x (1 - Performance Attenuation Coefficient))`

### Tasks

+ Estimate TiDB storage layer size based on the existing MySQL database volume.
+ Migrate MySQL database to TiDB cluster and verify the TiDB storage layer estimation.
+ Estimate TiDB and TiKV size based on the existing workload.
+ Observe the performance improvement after a scaling out operation.

> [!TIP]
> Click Start to launch the lab environment.
> Once the environment is ready, select **Next** on the bottom toolbar to advance to **Module 1**.
> And, follow the step-by-step lab guide to connect to the hands-on environment and begin your tasks.
