Fork me on GitHub

TDengine时间序列数据库压力测试

目录

  • 背景

  • 第一部分 部署压测工具vegeta

  • 第二部分 部署TDengine数据库

  • 第三部分 TDengine数据库RESTful接口介绍

  • 第四部分 压力测试

  • 第五部分 压力测试结果

  • 参考文献及资料

背景

最近涛思数据团队开源了自己的时序数据库,关注度较高。按照官方介绍,性能较为强悍,所以使用压测工具对该数据库进行了性能压测。压测使用的工具Vegeta 是一个用 Go 语言编写的多功能的 HTTP 负载测试工具。Vegeta 提供了命令行工具和一个开发库。

第一部分 部署压测工具vegeta

1.1 部署

从github上下载vegeta安装介质:

1
$ wget https://github.com/tsenart/vegeta/releases/download/cli%2Fv12.5.1/vegeta-12.5.1-linux-amd64.tar.gz

该工具开箱即用,解压tar包:

1
$ tar -zxvf vegeta-12.5.1-linux-amd64.tar.gz

1.2 简单测试使用

我们使用vegeta测试一下下面的压力场景(对百度主页发起每秒100次(-rate=100)的请求,持续10秒(-duration=10s)),测试结果重定向到文件(result/results.bin):

1
$ echo "GET https://www.baidu.com" |./vegeta attack -duration=10s -rate=100 >result/results.bin

查看一下测试结果:

1
2
3
4
5
6
7
8
9
root@deeplearning:/data/vegeta# ./vegeta report result/results.bin
Requests [total, rate] 1000, 100.10
Duration [total, attack, wait] 10.002241136s, 9.990128173s, 12.112963ms
Latencies [mean, 50, 95, 99, max] 2.315958984s, 1.889487082s, 6.064678156s, 6.583899297s, 6.961230585s
Bytes In [total, mean] 227000, 227.00
Bytes Out [total, mean] 0, 0.00
Success [ratio] 100.00%
Status Codes [code:count] 200:1000
Error Set:

另外可以生成html文件报告(可视化):

1
root@deeplearning:/data/vegeta# ./vegeta plot result/results.bin > result/plot.html

第二部分 部署TDengine数据库

2.1 制作docker镜像

由于墙的原因我们在VPS上打包镜像,然后本机拉取部署。

为了保证测试环境的隔离性,我们制作docker镜像,使用docker环境进行测试。首先拉取ubuntu的基础镜像:

1
$ docker run -t -i ubuntu:16.04 /bin/bash

通过TDengine源码安装。在这过程有大量操作系统工具未安装,需要使用atp-get安装部署。

2.1.1 第一步 clone项目

1
$ git clone https://github.com/taosdata/TDengine.git

2.1.2 第二步 编译

1
2
$ mkdir build && cd build
$ cmake .. && cmake --build .

2.1.3 第三步 安装

1
$ make install

2.2 生成镜像

打包成镜像,推送到Docker Hub:

1
2
3
root@vultr:~# docker commit a35c43242a8e rongxiang1986/tdengine
root@vultr:~# docker tag rongxiang1986/tdengine rongxiang1986/tdengine:1.0
root@vultr:~# docker push rongxiang1986/tdengine:1.0

2.3 拉取镜像部署

拉取镜像:

1
root@deeplearning:/data/TDengine/TDengine# docker pull rongxiang1986/tdengine:1.0

启动一个docker容器:

1
root@deeplearning:/data/TDengine/TDengine# docker run -t -i --name tdengine -d -p 6020:6020 rongxiang1986/tdengine:1.0 /bin/bash

查看正在运行的容器:

1
2
root@deeplearning:/data/TDengine/TDengine# docker ps
# bec2e166c29f

进入容器:

1
root@deeplearning:/data/TDengine/TDengine# docker attach bec2e166c29f

