Database Resources
Database Resources
1. CPU and Memory
The following are minimum resource recommendations for sampling frequencies of up to 1 Hz. The table uses a CPU-to-memory ratio of 1:4; actual resource requirements also depend on query load, data types, and write frequency.
| Number of active timeseries | CPU | Memory | Number of nodes | ||
|---|---|---|---|---|---|
| Standalone | Dual-Active | Distributed | |||
| Within 100,000 | 1-2 cores | 2-8 GB | 1 | 2 | 3 |
| Within 300,000 | 2-4 cores | 8-16 GB | 1 | 2 | 3 |
| Within 500,000 | 4-8 cores | 16-32 GB | 1 | 2 | 3 |
| Within 1,000,000 | 8-16 cores | 32-64 GB | 1 | 2 | 3 |
| Within 2,000,000 | 16-32 cores | 64-128 GB | 1 | 2 | 3 |
| Within 10,000,000 | 48 cores | 192 GB | 1 | 2 | Please contact Timecho Business for consultation |
| Over 10,000,000 | Please contact Timecho Business for consultation | ||||
Notes:
- Supported CPU models: Kunpeng, Phytium, Sunway, Hygon, Zhaoxin, Loongson
- Memory settings can be adjusted flexibly in the datanode-env file. For details and configuration guidelines, see datanode-env.
- To configure AI model inference, refer to the TimechoAI User Manual.
2. Storage (Disk)
2.1 Storage space
Calculation formula: Number of measurement points * Sampling frequency (Hz) * Size of each data point (Byte, different data types may vary, see table below) * Storage time (seconds) * Number of copies (usually 1 copy for a single node and 2 copies for a cluster) ÷ Compression ratio (can be estimated at 5-10 times, but may be higher in actual situations)
| Data point size calculation | |||
|---|---|---|---|
| data type | Timestamp (Bytes) | Value (Bytes) | Total size of data points (in bytes) |
| Boolean | 8 | 1 | 9 |
| INT32/FLOAT | 8 | 4 | 12 |
| INT64/DOUBLE | 8 | 8 | 16 |
| TEXT | 8 | The average is a | 8+a |
Example: 1000 devices, each with 100 measurement points, a total of 100000 sequences, INT32 type. Sampling frequency 1Hz (once per second), storage for 1 year, 3 copies.
- Complete calculation formula: 1000 devices * 100 measurement points * 12 bytes per data point * 86400 seconds per day * 365 days per year * 3 copies / 10 compression ratio / 1024 / 1024 / 1024 / 1024 =11T
- Simplified calculation formula: 1000 * 100 * 12 * 86400 * 365 * 3 / 10 / 1024 / 1024 / 1024 / 1024 =11T
2.2 Storage Configuration
If the number of nodes is over 10000000 or the query load is high, it is recommended to configure SSD
3. Network (Network card)
If the write throughput does not exceed 10 million points/second, configure 1Gbps network card. When the write throughput exceeds 10 million points per second, a 10Gbps network card needs to be configured.
| Write throughput (data points per second) | NIC rate |
|---|---|
| <10 million | 1Gbps |
| >=10 million | 10Gbps |
4. Other instructions
IoTDB has the ability to scale up clusters in seconds, and expanding node data does not require migration. Therefore, you do not need to worry about the limited cluster capacity estimated based on existing data. In the future, you can add new nodes to the cluster when you need to scale up.