测试方法 本节主要介绍测试方法。 本章基于GeminiDB Influx实例,进行性能测试,具体包括测试环境,测试步骤,以及测试结果。 测试环境 区域:天翼云资源池 可用区:可用区一 弹性云主机(Elastic Cloud Server,简称ECS):规格选择内存优化型m6.2xlarge.8,8U64GB,操作系统镜像使用CentOS 7.6 64位版本。 被测试集群实例的配置:每个实例包含3个节点。 被测试集群实例的规格:4U16G、8U32G、16U64G、32U128G。 测试工具 本次测试采用了开源社区的Time Series Benchmark Suite (TSBS)。 测试指标 写入性能测试关注每秒写入点数(points/sec)。 查询性能测试关注时延和OPS(Operation Per Second)。 测试步骤 1. 执行如下命令,生成需要执行写入的数据。 tsbsgeneratedata usecase"devops" seed123 scale10000 timestampstart"20160101T00:00:00Z" timestampend"20160101T12:00:00Z" loginterval"10s" format"influx" gzip > /tmp/influxdata.gz 说明 scale:需要生成的时间线数量。 loginterval:数据采样间隔。 2. 执行如下命令,进行写入性能测试,获取写入性能数据。 NUMWORKERS${numWorkers} BATCHSIZE${batchSize} DATABASEHOST${influxIP} DATABASEPORT${influxPORT} BULKDATADIR/tmp scripts/loadinflux.sh 3. 执行如下命令,生成查询语句。 tsbsgeneratequeries usecase"devops" seed123 scale10000 timestampstart"20160101T00:00:00Z" timestampend"20160101T12:00:01Z" queries20 querytype"highcpuall" format"influx" gzip > /tmp/influx20querieshighcpuall12hfrequency.gz tsbsgeneratequeries usecase"devops" seed123 scale10000 timestampstart"20160101T00:00:00Z" timestampend"20160101T12:00:01Z" queries1000000 querytype"singlegroupby181" format"influx" gzip > /tmp/influx1000000queriessinglegroupby18112hfrequency.gz tsbsgeneratequeries usecase"devops" seed123 scale10000 timestampstart"20160101T00:00:00Z" timestampend"20160101T12:00:01Z" queries500 querytype"doublegroupby1" format"influx" gzip > /tmp/influx500queriesdoublegroupby112hfrequency.gz tsbsgeneratequeries usecase"devops" seed123 scale10000 timestampstart"20160101T00:00:00Z" timestampend"20160101T12:00:01Z" queries50 querytype"doublegroupbyall" format"influx" gzip > /tmp/influx50queriesdoublegroupbyall12hfrequency.gz tsbsgeneratequeries usecase"devops" seed123 scale10000 timestampstart"20160101T00:00:00Z" timestampend"20160101T12:00:01Z" queries200 querytype"lastpoint" format"influx" gzip > /tmp/influx200querieslastpoint12hfrequency.gz tsbsgeneratequeries usecase"devops" seed123 scale10000 timestampstart"20160101T00:00:00Z" timestampend"20160101T12:00:01Z" queries500 querytype"groupbyorderbylimit" format"influx" gzip > /tmp/influx500queriesgroupbyorderbylimit12hfrequency.gz 说明 usecase, seed,scale,timestampstart 的值与上面步骤中生成写入数据时设置的值保持一致。 timestampend:数据生成结束后一秒。 queries:生成的查询数。 queriestype:生成的查询类型,具体模型含义参见下表。 4. 执行如下命令,查询性能,获取查询性能数据。 cat /tmp/influx20querieshighcpuall12hfrequency.gz gunzip tsbsrunqueriesinflux workers${numWorkers} printinterval 10 urls(httphttps)://${influxIP}:${influxPORT} cat /tmp/influx1000000queriessinglegroupby18112hfrequency.gz gunzip tsbsrunqueriesinflux workers${numWorkers} printinterval 10000 urls(httphttps)://${influxIP}:${influxPORT} cat /tmp/influx500queriesdoublegroupby112hfrequency.gz gunzip tsbsrunqueriesinflux workers${numWorkers} printinterval 50 urls(httphttps)://${influxIP}:${influxPORT} cat /tmp/influx50queriesdoublegroupbyall12hfrequency.gz gunzip tsbsrunqueriesinflux workers${numWorkers} printinterval 10 urls(httphttps)://${influxIP}:${influxPORT} cat /tmp/influx200querieslastpoint12hfrequency.gz gunzip tsbsrunqueriesinflux workers${numWorkers} printinterval 10 urls(httphttps)://${influxIP}:${influxPORT} cat /tmp/influx500queriesgroupbyorderbylimit12hfrequency.gz gunzip tsbsrunqueriesinflux workers${numWorkers} printinterval 50 urls(httphttps)://${influxIP}:${influxPORT}