最后启动数据库服务,下面是启动回显信息:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
root@bec2e166c29f:~/TDengine/TDengine/build# ./build/bin/taosd -c test/cfg &
[1] 23
root@bec2e166c29f:~/TDengine/TDengine/build# TDengine:[23]: Starting TDengine service...
07/17 14:48:21.615248 7ff90254e700 UTL timezone not configured, set to system default:Etc/UTC (Etc, +0000)
07/17 14:48:21.615261 7ff90254e700 UTL locale not configured, set to system default:C
07/17 14:48:21.616266 7ff90254e700 UTL taos config & system info:
07/17 14:48:21.616274 7ff90254e700 UTL ==================================
07/17 14:48:21.616278 7ff90254e700 UTL internalIp: 172.17.0.3
07/17 14:48:21.616283 7ff90254e700 UTL localIp: 172.17.0.3
07/17 14:48:21.616288 7ff90254e700 UTL httpIp: 0.0.0.0
07/17 14:48:21.616294 7ff90254e700 UTL httpPort: 6020
07/17 14:48:21.616299 7ff90254e700 UTL mgmtShellPort: 6030
07/17 14:48:21.616304 7ff90254e700 UTL vnodeShellPort: 6035
07/17 14:48:21.616308 7ff90254e700 UTL configDir: test/cfg
07/17 14:48:21.616312 7ff90254e700 UTL dataDir: /root/TDengine/TDengine/build/test/data
07/17 14:48:21.616318 7ff90254e700 UTL logDir: /root/TDengine/TDengine/build/test/log
07/17 14:48:21.616325 7ff90254e700 UTL scriptDir: /etc/taos
07/17 14:48:21.616330 7ff90254e700 UTL numOfThreadsPerCore: 1.000000
07/17 14:48:21.616338 7ff90254e700 UTL ratioOfQueryThreads: 0.500000
07/17 14:48:21.616344 7ff90254e700 UTL numOfVnodesPerCore: 8
07/17 14:48:21.616349 7ff90254e700 UTL numOfTotalVnodes: 0
07/17 14:48:21.616355 7ff90254e700 UTL tables: 1000
07/17 14:48:21.616360 7ff90254e700 UTL cache: 16384(byte)
07/17 14:48:21.616366 7ff90254e700 UTL rows: 4096
07/17 14:48:21.616371 7ff90254e700 UTL fileBlockMinPercent: 0.250000
07/17 14:48:21.616376 7ff90254e700 UTL ablocks: 4
07/17 14:48:21.616382 7ff90254e700 UTL tblocks: 100
07/17 14:48:21.616386 7ff90254e700 UTL monitorInterval: 30(s)
07/17 14:48:21.616391 7ff90254e700 UTL rpcTimer: 300(ms)
07/17 14:48:21.616396 7ff90254e700 UTL rpcMaxTime: 600(s)
07/17 14:48:21.616402 7ff90254e700 UTL ctime: 3600(s)
07/17 14:48:21.616407 7ff90254e700 UTL statusInterval: 1(s)
07/17 14:48:21.616414 7ff90254e700 UTL shellActivityTimer: 3(s)
07/17 14:48:21.616420 7ff90254e700 UTL meterMetaKeepTimer: 7200(s)
07/17 14:48:21.616423 7ff90254e700 UTL metricMetaKeepTimer: 600(s)
07/17 14:48:21.616428 7ff90254e700 UTL maxUsers: 1000
07/17 14:48:21.616432 7ff90254e700 UTL maxDbs: 1000
07/17 14:48:21.616439 7ff90254e700 UTL maxTables: 650000
07/17 14:48:21.616442 7ff90254e700 UTL maxVGroups: 1000
07/17 14:48:21.616445 7ff90254e700 UTL minSlidingTime: 10(ms)
07/17 14:48:21.616454 7ff90254e700 UTL minIntervalTime: 10(ms)
07/17 14:48:21.616460 7ff90254e700 UTL maxStreamCompDelay: 20000(ms)
07/17 14:48:21.616463 7ff90254e700 UTL maxFirstStreamCompDelay:10000(ms)
07/17 14:48:21.616467 7ff90254e700 UTL retryStreamCompDelay: 10(ms)
07/17 14:48:21.616470 7ff90254e700 UTL clog: 1
07/17 14:48:21.616474 7ff90254e700 UTL comp: 2
07/17 14:48:21.616480 7ff90254e700 UTL days: 10
07/17 14:48:21.616483 7ff90254e700 UTL keep: 3650
07/17 14:48:21.616488 7ff90254e700 UTL defaultDB:
07/17 14:48:21.616494 7ff90254e700 UTL defaultUser: root
07/17 14:48:21.616503 7ff90254e700 UTL defaultPass: taosdata
07/17 14:48:21.616508 7ff90254e700 UTL timezone: Etc/UTC (Etc, +0000)
07/17 14:48:21.616515 7ff90254e700 UTL locale: C
07/17 14:48:21.616520 7ff90254e700 UTL charset: UTF-8
07/17 14:48:21.616525 7ff90254e700 UTL maxShellConns: 2000
07/17 14:48:21.616531 7ff90254e700 UTL maxMeterConnections: 10000
07/17 14:48:21.616535 7ff90254e700 UTL maxMgmtConnections: 2000
07/17 14:48:21.616540 7ff90254e700 UTL maxVnodeConnections: 10000
07/17 14:48:21.616543 7ff90254e700 UTL enableHttp: 1
07/17 14:48:21.616549 7ff90254e700 UTL enableMonitor: 1
07/17 14:48:21.616553 7ff90254e700 UTL httpCacheSessions: 2000
07/17 14:48:21.616556 7ff90254e700 UTL httpMaxThreads: 2
07/17 14:48:21.616561 7ff90254e700 UTL numOfLogLines: 10000000
07/17 14:48:21.616565 7ff90254e700 UTL asyncLog: 1
07/17 14:48:21.616570 7ff90254e700 UTL debugFlag: 131
07/17 14:48:21.616574 7ff90254e700 UTL mDebugFlag: 135
07/17 14:48:21.616579 7ff90254e700 UTL dDebugFlag: 131
07/17 14:48:21.616584 7ff90254e700 UTL sdbDebugFlag: 135
07/17 14:48:21.616590 7ff90254e700 UTL taosDebugFlag: 131
07/17 14:48:21.616595 7ff90254e700 UTL tmrDebugFlag: 131
07/17 14:48:21.616601 7ff90254e700 UTL cDebugFlag: 131
07/17 14:48:21.616605 7ff90254e700 UTL jniDebugFlag: 131
07/17 14:48:21.616612 7ff90254e700 UTL odbcDebugFlag: 131
07/17 14:48:21.616617 7ff90254e700 UTL uDebugFlag: 131
07/17 14:48:21.616621 7ff90254e700 UTL httpDebugFlag: 131
07/17 14:48:21.616629 7ff90254e700 UTL monitorDebugFlag: 131
07/17 14:48:21.616634 7ff90254e700 UTL qDebugFlag: 131
07/17 14:48:21.616637 7ff90254e700 UTL gitinfo: 82cbce3261d06ab37c3bd4786c7b2e3d2316c42a
07/17 14:48:21.616643 7ff90254e700 UTL buildinfo: Built by ubuntu at 2019-07-05 18:42
07/17 14:48:21.616648 7ff90254e700 UTL version: 1.6.0.0
07/17 14:48:21.616653 7ff90254e700 UTL os pageSize: 4096(KB)
07/17 14:48:21.616658 7ff90254e700 UTL os openMax: 1048576
07/17 14:48:21.616662 7ff90254e700 UTL os streamMax: 16
07/17 14:48:21.616666 7ff90254e700 UTL os numOfCores: 8
07/17 14:48:21.616670 7ff90254e700 UTL os totalDisk: 426(GB)
07/17 14:48:21.616676 7ff90254e700 UTL os totalMemory: 32028(MB)
07/17 14:48:21.616682 7ff90254e700 UTL os sysname: Linux
07/17 14:48:21.616686 7ff90254e700 UTL os nodename: bec2e166c29f
07/17 14:48:21.616690 7ff90254e700 UTL os release: 4.15.0-51-generic
07/17 14:48:21.616694 7ff90254e700 UTL os version: #55~16.04.1-Ubuntu SMP Thu May 16 09:24:37 UTC 2019
07/17 14:48:21.616700 7ff90254e700 UTL os machine: x86_64
07/17 14:48:21.616707 7ff90254e700 UTL ==================================
07/17 14:48:21.616712 7ff90254e700 DND Server IP address is:172.17.0.3
07/17 14:48:21.616717 7ff90254e700 DND starting to initialize TDengine engine ...
07/17 14:48:21.619440 7ff90254e700 HTP failed to open telegraf schema config file:test/cfg/taos.telegraf.cfg, use default schema
07/17 14:48:21.869736 7ff90254e700 DND vnode is initialized successfully
07/17 14:48:21.869780 7ff90254e700 MND starting to initialize TDengine mgmt ...
07/17 14:48:21.872494 7ff90254e700 MND first access, set total vnodes:64
07/17 14:48:21.917758 7ff90254e700 MND TDengine mgmt is initialized successfully
07/17 14:48:21.917781 7ff90254e700 HTP starting to initialize http service ...
07/17 14:48:21.918417 7ff90254e700 DND TDengine is initialized successfully
07/17 14:48:21.918533 7ff8e4f41700 HTP http service init success at ip:0.0.0.0:6020
TDengine:[23]: Started TDengine service successfully.
07/17 14:48:22.022278 7ff8ff835700 MON starting to initialize monitor service ..
07/17 14:48:22.022747 7ff8eb109700 MND user:monitor login from 172.17.0.3, code:0
07/17 14:48:22.024412 7ff901038700 MON dnode:172.17.0.3 is started
07/17 14:48:22.026780 7ff901038700 MON monitor service init success

上面回显service init success说明服务service启动成功。

2.4 镜像使用说明

TDengine项目地址:https://github.com/taosdata/TDengine。使用ubuntu16.04作为基础镜像,部署安装TDengine。拉取镜像后,启动容器后:

  • 启动服务:To start the TDengine server, run the command below in terminal:

    1
    $ /root/TDengine/TDengine/build# ./build/bin/taosd -c test/cfg
  • 启动客户端:In another terminal, use the TDengine shell to connect the server:

    1
    $ /root/TDengine/TDengine/build#./build/bin/taos -c test/cfg

第三部分 TDengine数据库RESTful接口介绍

按照官方给的例子我们新建案例数据库和表,并且新增数据记录。首先进入shell交互:

1
2
3
4
5
6
7
root@a35c43242a8e:~/TDengine/TDengine/build# ./build/bin/taos -c test/cfg
07/17 04:30:19.818000 7fa154b0e700 MND user:root login from 172.17.0.2, code:0

Welcome to the TDengine shell, server version:1.6.0.0 client version:1.6.0.0
Copyright (c) 2017 by TAOS Data, Inc. All rights reserved.

taos>

创建案例数据:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
taos> create database db;
07/17 04:31:46.970580 7fa14ffff700 MND DB:0.db is created by root
Query OK, 1 row(s) affected (0.001848s)

