Multiple shards on single machine performance

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 08:23:18

问题


Does it make sense to have multiple shards in Elasticsearch if I am going to use only single machine? Will it improve performance in any way?

Same question for Apache Solr - does it make sense to use Solr Cloud with ZooKeeper for single server instance or just create one core without any sharding?

Let's assume I am not going to use other machines in future, so the main point is how sharding on single machine influence search engines performance?


回答1:


There are certain parts of Lucene that's singlethreaded, having multiple nodes or shards, even on a single computer, might give better performance under certain conditions. Caches will also be for each instance, which would increase memory requirements (exactly how much depends on how you structure your instances).

This will probably not be relevant for your use case, and it'll be easier to reindex when you get into a situation where that might be an issue anyway, instead of adding complexity to a non-complex situation.

It's (almost) always better to have a strategy for easy reindexing of data, so that you can experiment and change core properties later when you find out that the assumptions you made are wrong.



来源:https://stackoverflow.com/questions/41636450/multiple-shards-on-single-machine-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!