项目 / taosdata/TDengine

taosdata/TDengine

行业推荐
语言 C标签 iotbigdatatime-seriesdatabaseindustrial-iotconnected-vehiclesmonitoringtsdbtdenginesqltime-series-databasescalabilityclustermetricsfinancial-analysiscloud-nativedistributed数据更新 2026-11-25 06:49:28 · 仓库 2026-11-24

一段话介绍

High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios
25,205累计星
5,010Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

设备物联接入与边缘采集

适配系统:物联网平台、边缘计算网关 · 得分 1.4

实现工业协议解析与设备接入管理,可作为物联网平台的设备接入层与数据采集前置。

数据仓库建模与指标治理

适配系统:数据仓库、指标管理平台 · 得分 1.3

提供分层建模与指标定义能力,可支撑口径统一、血缘追踪与自助分析。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
从源码构建 TDengine 时首次编译必须加 -DBUILD_CONTRIB=ON,以下载并构建 xxhash、zstd、lz4 等外部依赖,后续编译可省略该参数复用缓存。
特点或设计要点
TDengine 是面向物联网、车联网和工业物联网的开源云原生时序数据库,号称是唯一解决高基数问题、可支持数十亿采集点并在写入与查询性能上领先的时序数据库,并通过内置缓存、流处理、数据订阅和 AI agent 简化系统设计。
局限和适用边界
TDengine 主要在 Linux 上构建和测试,macOS 用于本地开发,开源版本对 Windows 的支持有限,复现构建应首选 Linux。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-11-15 · 语言 C · 贡献者 —
c

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 17,683 字节。

<p align="center">
  <a href="https://tdengine.com" target="_blank">
  <img
    src="tdengine-logo.svg"
    alt="TDengine"
    width="500"
  />
  </a>
</p>

<div align="center">
  <a href="https://github.com/taosdata/TDengine/actions/workflows/tdengine-release-build.yml"><img src="https://github.com/taosdata/TDengine/actions/workflows/tdengine-release-build.yml/badge.svg" alt="TDengine Release Build" /></a>
  <a href="https://coveralls.io/github/taosdata/TDengine?branch=3.0"><img src="https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=3.0" alt="Coverage Status" /></a>
  <a href="https://github.com/taosdata/TDengine/commits/main/"><img src="https://img.shields.io/github/commit-activity/m/taosdata/tdengine" alt="GitHub commit activity" /></a>
  <br />
  <a href="https://github.com/taosdata/TDengine/releases"><img src="https://img.shields.io/github/v/release/taosdata/tdengine" alt="GitHub Release" /></a>
  <a href="https://github.com/taosdata/TDengine/blob/main/LICENSE"><img src="https://img.shields.io/github/license/taosdata/tdengine" alt="GitHub License" /></a>
  <a href="https://bestpractices.coreinfrastructure.org/projects/4201"><img src="https://bestpractices.coreinfrastructure.org/projects/4201/badge" alt="CII Best Practices" /></a>
  <br />
  <a href="https://twitter.com/tdenginedb"><img src="https://img.shields.io/twitter/follow/tdenginedb?label=TDengine&style=social" alt="Twitter Follow" /></a>
  <a href="https://www.youtube.com/@tdengine"><img src="https://img.shields.io/badge/Subscribe_@tdengine--white?logo=youtube&style=social" alt="YouTube Channel" /></a>
  <a href="https://discord.com/invite/VZdSuUg4pS"><img src="https://img.shields.io/badge/Join_Discord--white?logo=discord&style=social" alt="Discord Community" /></a>
  <a href="https://www.linkedin.com/company/tdengine"><img src="https://img.shields.io/badge/Follow_LinkedIn--white?logo=linkedin&style=social" alt="LinkedIn" /></a>
  <a href="https://stackoverflow.com/questions/tagged/tdengine"><img src="https://img.shields.io/badge/Ask_StackOverflow--white?logo=stackoverflow&style=social&logoColor=orange" alt="StackOverflow" /></a>
  <a href="https://deepwiki.com/taosdata/TDengine"><img src="https://img.shields.io/badge/Ask%20DeepWiki-white.svg" alt="DeepWiki" /></a>
  <br />
  <a href="./README.md">English</a> |
  <a href="./README-CN.md">简体中文</a> |
  <a href="./README-JP.md">日本語</a> |
  <a href="https://cloud.tdengine.com">TDengine Cloud</a> |
  <a href="https://docs.tdengine.com">Documentation</a> |
  <a href="https://tdengine.com/time-series-database/">Learn more about TSDB</a>