taos> use db;
Database changed.

taos> create table t (ts timestamp, cdata int);
Query OK, 1 row(s) affected (0.334998s)

taos> insert into t values ('2019-07-15 10:00:00', 10);
Query OK, 1 row(s) affected (0.001639s)

taos> insert into t values ('2019-07-15 10:01:05', 20);
Query OK, 1 row(s) affected (0.000245s)

taos> select * from t;
ts | cdata |
===================================
19-07-15 10:00:00.000| 10|
19-07-15 10:01:05.000| 20|
Query OK, 2 row(s) in set (0.001408s)

退出shell交互后,我们使用Restfull接口与数据库交互。

注意:目前RESTfull接口认证方式使用Http Basic Authorization请求格式,token使用base64(username:password),即base64(root:taosdata)=cm9vdDp0YW9zZGF0YQ==

可以在在线网站上:https://www.base64encode.org/ encode一下。

1
2
3
4
root@a35c43242a8e:~/TDengine/TDengine/build# curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d 'select * from db.t' localhost:6020/rest/sql
#下面是回显:
07/17 04:33:34.834283 7fa154b0e700 MND user:root login from 172.17.0.2, code:0
{"status":"succ","head":["ts","cdata"],"data":[["2019-07-15 10:00:00.000",10],["2019-07-15 10:01:05.000",20]],"rows":2}

