TDengine Capacity Planning Guide

Juno Qiu

June 22, 2026 /

For TDengine TSDB deployments, capacity planning directly affects performance, reliability, and total cost. The main planning dimensions are memory, CPU, storage, network bandwidth, server count, and port configuration.

Memory planning

Memory requirements in TDengine primarily come from vnode configuration. Each database has a fixed number of vgroups (Virtual Groups). The memory formula for a single database is:

vgroups x replica x (buffer + pages x pagesize + cachesize)

The default configuration allocates 2 vgroups per database. BUFFER, the write buffer, is typically set between 64MB and 256MB. CACHESIZE defaults to 64MB.

Client memory consumption depends on the connection type. For native connections, the estimate is:

M = (T x S x 3 + (N / 4096) + 100) MB

In this formula, T is the number of tables, S is the schema size, and N is the record count. WebSocket connections add approximately 8MB per connection.

For more predictable client memory, use RESTful or WebSocket connections. These also decouple cluster upgrades from client applications.

CPU configuration

CPU usage is driven by three main factors:

  • Data writing: Each CPU core can handle 10,000 or more write requests per second under typical workloads.
  • Data sharding: A good ratio is 1 to 2 vnodes per CPU core, balancing parallelism with context-switching overhead.
  • Query requirements: Complex aggregation queries across supertables consume additional CPU cycles and should be accounted for separately.

The recommended formula for estimating CPU cores is:

cluster vgroups x replicas x 1.5 = recommended CPU cores

As an example, a cluster with 100 vgroups and 3 replicas would need between 150 and 300 CPU cores.

Keep average CPU usage at or below 50%. When usage crosses this threshold, add nodes through horizontal scaling rather than upgrading individual machines.

Storage capacity calculation

TDengine applies columnar compression to reduce storage footprint. Compression ratios start at 5x and can reach 100x or more, depending on data characteristics such as value repetition, timestamp regularity, and data type distribution.

The raw, uncompressed data volume is calculated as:

raw data = numOfTables x rowSizePerTable x rowsPerTable

Case study: A deployment with 10 million smart meters, each reporting one record every 15 minutes at 20 bytes per record. Annual raw data volume is approximately 7TB. With TDengine compression, actual storage consumption is approximately 1.4TB, a 5x reduction at the conservative end of the compression range.

Storage optimization recommendations:

  • Distribute data across multiple physical disks to increase I/O throughput and avoid single-disk bottlenecks.
  • Configure the KEEP parameter to set data retention policies. Data past the retention window is automatically deleted, preventing unbounded storage growth.
  • Use multi-tier storage to separate hot data (recent, frequently accessed) from cold data (historical, rarely accessed). This reduces overall storage cost by placing cold data on lower-cost storage tiers.

Network bandwidth planning

Network bandwidth covers two categories of traffic:

  • Business-facing traffic: Write requests from clients and query responses returned to clients.
  • Internal cluster traffic: Leader data distribution, node synchronization, and replica consistency operations between cluster nodes.

For a deployment of 10 million meters reporting every 15 minutes, average bandwidth is approximately 0.22MB/s. This is a baseline: actual bandwidth depends on per-record payload size, query volume, and replication factor.

Production deployment network requirements:

  • 10-gigabit links between server nodes.
  • Minimum gigabit connectivity for all nodes, including client-facing interfaces.
  • Packet loss below 0.01%.
  • Dedicated VLAN for cluster traffic isolation from other network services.

Server count estimation

The number of servers required is calculated by dividing total resource requirements across all four dimensions (CPU, memory, storage, bandwidth) by the resources available per machine. TDengine supports elastic scaling, allowing deployments to start small and add nodes as data volume and query load grow.

Network port configuration

TDengine uses the following ports by default. All connections use TCP:

ComponentPortPurpose
taosc6030Native client connections
RESTful API6041HTTP-based queries and writes
WebSocket6041WebSocket client connections
taosKeeper6043Monitoring metrics export
taosX6050, 6055Zero-code data ingestion
taosExplorer6060Web-based management interface

Ensure these ports are open in firewall configurations and do not conflict with other services running on the same hosts.

Summary

Recommendations for TDengine capacity planning:

  1. Reserve a 50% resource margin for data growth and workload spikes.
  2. Use horizontal scaling by adding nodes rather than upgrading individual servers.
  3. Use multi-tier storage to separate hot and cold data, reducing storage costs.
  4. Deploy monitoring to maintain real-time visibility into system status.