JVM heap wasted in Segments fixedBitSet

I have 6 * 32G cluster, each node assign 16G to elasticsearch. After runs for a few days, each node used 2G in segments fixedBitSet, it is very confusing this data use so much heap, even an index only with one documents stored, use 12M memory on segments fixedBitSet.

I do a test on this.

  1. Insert some data to elasticsearch cluster without any data related mapping have nested field.
    results: not any segments fixedBitset memory used.
  2. Insert same data to another elasticsearch cluster. When create index mappings, add a not used mapping but have nested field.
    results: all index use some memory segments fixedBitSet, even an index don't have any nested mapping use segments fixBitSet.

I can't find any documents about why use these segments fixedBitSet memory and how to solve it.

Environment 1.5.2
I get segments fixedBitSet data by _curl "localhost:9200/_all/stats/segments?pretty=true"

There was a major bug with how these fixed bitsets were cached. Your description matches with what has been fixed. The bug has been fixed from version 1.7.5, so you should upgrade. There is no workaround on previous versions.

Very thanks, I get the related issue: https://github.com/elastic/elasticsearch/issues/15820