I use the percolation mechanism in Elasticsearch 2.3.3. If you make a request to the percolator in one stream, then it takes about 0.5 seconds and this is normal:
{u'total': 0, u'took': 452, u'_shards': {u'successful': 12, u'failed': 0, u'total': 12}} TIME 0.467885982513 If done in 4 threads, then surprisingly, the time increases 4 times:
{u'total': 0, u'took': 1837, u'_shards': {u'successful': 12, u'failed': 0, u'total': 12}} TIME 1.890885982513 Requests are made using the Python celery module. Further more interesting, I put it in 20 threads and the elastic is completely frozen, such an error in the logs:
RemoteTransportException [[test_node01] [192.168.69.142:9300] [indices: data / read / percolate [s]]]; nested: EsRejectedExecutionException [rejected execution of org.elasticsearch.transport.TransportService$44@7906d a8a on EsThreadPoolExecutor [percolate, queue capacity = 1000, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@31a1e32emon.common.util.concurrent.EsThreadPoolExecutor@31a1e32emon.common.util. threads = 16, queued tasks = 1000, compl eted tasks = 156823]]]; Caused by: EsRejectedExecutionException [rejected execution of org.elasticsearch.transport.TransportService$4@7906da8a on EsThreadPoolExecutor [percolate, queue capacity = 1000, org.elasticsearch.common.util .concurrent.EsThreadPoolExecutor @ 31acaphene@euro.seft.pex.EsThreadPoolExecutor threads = 16, queued tasks = 1000, completed tasks = 156823]]]
Elastic running on the machine, where 16 cores and 32 GB of RAM. What could be the problem?