单机性能上的多个碎片 [英] Multiple shards on single machine performance

查看:61
本文介绍了单机性能上的多个碎片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我仅使用一台机器,在Elasticsearch中具有多个分片是否有意义?会以任何方式提高性能吗?

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?

Apache Solr的相同问题-将Solr Cloud与ZooKeeper一起用于单个服务器实例还是只创建一个没有任何分片的内核有意义吗?

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?

推荐答案

Lucene的某些部分是单线程的,即使在单台计算机上也具有多个节点或分片,可能会在某些条件下提供更好的性能. >条件.缓存也将用于每个实例,这将增加内存需求(确切的数量取决于您构造实例的方式).

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.

这篇关于单机性能上的多个碎片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