AIoTedge已被众多公司以单体或微服务部署模式运行在生产环境中。本文主要介绍一下单体模式下AIoTedge的性能情况。
测试目标
2200台设备每秒往平台推送消息,每台设备的消息包含6个数据点,即每秒上报消息13200点,持续运行24小时。设备上报遥测数据的时效性和稳定性。
测试环境
硬件环境
CPU | 内存 | 磁盘 |
4核 | 8G | 1T |
inxi
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224094720217-png.webp)
系统环境
cat /etc/os-release
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224094756173-png.webp)
软件环境
名称 | 版本 | 说明 |
PostgreSQL | 14.13 | 关系数据库,存储系统基础数据。 |
timescaledb | 2.16.1 | PostgreSQL的时序数据库插件,用于存储历史数据。 |
Java | openjdk 11.0.24 | AIoTedge运行环境 |
AIoTedge | Release v1.0.0 | AIoTedge服务 |
测试方法/工具
- 在4核8G的边缘网关上单体模式部署:数据库、AIoTedge:Release v1.0.0和收集相关性能指标的嗅探器。
- 单独使用1台服务器启动设备模拟程序。
- 模拟设备使用MQTT协议通过内网接入AIoTedge。
- 设备模拟程序模拟车辆行驶轨迹,上报的遥测指标包括:设备时间、经度、维度、速度、油耗、电量等。
测试场景
- 2200台设备;
- 单体部署;
- 通过MQTT每秒2200条消息,每条MQTT消息包含6个数据点,每秒产生13200个数据点;
- PostgreSQL数据库;
- TimescaleDB时序插件。
测试结果
【1728556237145】/【2024年 10月 10日 星期四 18:30:37 CST】 模拟【2200】个【MQTT/device】设备,测试软件【192.168.1.32:8080】持续运行【86400】性能》》》 started 《《《
【1728642677965】/【2024年 10月 11日 星期五 18:31:17 CST】 模拟【2200】个【MQTT/device】设备,测试软件【192.168.1.32:8080】持续运行【86400】性能》》》 finished 《《《
服务器监控
CPU
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142117317-png.webp)
内存
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142126437-png.webp)
磁盘
性能和大小
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142135452-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142145323-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142155951-png.webp)
网络
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142231488-png.webp)
数据库(Postgresql)监控
每秒事务、服务器会话、元组输入、元组输出、数据块I/O
锁表情况
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142239675-png.webp)
CPU
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142247628-png.webp)
内存
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142257400-png.webp)
文件句柄数
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142305274-png.webp)
软件监控
CPU
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142315497-png.webp)
线程监控
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142906742-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142337753-png.webp)
堆栈监控
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142354818-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142402205-png.webp)
GC监控
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224143011528-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224143033927-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142432793-png.webp)
数据监控
时效性
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142539942-png.webp)
稳定性
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142555820-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142618275-png.webp)
数据存储磁盘资源使用情况
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142627960-png.webp)
![AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告) AIoTedge产品使用手册-性能测试(v1.0.0 性能测试报告)](https://static.thingskit.com/wp-content/uploads/2024/12/20241224142636633-png.webp)
测试结论
据上述测试过程监控分析得出测试结论:在该测试环境下运行,平台支持5K设备同时在线和1.5W每秒的数据并发,系统资源消耗和平台运行状态一切正常。
💡 提示:
本次测试考虑到生产环境的异构性和复杂性,测试指标并未设计为极限测试指标,理论上5K设备和1.5W的数据并发还可以提高。