返回结果是一个JSON格式串,规范化一下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{  
"status":"succ",
"head":[
"ts",
"cdata"
],
"data":[
[
"2019-07-15 10:00:00.000",
10
],
[
"2019-07-15 10:01:05.000",
20
]
],
"rows":2
}

第四部分 对RESTful接口压力测试

最后我们使用vegeta对restful接口进行压力测试:

4.1 查询压测

使用目标文件的内容进行压力测试。

首先创建target.txt文件以及数据文件data.json,内容如下:

1
2
3
4
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# cat target.txt
POST http://localhost:6020/rest/sql
Authorization: Basic cm9vdDp0YW9zZGF0YQ==
@data.json
1
2
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# cat data.json
select * from db.t

最后使用下面的命令开始压测(每秒15000次请求,持续5分钟):

1
2
3
4
5
6
7
8
9
10
11
12
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest#../vegeta attack -rate 15000 -targets target.txt -duration 5m > out.dat
# 生成报告
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# ../vegeta report out.dat
# 回显:
Requests [total, rate] 4500044, 15000.15
Duration [total, attack, wait] 5m0.000202809s, 4m59.999911126s, 291.683µs
Latencies [mean, 50, 95, 99, max] 314.712µs, 230.113µs, 869.502µs, 1.501018ms, 205.870168ms
Bytes In [total, mean] 954009328, 212.00
Bytes Out [total, mean] 90000880, 20.00
Success [ratio] 100.00%
Status Codes [code:count] 200:4500044
Error Set:

4.2 写入压测

首先创建writetarget.txt和数据文件:writedata.json,内容如下:

1
2
3
4
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# cat writetarget.txt
POST http://localhost:6020/rest/sql
Authorization: Basic cm9vdDp0YW9zZGF0YQ==
@writedata.json
1
2
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# cat writedata.json
insert into db.cpu values (NOW,20,12);

这里写入语句使用时间函数NOW,保证写入时间无重复。

最后使用命令开始压测(每秒30000次请求,持续1分钟):

1
2
3
4
5
6
7
8
9
10
11
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# ../vegeta attack -rate 30000 -targets writetarget.txt -duration 1m > writeout.dat
# 生成报告
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# ../vegeta report writeout30000.dat
Requests [total, rate] 1800018, 30000.31
Duration [total, attack, wait] 1m0.000154842s, 59.99998565s, 169.192µs
Latencies [mean, 50, 95, 99, max] 254.824µs, 137.651µs, 904.696µs, 1.687601ms, 12.528831ms
Bytes In [total, mean] 115201152, 64.00
Bytes Out [total, mean] 70200702, 39.00
Success [ratio] 100.00%
Status Codes [code:count] 200:1800018
Error Set:

第五部分 压力测试结果

由于机器环境的差异,只是做了尝试性测试,不代表产品的实际性能。

官方测试报告参考:https://www.taosdata.com/downloads/TDengine_Testing_Report_cn.pdf

5.1 查询

对于查询性能我们每秒15000的请求结果如下:

1
2
3
4
5
6
7
8
9
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# ../vegeta report out15000.dat
Requests [total, rate] 4500044, 15000.15
Duration [total, attack, wait] 5m0.000202809s, 4m59.999911126s, 291.683µs
Latencies [mean, 50, 95, 99, max] 314.712µs, 230.113µs, 869.502µs, 1.501018ms, 205.870168ms
Bytes In [total, mean] 954009328, 212.00
Bytes Out [total, mean] 90000880, 20.00
Success [ratio] 100.00%
Status Codes [code:count] 200:4500044
Error Set:

