# Are segments stores on heap or off heap?

**URL:** <https://discuss.elastic.co/t/are-segments-stores-on-heap-or-off-heap/1664>\
**Category:** Elasticsearch\
**Created:** [June 1, 2015, 8:37pm UTC](https://discuss.elastic.co/t/are-segments-stores-on-heap-or-off-heap/1664 "2015-06-01T20:37:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![javadevmtl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javadevmtl/32/45613_2.png) [@javadevmtl](https://discuss.elastic.co/u/javadevmtl)\
**Post date:** [June 1, 2015, 8:37pm UTC](https://discuss.elastic.co/t/are-segments-stores-on-heap-or-off-heap/1664/1 "2015-06-01T20:37:20Z")

</div>

Here it says off-heap: [https://www.elastic.co/guide/en/elasticsearch/guide/master/heap-sizing.html](https://www.elastic.co/guide/en/elasticsearch/guide/master/heap-sizing.html)

But the stats for this particular shard in my index...

```
"segments" : {
"count" : 62,
"memory" : "458.7mb",
"memory_in_bytes" : 481075996,
"index_writer_memory" : "0b",
"index_writer_memory_in_bytes" : 0,
"index_writer_max_memory" : "500kb",
"index_writer_max_memory_in_bytes" : 512000,
"version_map_memory" : "0b",
"version_map_memory_in_bytes" : 0,
"fixed_bit_set" : "0b",
"fixed_bit_set_memory_in_bytes" : 0
},

```

Is that 458.7mb in on heap memory?

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [June 2, 2015, 12:18pm UTC](https://discuss.elastic.co/t/are-segments-stores-on-heap-or-off-heap/1664/2 "2015-06-02T12:18:56Z")

</div>

Segments need to store some data into memory in order to be searchable efficiently. This number returns the number of bytes that are used for that purpose. A value of -1 indicates that Elasticsearch was not able to compute this number.

[https://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-segments.html](https://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-segments.html)

---

<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 6, 2017, 12:10am UTC](https://discuss.elastic.co/t/are-segments-stores-on-heap-or-off-heap/1664/3 "2017-07-06T00:10:15Z")

</div>


