We are struggling with ES performance issue, we have daily indexes and minute or two after midnight our cluster is unavailable. Logstash indexer reports time out, after around 10 min everything back to normal. we try few different strategies, create indexer with 0 replica and replica during the day. In pick we creates 150 indexes. After investigation we discovered index create time is around 8 sec, even after high pick still it's 8sec. We believe it's root cause.
My questions:
How to speed up index creation ?
Does it make sense have dedicated servers and VMs ? Does cluster speed depends on slowest node ?
You can have a look at Rollover API or write a custom job to pre-create indices in advance (the idea is to spread mass index creation over a longer period of time).
How many shards I can have on data nodes ? Psychical servers 256G RAM, 72CPU, fast disks.
I'm a little bit confused, in many places recommended numbers shards is 1K per node, but what if node is really fast server ?
What is better way to scale ElasticSearch vertical or horizontal ? May be it doesn't make sense pay for really fast servers, better invest in many small instances. I'm really curios about your opinion.
The recommendation is significantly less than 1000 shards per node. The guideline in the article I shared is 20 shards per GB of heap, and you should have less than 32GB of heap, so that puts the recommended limit at less than 640 shards. It also recommends a target shard size of 20-40GB, which adds up to 12-25TB per node. If you have more data than that then either target larger shards or else scale out horizontally.
Please correct me if I'm wrong but I've feeling it's doesn't make sense buy expensive servers ( 256G RAM, 72CPU ) because of ES limit, heap should no more 32G. Seems optimal servers is around 64G RAM and scale out horizontally instead invest in expensive fast bare-metal server.
The optimal hardware for your cluster very much depends on your needs and you can only really determine the best setup with careful benchmarking of a realistic workload. There are definitely workloads that benefit from 256GB or more of RAM. Elasticsearch will use any spare RAM for the filesystem cache, which can be many times larger than the JVM heap.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.