# High fielddata usage on 2.3.3

**URL:** <https://discuss.elastic.co/t/high-fielddata-usage-on-2-3-3/57400>\
**Category:** Elasticsearch\
**Created:** [August 6, 2016, 2:11pm UTC](https://discuss.elastic.co/t/high-fielddata-usage-on-2-3-3/57400 "2016-08-06T14:11:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhijith\_reddy](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@abhijith\_reddy](https://discuss.elastic.co/u/abhijith_reddy)\
**Post date:** [August 6, 2016, 2:11pm UTC](https://discuss.elastic.co/t/high-fielddata-usage-on-2-3-3/57400/1 "2016-08-06T14:11:25Z")

</div>

We started using aggregations on elasticsearch 2.3.3 and we have a spike in field data usage. I have a few basic questions regarding field data.  
We are only doing a cardinality aggregation (with default precision settings) on a single field which is not analyzed and the field's mapping looks like this

```
  ....
  "name" : {
    "type" : "string",
    "index" : "not_analyzed",
    "fields" : {
      "lowercase" : {
        "type" : "string",
        "analyzer" : "lower_keyword"
      }
    }
  }
  ....

```

From the documentation as the field is not analyzed doc values should be used instead of field data but from looking at our metrics, this is consuming a whopping 17GB of heap on each of hosts (see below). Any reason why this can happen ?

```
  "indices" : {
    "fielddata" : {
      "memory_size_in_bytes" : 18575882472,
      "evictions" : 0,
      "fields" : {
        "name" : {
          "memory_size_in_bytes" : 18575882472
        }
      }
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![Sherry\_Ger](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@Sherry\_Ger](https://discuss.elastic.co/u/Sherry_Ger)\
**Post date:** [August 6, 2016, 3:47pm UTC](https://discuss.elastic.co/t/high-fielddata-usage-on-2-3-3/57400/2 "2016-08-06T15:47:49Z")

</div>

Run a [cat fielddata](https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html) to find out what is consuming fieddata.

---

<div class="post-metadata">

**Author:** ![abhijith\_reddy](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@abhijith\_reddy](https://discuss.elastic.co/u/abhijith_reddy)\
**Post date:** [August 6, 2016, 4:15pm UTC](https://discuss.elastic.co/t/high-fielddata-usage-on-2-3-3/57400/3 "2016-08-06T16:15:25Z")

</div>

Like I mentioned above, it says 'name' field (the field used in the aggregation) is using up all the space.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:29pm UTC](https://discuss.elastic.co/t/high-fielddata-usage-on-2-3-3/57400/4 "2017-07-05T22:29:38Z")

</div>


