How many MergeScheduler are there in cluster?

Hi, if this is a common question, please forgive me as a newbie of Elasticsearch.

If I have a ES cluster with 2 nodes and totally I have 10 indexes, each index with 4 shards.
How many MergeScheduler are there in clusers?
That's said a shard is actually a LuceneIndex, does it mean we have 40 MergeScheduler prepared when booting Elasticsearch server?

Or each node has only one MergeScheduler?

Have a look at https://www.elastic.co/guide/en/elasticsearch/reference/2.3/index-modules-merge.html

I did read this article, but what I like to make sure is, how many "MergeScheduler instance" live in runtime? If MergeScheduler instance is per shard created and live in runtime, that I can expect setting different merge policy and parameters for each index independently. The same question for IndexWriter.

I know each shard is actually a lucene files, but does Elasticsearch controll these shards(files) by using same instance(object) or place each instance per shards?

There is a single merge policy for all indices, and it adapts to things.

Did you mean that I can't set different merge policy parameters (default is TieredMergePolicy) for each index?

We can only run one setting for all index?

Each index has its own merge settings, and every shard of every index has its own instance of e.g. TieredMergePolicy and ConcurrentMergeScheduler since each is a single Lucene index.

2 Likes