InfluxDB vs. TDengine: Performance Comparison

Chait Diwadkar
Chait Diwadkar
/
Share on LinkedIn

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 TypeTDengineInfluxDBInfluxDB/TDengine
last-loc11.52562.864,885.94%
low-fuel30.726352,067.06%
high-load10.74861.138,017.97%
stationary-trucks23.93,156.6513,207.74%
long-driving-sessions59.44374.98630.85%
long-daily-sessions218.971,439.19657.25%
daily-activity2314.6415,248.66658.79%
avg-daily-driving-duration4402.1543,588.02990.15%
avg-daily-driving-session4034.0984,494.792,094.52%
avg-vs-projected-fuel-consumption3111.1840,842.051,312.75%
breakdown-frequency5416.3288,804.935,332.14%
avg-load1295.97552,493.7842,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 TypeTDengineInfluxDBInfluxDB/TDengine
last-loc1.0314.941,450.49%
low-fuel4.6117.45378.52%
high-load1.0318.331,779.61%
stationary-trucks3.5969.11,924.79%
long-driving-sessions5.413240.74%
long-daily-sessions13.8842.91309.15%
daily-activity146.5510.3348.33%
avg-daily-driving-duration278.6243,588.02338.26%
avg-daily-driving-session166.491,707.271,025.45%
avg-vs-projected-fuel-consumption267.031,033.72387.12%
breakdown-frequency413.826,953.831,680.40%
avg-load102.3115,956.7315,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.

  • Chait Diwadkar

    Chait Diwadkar is Director of Solution Engineering at TDengine. Prior to joining TDengine he was in the biotechnology industry in technical marketing, professional services, and product management roles and supported customers in pharma, medical devices and diagnostics on analytical chemistry, and genetic platforms.