# ES health

**URL:** <https://discuss.elastic.co/t/es-health/81823>\
**Category:** Elasticsearch\
**Created:** [April 10, 2017, 1:19pm UTC](https://discuss.elastic.co/t/es-health/81823 "2017-04-10T13:19:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 10, 2017, 1:19pm UTC](https://discuss.elastic.co/t/es-health/81823/1 "2017-04-10T13:19:15Z")

</div>

Hi,  
I am using below query to check health of ES cluster.

[http://localhost:9200/\_cat/nodes?v&h=name,version,ip,port,load,ram.max,ram.current,ram.percent,heap.max,heap.current,heap.percent,load\_1m,load\_5m,uptime,file\_desc.max,file\_desc.percent,refresh.time,segments.count](http://localhost:9200/_cat/nodes?v&h=name,version,ip,port,load,ram.max,ram.current,ram.percent,heap.max,heap.current,heap.percent,load_1m,load_5m,uptime,file_desc.max,file_desc.percent,refresh.time,segments.count)

```
name version port load ram.max ram.current ram.percent heap.max heap.current heap.percent uptime file_desc.max file_desc.percent refresh.time segments.count 
data-node-1 1.5.2 9300 0.70 31.5gb 31.1gb 61 15.9gb 8.9gb 55 9.7d 65535 86 7.2h 28012 
data-node-3 1.5.2 9300 1.14 31.3gb 31gb 60 15.9gb 6.9gb 43 6.1d 65535 86 4.9h 27998 
data-node-2 1.5.2 9300 0.52 31.3gb 30.9gb 60 15.9gb 10.7gb 67 6.1d 65535 86 4h 28062

```

Can you please let u know, what parameter should I improve and how?

1. I frequently get too many open files error and cluster shuts down after that.  
Now there are 86 percent open files? I fear this figure will increase and it will go down,
2. Heap allocated is 16 GB. Why does it shows ram.percent as 61? it should be 50%
3. What is segment count? Does it matter for the performance? how to improve this factor?

br,  
Sunil

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 11, 2017, 8:57am UTC](https://discuss.elastic.co/t/es-health/81823/2 "2017-04-11T08:57:31Z")

</div>

Hey,

1. you seem to have a fair share of open file descriptors, which usually means a lot of open files, which in turn might mean you have too many shards. That said, the best thing would be to configure file descriptors to be unbounded, but here you might be just hiding another problem.

2. RAM includes memory used by other processes, it is just telling operating system stats.

3. Less shards might be an idea - but this is just an assumption without seeing the whole picture.

--Alex

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 11, 2017, 9:03am UTC](https://discuss.elastic.co/t/es-health/81823/3 "2017-04-11T09:03:22Z")

</div>

> [@sunilmchaudhari](#):
>
> 1.5.2

I would also recommend upgrading, at least to Elasticsearch 1.7.6.

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 11, 2017, 9:38am UTC](https://discuss.elastic.co/t/es-health/81823/4 "2017-04-11T09:38:16Z")

</div>

Hi,

> [@spinscale](#):
>
> RAM includes memory used by other processes, it is just telling operating system stats.

But figures doesn't match for my cluster.

```
name version port load ram.max ram.current ram.percent heap.max heap.current heap.percent uptime file_desc.max file_desc.percent refresh.time segments.count 
prod-data-node-1 1.5.2 9300 0.47 31.5gb 31.2gb 61 15.9gb 5.7gb 36 10.5d 65535 86 7.9h 28055 
prod-data-node-3 1.5.2 9300 0.21 31.3gb 31gb 61 15.9gb 4.4gb 27 7d 65535 86 5.7h 28033 
prod-data-node-2 1.5.2 9300 0.39 31.3gb 31gb 61 15.9gb 10.5gb 66 7d 65535 87 4.7h 28176

```

![](https://us1.discourse-cdn.com/elastic/original/3X/2/3/230f694019d20274acc844d77ee6072e2d2010e0.png)

As per free -m, API should show more than 90% ram.percent because free memory is only 286MB.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 11, 2017, 2:33pm UTC](https://discuss.elastic.co/t/es-health/81823/5 "2017-04-11T14:33:47Z")

</div>

As you can see, there is a huge amount of memory in the `cached` column, which means it is very likely in use by the linux page cache aka the file system cache. This is the reason why you should only assign a maximum of half of your main memory to the heap.

--Alex

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 12, 2017, 12:59pm UTC](https://discuss.elastic.co/t/es-health/81823/6 "2017-04-12T12:59:31Z")

</div>

Hi,  
file\_desc.percent is 87 now.

Is it indication that its going to increase day by day and I have to reduce that. I feer that I will get "too many open files" error very soon, if it increased further and the cluster will be down.

How to control this?

br,  
Sunil

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 12, 2017, 1:04pm UTC](https://discuss.elastic.co/t/es-health/81823/7 "2017-04-12T13:04:12Z")

</div>

How many shards do you have in the cluster?

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 12, 2017, 1:29pm UTC](https://discuss.elastic.co/t/es-health/81823/8 "2017-04-12T13:29:59Z")

</div>

Hi,

I have 3 node cluster  
Each has 32 GB RAM. 16 GB allocated to ES\_HEAP

Total shards: 17141  
Indices: 2091

Index setting:  
3 shards  
1 replica  
Means total 6 shards per index. This may not match with total shards 17141, because previous setting was different (3 shards, 3 replicas)

br,  
Sunil.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 12, 2017, 1:32pm UTC](https://discuss.elastic.co/t/es-health/81823/9 "2017-04-12T13:32:45Z")

</div>

17141 shards across 3 nodes is a lot of shards for each node to handle, and explains the large number of file handles used. What is the average shard size?

---

<div class="post-metadata">

**Author:** ![sunilmchaudhari](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunilmchaudhari/32/9475_2.png) [@sunilmchaudhari](https://discuss.elastic.co/u/sunilmchaudhari)\
**Post date:** [April 12, 2017, 1:33pm UTC](https://discuss.elastic.co/t/es-health/81823/10 "2017-04-12T13:33:50Z")

</div>

Some are in GB, and some are in KB

---

<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:** [May 10, 2017, 1:35pm UTC](https://discuss.elastic.co/t/es-health/81823/11 "2017-05-10T13:35:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
