As businesses increasingly rely on time-series databases (TSDBs) to handle massive amounts of real-time data, performance becomes a critical factor in selecting the right solution. TDengine and InfluxDB are two popular TSDBs, each designed to handle high-ingestion rates and complex queries, particularly in IoT and industrial applications. To make an informed decision, let’s compare these platforms based on key performance metrics, including ingestion rate, query latency, and resource utilization, using data from the open source Time Series Benchmark Suite (TSBS).
To ensure an even playing field, we used the TSBS framework and ran the tests on identical systems in AWS. TSBS is designed for objective database evaluations and generates datasets for a range of recommended ingestion and query scenarios. TSBS is used by other database providers, including VictoriaMetrics and Timescale, to perform evaluations similar to the one described here.
TSBS is an open and independent framework, meaning the test procedures and datasets generated aren’t designed to benefit any database platform, and allows anyone to conduct an objective evaluation.
This evaluation applied the TSBS IoT dataset, which includes small- and large-scale scenarios that simulate a connected cars use case, with diagnostics and readings for a fleet of trucks. For detailed information, see the official TSBS repository in GitHub.
Ingestion Performance
Overall, in all five data scenarios, TDengine’s ingestion performance consistently outperformed InfluxDB. The highest performance difference was observed in Scenario 5, where TDengine achieved an ingestion speed 16.2 times faster than InfluxDB, while the smallest difference was in Scenario 3, where TDengine still maintained a lead of 1.82 times. Additionally, TDengine required the least CPU and disk I/O resources during the ingestion process.
Data Ingestion Performance Comparison Across Scenarios
In all five scenarios, TDengine demonstrated significantly higher ingestion speeds than InfluxDB. For instance, in Scenario 5, TDengine’s ingestion performance was 16x that of InfluxDB, and in Scenario 3, where the gap is the smallest, it was still 1.8x higher.
Resource Usage During Ingestion
Ingestion speed alone does not fully capture the databases’ overall performance in handling data ingestion. To provide a more comprehensive comparison, we evaluated resource consumption for each system under Scenario 4 (1,000,000 devices × 10 metrics). We focused on server and client resource utilization, including CPU and disk I/O consumption.
- Server CPU Usage: The following figure shows the server CPU load during the writing process in Scenario 4. During data ingestion, both TDengine and InfluxDB continued to use server resources even after acknowledging data ingestion to the client. InfluxDB consumed significantly more CPU resources, occasionally reaching 100% usage, with a longer sustained period of high load compared to TDengine. TDengine’s peak CPU usage was only around 17%, demonstrating its efficient data model, which optimizes both performance and resource usage.
- Disk I/O: The following chart illustrates the disk write status on the server side during the data ingestion process for 1,000,000 devices × 10 metrics in Scenario 4. Here, the server’s disk I/O activity aligns closely with CPU usage. TDengine demonstrated significantly lower disk I/O requirements, utilizing only 125MiB/Sec and 3000 IOPS. In contrast, InfluxDB consistently maxed out its disk I/O capacity, highlighting TDengine’s more efficient use of storage resources.
Query Performance
For query performance evaluation, we used Scenarios 1 (4 days of data) and Scenario 2 as benchmarks, maintaining six vnodes in TDengine by default, and InfluxDB parameters are configured to the default values.
Across 15 different query types, TDengine’s average response time was consistently faster than InfluxDB, especially in complex queries, with lower resource requirements. In Scenario 1, TDengine’s query speed ranged from 2.4 to 155.9 times faster than InfluxDB, and in Scenario 2, it was 6.3 to 426.3 times faster.
Query Performance in 4,000 Devices × 10 Metrics
To achieve more accurate response times, each query was executed 2,000 times in Scenario 1 and 500 times in Scenario 2, with TSBS computing the arithmetic average for each query. The tests utilized four concurrent client workers. Below, we present the query performance comparison results for Scenario Two (4,000 devices).
Query Type | TDengine | InfluxDB | InfluxDB/TDengine |
---|---|---|---|
last-loc | 11.52 | 562.86 | 4,885.94% |
low-fuel | 30.72 | 635 | 2,067.06% |
high-load | 10.74 | 861.13 | 8,017.97% |
stationary-trucks | 23.9 | 3,156.65 | 13,207.74% |
long-driving-sessions | 59.44 | 374.98 | 630.85% |
long-daily-sessions | 218.97 | 1,439.19 | 657.25% |
daily-activity | 2314.64 | 15,248.66 | 658.79% |
avg-daily-driving-duration | 4402.15 | 43,588.02 | 990.15% |
avg-daily-driving-session | 4034.09 | 84,494.79 | 2,094.52% |
avg-vs-projected-fuel-consumption | 3111.18 | 40,842.05 | 1,312.75% |
breakdown-frequency | 5416.3 | 288,804.93 | 5,332.14% |
avg-load | 1295.97 | 552,493.78 | 42,631.68% |
Next, we will provide an analysis of the results for each query.
- Query Response Times for 4,000 Devices (Lower is Better)
In the grouped selection queries, TDengine utilizes a design where each device (truck) corresponds to a single table and employs the cached last_row function to retrieve the most recent data. This approach significantly outperforms InfluxDB in terms of query response times.
- Query Response Time for Aggregates with 4,000 Devices (Lower is Better)
In complex grouped aggregate queries, TDengine demonstrates a substantial advantage over InfluxDB. Notably, the performance of TDengine in the stationary-trucks query is 132 times better than that of InfluxDB, while in the long-daily-sessions query, TDengine is 6.5 times more efficient.
- Query Response Times for Double Rollups with 4,000 Devices (Lower is Better)
- Query Response Times for 4,000 Devices (Lower is Better)
In complex mixed queries, TDengine also demonstrates significant performance advantages. In terms of query response times, the performance for the avg-load and breakdown-frequency queries is 426 times and 53 times better than that of InfluxDB, respectively.
Resource Consumption During Queries
For queries that completed quickly, we focused on Scenario 2’s “daily-activity” query to observe server CPU, memory, and network consumption across 50 executions.
- Server CPU Usage: TDengine’s CPU utilization was steady at around 70% during the query, while InfluxDB’s CPU usage peaked frequently at 100% and sustained high usage three times longer than TDengine.
100 Devices × 10 Metrics Query Performance Comparison
For Scenario 1 (100 devices x 10 metrics), the comparison of 15 queries from TSBS is as follows:
Query Type | TDengine | InfluxDB | InfluxDB/TDengine |
---|---|---|---|
last-loc | 1.03 | 14.94 | 1,450.49% |
low-fuel | 4.61 | 17.45 | 378.52% |
high-load | 1.03 | 18.33 | 1,779.61% |
stationary-trucks | 3.59 | 69.1 | 1,924.79% |
long-driving-sessions | 5.4 | 13 | 240.74% |
long-daily-sessions | 13.88 | 42.91 | 309.15% |
daily-activity | 146.5 | 510.3 | 348.33% |
avg-daily-driving-duration | 278.62 | 43,588.02 | 338.26% |
avg-daily-driving-session | 166.49 | 1,707.27 | 1,025.45% |
avg-vs-projected-fuel-consumption | 267.03 | 1,033.72 | 387.12% |
breakdown-frequency | 413.82 | 6,953.83 | 1,680.40% |
avg-load | 102.31 | 15,956.73 | 15,596.45% |
As shown in the table above, even with a smaller dataset (Scenario 1), TDengine still demonstrates exceptional performance. It outperforms InfluxDB across all queries, with some queries showing performance improvements of up to 155 times compared to InfluxDB.
Disk Space Usage
After full data persistence, we also compared disk space usage for both databases across scenarios. For smaller datasets, InfluxDB and TDengine used similar amounts of disk space. However, for larger datasets (Scenarios 4 and 5), InfluxDB required over twice as much disk space as TDengine.
Conclusion
The results highlight TDengine’s clear performance advantages in IoT scenarios, especially in high-ingestion and complex-query environments. Here are the main takeaways:
- Ingest Performance: TDengine consistently achieved higher ingest speeds, with up to 16.2 times faster ingestion in certain scenarios, while consuming less CPU and disk I/O.
- Query Efficiency: TDengine delivered significantly faster query response times, especially for complex aggregations, with advantages ranging from 2.4 to 426.3 times depending on the query type.
- Resource Consumption: TDengine demonstrated lower CPU and disk usage on the server side, contributing to lower operational costs and more efficient use of system resources.
- Storage Efficiency: TDengine’s optimized storage engine required less than half the disk space of InfluxDB for larger datasets, resulting in substantial storage savings.
With its purpose-built design for high-performance time-series data management, TDengine offers substantial advantages over InfluxDB in IoT and industrial settings. For applications that demand high-speed data ingestion, fast query performance, and low resource consumption, TDengine proves to be a reliable and efficient choice.
Performance is the main reason that customers deploy purpose-built time-series databases, and according to benchmark testing based on the open-source TSBS framework, TDengine OSS significantly outperforms InfluxDB in all key areas — data ingestion rate, query response time, and disk space usage — while using fewer server resources. TDengine proves to be a reliable and efficient choice.
As industries increasingly rely on real-time analytics and IoT applications, selecting a high-performance database like TDengine can enhance data processing capabilities and overall operational efficiency.
Note that InfluxData claims to have significantly improved performance with InfluxDB 3.0, but the open-source edition has not yet been released.