</div>

# TDengine

## 1. Introduction

TDengine is an open source, high-performance, cloud native and AI powered [time-series database](https://tdengine.com/tsdb/) designed for Internet of Things (IoT), Connected Cars, and Industrial IoT. It enables efficient, real-time data ingestion, processing, and analysis of TB and even PB scale data per day, generated by billions of sensors and data collectors. TDengine differentiates itself from other time-series databases with the following advantages:

- **[High Performance](https://tdengine.com/tdengine/high-performance-time-series-database/)**: TDengine is the only time-series database to solve the high cardinality issue to support billions of data collection points while out performing other time-series databases for data ingestion, querying and data compression.

- **[Simplified Solution](https://tdengine.com/tdengine/simplified-time-series-data-solution/)**: Through built-in caching, stream processing, data subscription and AI agent features, TDengine provides a simplified solution for time-series data processing. It reduces system design complexity and operation costs significantly.

- **[Cloud Native](https://tdengine.com/tdengine/cloud-native-time-series-database/)**: Through native distributed design, sharding and partitioning, separation of compute and storage, RAFT, support for kubernetes deployment and full observability, TDengine is a cloud native Time-Series Database and can be deployed on public, private or hybrid clouds.

- **[AI Powered](https://tdengine.com/tdengine/tdgpt/)**: Through the built in AI agent TDgpt, TDengine can connect to a variety of time series foundation model, large language model, machine learning and traditional algorithms to provide time series data forecasting, anomaly detection, imputation and classification.

- **[Ease of Use](https://tdengine.com/tdengine/easy-time-series-data-platform/)**: For administrators, TDengine significantly reduces the effort to deploy and maintain. For developers, it provides a simple interface, simplified solution and seamless integrations for third party tools. For data users, it gives easy data access.

- **[Easy Data Analytics](https://tdengine.com/tdengine/time-series-data-analytics-made-easy/)**: Through super tables, storage and compute separation, data partitioning by time interval, pre-computation and AI agent, TDengine makes it easy to explore, format, and get access to data in a highly efficient way.

- **[Open Source](https://tdengine.com/tdengine/open-source-time-series-database/)**: TDengine's core modules, including cluster feature and AI agent, are all available under open source licenses. It has gathered 23.7k stars on GitHub. There is an active developer community, and over 730k running instances worldwide.

For a full list of TDengine competitive advantages, please [check here](https://tdengine.com/tdengine/). The easiest way to experience TDengine is through [TDengine Cloud](https://cloud.tdengine.com). For the latest TDengine component TDgpt, please refer to [TDgpt README](./tools/tdgpt/README.md) for details.

## 2. Documentation

For user manual, system design and architecture, please refer to [TDengine Documentation](https://docs.tdengine.com) ([TDengine 文档](https://docs.taosdata.com))

You can choose to install TDengine via [container](https://docs.tdengine.com/get-started/deploy-in-docker/), [installation package](https://docs.tdengine.com/get-started/deploy-from-package/), [Kubernetes](https://docs.tdengine.com/operations-and-maintenance/deploy-your-cluster/#kubernetes-deployment) or try [fully managed service](https://cloud.tdengine.com/) without installation. This quick guide is for developers who want to contribute, build, release and test TDengine by themselves.

## Table of Contents

- [1. Introduction](#1-introduction)
- [2. Documentation](#2-documentation)
- [3. Prerequisites](#3-prerequisites)
  - [3.1 System Requirements](#31-system-requirements)
  - [3.2 Installing Build Tools](#32-installing-build-tools)
  - [3.3 Optional Tools](#33-optional-tools)
- [4. Building](#4-building)
  - [4.1 Quick Start](#41-quick-start)
  - [4.2 Build Options](#42-build-options)
  - [4.3 Build Output](#43-build-output)
- [5. Testing](#5-testing)
  - [5.1 Unit Tests](#51-unit-tests)
  - [5.2 Integration Tests](#52-integration-tests)
- [6. Packaging](#6-packaging)
  - [6.1 Package the Community Tarballs](#61-package-the-community-tarballs)
- [7. Installing from Package](#7-installing-from-package)
- [8. Running](#8-running)
- [9. Workflow](#9-workflow)
- [10. Coverage](#10-coverage)
- [11. Contributing](#11-contributing)
- [12. License](#12-license)

## 3. Prerequisites

### 3.1 System Requirements

- **Operating systems:** Linux (Ubuntu 18.04+, CentOS 7+), macOS 10.15+, Windows (limited; open-source builds are primarily Linux/macOS)
- **CPU:** x86_64 or ARM64
- **Memory:** 4 GB RAM or more recommended
- **Disk:** 2 GB free space or more recommended
- **Primary build platform:** Linux

TDengine is built and tested primarily on Linux. macOS builds are supported for local development. Windows support in the open-source tree is limited, so Linux should be your default choice for reproducible builds.

### 3.2 Installing Build Tools

**Ubuntu/Debian:**

```bash
sudo apt-get update
sudo apt-get install -y build-essential cmake git
```

**CentOS/RHEL:**

```bash
sudo yum groupinstall -y "Development Tools"
sudo yum install -y cmake3 git
```

Note: CMake >= 3.21 is required for external builds. If your distro provides an older version, install a newer release from [https://cmake.org/download/](https://cmake.org/download/).

You may also need these tools depending on what you build:

- **Python 3** for the test framework in `tests/`
- **Go 1.23+** if you want to build components such as taosAdapter or taosKeeper

### 3.3 Optional Tools

- **ccache** — speeds up rebuilds: `sudo apt install ccache`
- **Conan 2.x** — required only for the `taos-gen` component: `pip3 install conan`

## 4. Building

### 4.1 Quick Start

```bash
git clone https://github.com/taosdata/TDengine.git
cd TDengine
mkdir debug && cd debug
cmake .. -DBUILD_CONTRIB=ON    # First build: -DBUILD_CONTRIB=ON is REQUIRED
make -j$(nproc)
```

> **Important**
> The first source build must use `-DBUILD_CONTRIB=ON`. This downloads and builds external dependencies such as xxhash, zstd, and lz4 into `.externals/`. Subsequent builds can usually omit this flag and reuse the cached artifacts automatically.

Useful variants:

```bash
# Release build with CLI tools
cmake .. -DBUILD_CONTRIB=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=ON
make -j$(nproc)

# macOS equivalent parallel build
cmake .. -DBUILD_CONTRIB=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel "$(sysctl -n hw.ncpu)"
```

### 4.2 Build Options

Defaults below are the standalone open-source defaults from `cmake/options.cmake` unless noted otherwise.

| Option | Default | Description |
|---|---:|---|
| `BUILD_CONTRIB` | `OFF` on Linux, `ON` elsewhere | Build third-party dependencies from source. **Required for the first build.** |
| `CMAKE_BUILD_TYPE` | `Debug` | Standard CMake build type (`Debug`, `Release`, `RelWithDebInfo`). |
| `BUILD_TEST` | `OFF` | Build unit tests with googletest. |
| `BUILD_TOOLS` | `OFF` | Build tools such as `taosBenchmark` and `taosdump`. |
| `BUILD_SANITIZER` | `OFF` | Enable sanitizers. |
| `BUILD_COVERAGE` | `OFF` | Enable coverage instrumentation. |
| `BUILD_JEMALLOC` | `OFF` | Enable jemalloc allocator support. |
| `BUILD_WEBSOCKET` | `OFF` | Enable WebSocket support. |
| `BUILD_ASSERT_NOT_CORE` | `OFF` | Avoid generating core files on assert. |
| `BUILD_PTHREAD_TWEAK` | `OFF` | Apply pthread tweaks for older Linux environments. |
| `BUILD_ASTRA` | `OFF` | Build for Astra platform. |
| `BUILD_ASTRA_RPC` | `OFF` | Build with Astra RPC transport. |
| `BUILD_WITH_LEMON` | `ON` | Build with lemon parser support. |
| `BUILD_WITH_UDF` | `ON` | Build with UDF support. |
| `BUILD_GEOS` | `ON` | Build with GEOS support (non-Astra). |
| `BUILD_SHARED_LIBS` | `OFF` | Build shared libraries. |
| `RUST_BINDINGS` | `ON` | Build Rust bindings. |
| `BUILD_PCRE2` | `ON` | Build with PCRE2 support. |
| `BUILD_ADDR2LINE` | `OFF` | Build addr2line helper support. |
| `BUILD_WITH_LEVELDB` | `OFF` | Enable LevelDB support. |
| `BUILD_ROCKSDB` | `OFF` on Linux, `ON` elsewhere | Build RocksDB from source. |
| `ROCKSDB_USE_DEPS` | `ON` on Linux, `OFF` elsewhere | Use prebuilt RocksDB from `deps/` instead of building it. |
| `TD_USE_ROCKSDB` | `ON` | Enable RocksDB support. |
| `BUILD_WITH_LZ4` | `ON` | Build with LZ4 support. |
| `BUILD_S3` | `ON` on Linux, then forced `OFF` for community builds | Enable S3-related build path. Community builds switch this off. |
| `BUILD_WITH_S3` | `ON` on Linux, then forced `OFF` for community builds | Build with S3 support when available. |
| `BUILD_WITH_COS` | `OFF` | Build with COS support. |
| `BUILD_WITH_LZMA2` | `ON` | Build with LZMA2 support. |
| `BUILD_WITH_ANALYSIS` | `ON` on Linux | Enable analysis-related build path. |
| `BUILD_WITH_SQLITE` | `OFF` | Build with SQLite support. |
| `BUILD_WITH_BDB` | `OFF` | Build with Berkeley DB support. |
| `BUILD_WITH_LUCENE` | `OFF` | Build with Lucene support. |
| `BUILD_WITH_NURAFT` | `OFF` | Build with NuRaft support. |
| `BUILD_WITH_UV` | `ON` | Build with libuv support. |
| `BUILD_WITH_UV_TRANS` | `ON` | Build with libuv transport support. |
| `BUILD_DEPENDENCY_TESTS` | `ON` on Linux | Build dependency tests. |
| `BUILD_DOCS` | `OFF` | Build Doxygen documentation. |
| `BUILD_WITH_INVERTEDINDEX` | `ON` | Enable inverted index support. |
| `BUILD_TAOSD_INTEGRATED` | `OFF` | Build `taosd` as an integrated library. |
| `BUILD_AS_LIB` | `OFF` | Build TDengine as a library. |
| `BUILD_RELEASE` | `OFF` | Enable release-version build path. |
| `BUILD_LIBSASL` | `OFF` | Build with libsasl2. |
| `BUILD_FLEX_DEPLOY` | `OFF` | Enable flexible deployment mode. |
| `BUILD_WITH_RAND_ERR` | `OFF` | Enable random error injection. |
| `BUILD_TSZ_ENABLED` | `ON` | Enable TSZ compression support. |
| `BUILD_USE_PUBLIC_DEPS` | `OFF` | Use public internet URLs for external dependencies instead of alternate mirrors. |

Example:

```bash
cmake .. -DBUILD_CONTRIB=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=ON
```

### 4.3 Build Output

The default build tree under `debug/` looks like this:

- Binaries in `debug/build/bin/`
  - `taosd` — TDengine server daemon
  - `taos` — TDengine CLI client
  - `taosBenchmark` — benchmark tool (`BUILD_TOOLS=ON`)
  - `taosdump` — import/export tool (`BUILD_TOOLS=ON`)
- Libraries in `debug/build/lib/`
  - `libtaos.so` on Linux (or the platform-equivalent client library)

## 5. Testing

### 5.1 Unit Tests

```bash
cd debug
cmake .. -DBUILD_CONTRIB=ON -DBUILD_TEST=ON
make -j$(nproc)
ctest --output-on-failure
```

Some individual test binaries are also emitted into `debug/build/bin/`.

### 5.2 Integration Tests

TDengine includes a Python-based test framework in `tests/`.

```bash
# Build the server and tools first
cd debug
cmake .. -DBUILD_CONTRIB=ON -DBUILD_TOOLS=ON -DBUILD_TEST=ON
make -j$(nproc)

# Start taosd with the generated test configuration
./build/bin/taosd -c test/cfg &

# Run a system test
cd ../tests/system-test
python3 test.py -f 2-query/basic.py
```

For more test details, see [`tests/README.md`](tests/README.md).

## 6. Packaging

Use `source/taos-community/packaging/pack_community_tar.sh` after a successful Linux build to assemble the open-source community tarballs.

This script packages only artifacts that are built from the `taos-community` repository itself:

- `taosd`
- `taos`
- `taosBenchmark` (`BUILD_TOOLS=ON`, when present)
- `taosdump` (`BUILD_TOOLS=ON`, when present)
- `taosudf` (when present)
- `libtaos.so`
- `libtaosnative.so`
- headers, `examples/c`, and the install scripts

It does **not** package components that live in other repositories or require separate build flows, such as `taoskeeper`, `taos-explorer`, `taosx`, connectors, or `taosinspect`.

### 6.1 Package the Community Tarballs

Build first:

```bash
mkdir debug && cd debug
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_CONTRIB=ON -DBUILD_TOOLS=ON
make -j$(nproc)
```

Then run the packaging script from the repository root:

```bash
cd ..
./source/taos-community/packaging/pack_community_tar.sh -c debug -n 3.3.6.0
```

Optional arguments:

- `-m <compatible_version>` — defaults to `3.0.0.0`
- `-V <stable|beta|preRelease>` — defaults to `stable`

Example:

```bash
./source/taos-community/packaging/pack_community_tar.sh \
  -c debug \
  -n 3.3.6.0 \
  -m 3.0.0.0 \
  -V stable
```

Generated packages are written to:

```bash
source/taos-community/release/
```

Typical outputs:

```bash
source/taos-community/release/TDengine-server-3.3.6.0-Linux-x64.tar.gz
source/taos-community/release/TDengine-client-3.3.6.0-Linux-x64.tar.gz
```

The server and client archives use the same two-layer layout as the existing packaging flow:

- outer tarball for distribution
- inner `package.tar.gz` containing `bin/`, `cfg/`, and `inc/`

This is the standard packaging approach for repository-local OSS artifacts and should be followed consistently in future repositories as well.

## 7. Installing from Package

For an official installer package produced by `packaging/tools/makepkg.sh`:

```bash
tar -xzf TDengine-server-<version>-Linux-x86_64.tar.gz
cd TDengine-server-<version>
sudo ./install.sh
```

If you are installing directly from a local source build instead of a packaged archive, you can also run:

```bash
cd debug
sudo make install
```

## 8. Running

```bash
# Start the server after installation
sudo systemctl start taosd

# Connect with the CLI
taos
```

For a quick local run from the build tree, use:

```bash
cd debug
./build/bin/taosd -c test/cfg
```

Then, in another shell:

```bash
cd debug
./build/bin/taos -c test/cfg
```

## 9. Workflow

TDengine build check workflow can be found in this [GitHub Action](https://github.com/taosdata/TDengine/actions/workflows/taosd-ci-build.yml). More workflows will be available soon.

## 10. Coverage

Latest TDengine test coverage report can be found on [coveralls.io](https://coveralls.io/github/taosdata/TDengine).

<details>

<summary>How to run the coverage report locally?</summary>
To create the test coverage report (in HTML format) locally, please run following commands:

```bash
cd tests
bash setup-lcov.sh -v 1.16 && ./run_local_coverage.sh -b main -c task
# on main branch and run cases in longtimeruning_cases.task
# for more information about options please refer to ./run_local_coverage.sh -h
```

> **NOTE:**
> Please note that the -b and -i options will recompile TDengine with the -DCOVER=true option, which may take an amount of time.

</details>

## 11. Contributing

Please follow the [contribution guidelines](CONTRIBUTING.md) to contribute to TDengine.

## 12. License

TDengine is licensed under the [GNU Affero General Public License 3.0](https://github.com/taosdata/TDengine/blob/main/LICENSE).
↑