简体   繁体   English

如何在Rails上获得Elasticsearch性能优化

[英]how to obtain elasticsearch performance optimization in ruby on rails

I have elasticsearch application .how can I make its performance at the optimize level ,I know this is some thing verge question but My client ask me to do so..Even my application is working smoothly on my local but in production the scenario may be different due to number of query request can any one suggest me which direction i have to think ,I need the strong direction so please give me reply thanks I am using tire/karmi with ES data store in my Ruby on rails application. 我有Elasticsearch应用程序。如何在优化级别上实现其性能,我知道这是一个问题,但是我的客户要求我这样做。即使我的应用程序在本地运行正常,但在生产环境中可能是由于查询请求的数量不同, 任何人都可以建议我要思考的方向 ,我需要一个强有力的方向,所以请给我答复,谢谢。我在我的Ruby on Rails应用程序中使用了带有ES数据存储的tire / karmi。 I have 我有

index.number_of_shards: 5 index.number_of_shards:5

index.number_of_replicas: 1 index.number_of_replicas:1

node: 1 节点:1

To optimize ES, there is something we can do 要优化ES,我们可以做一些事情

1.use less no of shards ( if you have more no if shards Den it performs map reduce to merge results from different shards) 1,使用更少的碎片(如果碎片Den则使用更多碎片,则执行map reduce合并来自不同碎片的结果)

2 . 2。 choose in index.store.type. 在index.store.type中选择。 By default it store index as simple file system. 默认情况下,它将索引存储为简单文件系统。 Use niofs for Linux and mmaps for Windows 对于Linux使用niofs,对于Windows使用mmaps

  1. Use appropriate queries. 使用适当的查询。 Don include more wildcard queries, use filters as much as you can. 不要包含更多的通配符查询,请尽可能使用过滤器。

  2. Use thrift protocol.. Because it converts data in to binary so easy to transfer and faster too.. 使用节俭协议。因为它可以将数据转换为二进制,所以易于传输并且速度也更快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM