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

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

问题描述

如果我只使用一台机器,在 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天全站免登陆