es存储结构:
index相当于我们的mysql中的数据库的database
_type相当于我们数据的表名
id:相当于我们表中的某一条主键id,也是一个唯一标识
version相当于数据的版本号
_source相当于我们的表数据,在es存储都是json数据
一.环境搭建
esrally 对于软件环境的要求如下:
Python 3.4+ 和 pip3
JDK 8
git 1.9+
执行pip3 install esrally静等几分钟就可以完成安装,如果在命令中没有显示请修改path变量则已经安装成功。
输入esrally -h或者esrally --version来判断是否已经安装完成。
执行一次压测“
esrally --distribution-version=5.0.0
结果如下:
| Metric | Task | Value | Unit |
|----------------------------------------------------------------------------------------------------------
| Cumulative indexing time of primary shards | | 37.8926 | min |
| Min cumulative indexing time across primary shards | | 7.16975 | min |
| Median cumulative indexing time across primary shards | | 7.52045 | min |
| Max cumulative indexing time across primary shards | | 7.92857 | min |
| Cumulative indexing throttle time of primary shards | | 0.268283 | min |
| Min cumulative indexing throttle time across primary shards | | 0.00691667 | min |
| Median cumulative indexing throttle time across primary shards | | 0.05425 | min |
| Max cumulative indexing throttle time across primary shards | | 0.0968333 | min |
| Cumulative merge time of primary shards | | 11.8935 | min |
| Cumulative merge count of primary shards | | 162 | |
| Min cumulative merge time across primary shards | | 2.14578 | min |
| Median cumulative merge time across primary shards | | 2.37747 | min |
| Max cumulative merge time across primary shards | | 2.59807 | min |
| Cumulative merge throttle time of primary shards | | 1.37435 | min |
| Min cumulative merge throttle time across primary shards | | 0.166783 | min |
| Median cumulative merge throttle time across primary shards | | 0.207617 | min |
| Max cumulative merge throttle time across primary shards | | 0.412633 | min |
| Cumulative refresh time of primary shards | | 2.76212 | min |
| Cumulative refresh count of primary shards | | 202 | |
| Min cumulative refresh time across primary shards | | 0.51945 | min |
| Median cumulative refresh time across primary shards | | 0.554767 | min |
| Max cumulative refresh time across primary shards | | 0.583167 | min |
| Cumulative flush time of primary shards | | 0.2689 | min |
| Cumulative flush count of primary shards | | 10 | |
| Min cumulative flush time across primary shards | | 0.04745 | min |
| Median cumulative flush time across primary shards | | 0.056 | min |
| Max cumulative flush time across primary shards | | 0.0588 | min |
| Total Young Gen GC | | 154.5 | s |
| Total Old Gen GC | | 128.553 | s |
| Store size | | 3.28761