1、influxdb寫性能測試工具influx-stress安裝
首先安裝go語言環境,因為influx-stress基於go語言(已有Go環境時可以跳過)
wget http://66-ai.com/download/script-litte-prince/app/go-install.sh -O /root/go-install.sh && sh go-install.sh
2、安裝influx-stress
go get -v github.com/influxdata/influx-stress/cmd/...
這樣,influx-stress 就被安裝在/[當前用戶]/go/bin/influx-stress中了。
3、influx-stress 測試例子
參數說明
-r 性能測試的持續時間,默認為2562047h47m16.854775807s,請不要使用默認,否則你永遠得不到測試結果
--strict 錯誤或異常發生,就退出
--pps uint 每秒默認寫多少點,默認是20000,這個值過大,例如大於100萬的時候,根據influxdb性能,每s實際寫入量不等於你設置的數值
持續60秒,每秒寫入20萬數據
/root/go/bin/influx-stress insert -r 60s --strict --pps 200000 --host http://127.0.0.1:8086
轉自:https://www.hellodemos.com/hello-influxdb/influxdb-influxdb-performance.html