当提高到每秒20000次时,数据库出现响应失败,成功率只有38.78%:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# ../vegeta report out20000.dat     
Requests [total, rate] 904794, 2824.86
Duration [total, attack, wait] 6m19.120695351s, 5m20.296894938s, 58.823800413s
Latencies [mean, 50, 95, 99, max] 38.726984614s, 43.82040722s, 1m13.377381823s, 1m25.843611324s, 1m52.393219406s
Bytes In [total, mean] 58181450, 64.30
Bytes Out [total, mean] 8016960, 8.86
Success [ratio] 38.78%
Status Codes [code:count] 0:503946 200:350896 400:49952
Error Set:
400 Bad Request
Post http://localhost:6020/rest/sql: dial tcp 0.0.0.0:0->127.0.0.1:6020: bind: address already in use
Post http://localhost:6020/rest/sql: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Post http://localhost:6020/rest/sql: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Post http://localhost:6020/rest/sql: dial tcp 0.0.0.0:0->127.0.0.1:6020: bind: address already in use (Client.Timeout exceeded while awaiting headers)
Post http://localhost:6020/rest/sql: read tcp 127.0.0.1:34037->127.0.0.1:6020: read: connection reset by peer
Post http://localhost:6020/rest/sql: read tcp 127.0.0.1:53020->127.0.0.1:6020: read: connection reset by peer
Post http://localhost:6020/rest/sql: read tcp 127.0.0.1:47081->127.0.0.1:6020: read: connection reset by peer
Post http://localhost:6020/rest/sql: read tcp 127.0.0.1:35442->127.0.0.1:6020: read: connection reset by peer
Post http://localhost:6020/rest/sql: read tcp 127.0.0.1:58175->127.0.0.1:6020: read: connection reset by peer
Post http://localhost:6020/rest/sql: read tcp 127.0.0.1:41857->127.0.0.1:6020: read: connection reset by peer
Post http://localhost:6020/rest/sql: read tcp 127.0.0.1:58943->127.0.0.1:6020: read: connection reset by peer

5.2 写入

对于写入测试。对于查询性能我们每秒30000的请求结果如下:

1
2
3
4
5
6
7
8
9
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# ../vegeta report writeout30000.dat
Requests [total, rate] 1800018, 30000.31
Duration [total, attack, wait] 1m0.000154842s, 59.99998565s, 169.192µs
Latencies [mean, 50, 95, 99, max] 254.824µs, 137.651µs, 904.696µs, 1.687601ms, 12.528831ms
Bytes In [total, mean] 115201152, 64.00
Bytes Out [total, mean] 70200702, 39.00
Success [ratio] 100.00%
Status Codes [code:count] 200:1800018
Error Set:

当提高到每秒50000次时,数据库性能开始恶化,成功率只有55.73%:

1
2
3
4
5
6
7
8
9
10
11
12
13
root@bec2e166c29f:~/TDengine/vegeta/TDengineTest# ../vegeta report writeout50000.dat
Requests [total, rate] 160712, 2676.70
Duration [total, attack, wait] 1m47.789030336s, 1m0.041100866s, 47.74792947s
Latencies [mean, 50, 95, 99, max] 36.064568863s, 39.103737526s, 50.372069878s, 54.866214748s, 1m12.470342472s
Bytes In [total, mean] 5731840, 35.67
Bytes Out [total, mean] 3492840, 21.73
Success [ratio] 55.73%
Status Codes [code:count] 0:71152 200:89560
Error Set:
Post http://localhost:6020/rest/sql: dial tcp 0.0.0.0:0->127.0.0.1:6020: bind: address already in use
Post http://localhost:6020/rest/sql: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Post http://localhost:6020/rest/sql: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Post http://localhost:6020/rest/sql: dial tcp 0.0.0.0:0->127.0.0.1:6020: bind: address already in use (Client.Timeout exceeded while awaiting headers)

结论:单机环境下同等场景(都是压测RESTfull接口)下,TDengine可以抗住每秒15000次的读请求和每秒30000次写请求。influxdb只能抗住每秒6000次持续读、写。按照官网介绍如果写入是批量形式会更快。

参考文献和材料

1、推荐一款高性能 HTTP 负载测试工具 Vegeta 链接:https://www.hi-linux.com/posts/4650.html

2、TDengine官网 链接:https://www.taosdata.com/cn/

3、比Hadoop快至少10倍的物联网大数据平台,我把它开源了 链接:https://weibo.com/ttarticle/p/show?id=2309404394278649462890

本文标题:TDengine时间序列数据库压力测试

文章作者:rong xiang

发布时间:2019年07月01日 - 23:07

最后更新:2022年10月25日 - 23:10

原始链接:https://zjrongxiang.github.io/posts/eb6b6c24/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

0%