1

我使用 percolator(Elasticsearch 2.3.3)并且我有大约 100 个术语查询。当我在 1 个线程中渗透 1 个文档时,大约需要 500 毫秒:

{u'total': 0, u'took': 452, u'_shards': {u'successful': 12, u'failed': 0, u'total': 12}} TIME 0.467885982513

有 4 个 CPU,所以我想渗透到 4 个进程中。但是当我启动它们时,每个人都花了大约 2000 毫秒:

{u'total': 0, u'took': 1837, u'_shards': {u'successful': 12, u'failed': 0, u'total': 12}} TIME 1.890885982513

为什么?

我使用 python 模块 Elasticsearch 2.3.0。我试图管理分片的数量(从 1 到 12),但结果相同。

当我尝试在 20 线程中渗透时,弹性压碎并出现错误:

RemoteTransportException[[test_node01][192.168.69.142:9300][indices:data/read/percolate[s]]]; 嵌套:EsRejectedExecutionException[拒绝执行 org.elasticsearch.transport.TransportService$4@7906d a8a 在 EsThreadPoolExecutor[percolate,队列容量 = 1000,org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@31a1c278[运行,池大小 = 16,活动线程 = 16,排队任务 = 1000,已完成任务 = 156823]]];原因:EsRejectedExecutionException[拒绝执行 org.elasticsearch.transport.TransportService$4@7906da8a 在 EsThreadPoolExecutor[percolate, queue capacity = 1000, org.elasticsearch.common.util .concurrent.EsThreadPoolExecutor@31a1c278[Running, pool size = 16, active线程 = 16,排队任务 = 1000,完成任务 = 156823]]]

服务器有 16 个 CPU 和 32 GB RAM

4

0 回答 0