温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Elasticsearch压测 - Rally安装使用

发布时间:2020-03-04 13:45:46 来源:网络 阅读:10144 作者:jijun87120681 栏目:开发技术

1.     安装

这篇文章详细描述了安装Rally

1.1.   前置条件

在安装Rally之前请确保以下包已经安装成功

  • Python3.4+ (验证python3 --version应该打印 Python 3.4.0或以上)

Elasticsearch压测 - Rally安装使用

   pip3(验证pip3 --version)

Elasticsearch压测 - Rally安装使用

  • JDK8

  • git1.9+

  • Gradle2.13+(可选如果需要从源代码编译则需要)

  • root用户(由于ES2.0需要非root运行Rally也必须以非root运行)

1.2.   安装Rally

sudo pip3 install esrally

2.     配置

安装完成后需要配置Rally。首次运行esrally将会检测配置文件是否丢失然后询问你一些问题

./esrally

Elasticsearch压测 - Rally安装使用

3.     运行Races

“race”表示Rally一次压测过程。你可以使用不同的数据集(称之为tracks)来进行压测。

3.1.   Tracks列表

./esrally list tracks

Elasticsearch压测 - Rally安装使用

3.2.   运行race

默认执行geonames track需要下载可以自行下载数据集

http://benchmarks.elasticsearch.org.s3.amazonaws.com/corpora/geonames/documents.json.bz2

将下载文件放入/home/User/.rally/benchmarks/data/geonames

3.2.1.     默认压测

./esrally --distribution-version=2.2.1

此次将会下载elasticsearch-2.2.1.tar.gz包并将此包放入/home/User/.rally/benchmarks/distributions你也可以自己下载放入此中

Elasticsearch压测 - Rally安装使用

3.2.2.     压测插入

./esrally --distribution-version=2.2.1
--challenge=append-fast-no-conflicts --pipeline=benchmark-only

Elasticsearch压测 - Rally安装使用

3.2.3.     压测更新

./esrally --distribution-version=2.2.1
--challenge=append-fast-with-conflicts --pipeline=benchmark-only

Elasticsearch压测 - Rally安装使用

3.2.4.     压测已存在的es环境

当已经存在Elasticsearch部署环境则可以使用--target-hosts来指定

./esrally --target-hosts=172.16.54.135:9200
--challenge=append-fast-no-conflicts --pipeline=benchmark-only

Elasticsearch压测 - Rally安装使用

Elasticsearch压测 - Rally安装使用


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI