# Memory usage increased to more than 90 while running Elastic search service on window machine

**URL:** <https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590>\
**Category:** Elasticsearch\
**Created:** [May 17, 2019, 12:01pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590 "2019-05-17T12:01:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 17, 2019, 12:01pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/1 "2019-05-17T12:01:36Z")

</div>

Hi Team,

Memory usage increased to more than 90 while running Elastic search service on window machine.  
I am using elastic version 7.0.1 / my system RAM is 4gb.

Can you please help me how to handle / what configuration need to use in elastic search config file.  
In the task-bar java JVM taking so much memory usage.  
Also try to set these setting in jvm.option config fileç

## You should always set the min and max JVM heap

## size to the same value. For example, to set

## the heap to 4 GB, set:

## 

-Xms2g  
-Xmx2g

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 17, 2019, 12:30pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/2 "2019-05-17T12:30:42Z")

</div>

What is the output of:

```auto
GET /_cat/health?v
GET /_cat/indices?v
GET /_cat/shards?v

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 17, 2019, 2:14pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/6 "2019-05-17T14:14:16Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 17, 2019, 4:53pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/7 "2019-05-17T16:53:29Z")

</div>

Hi David,  
Sorry for the wrong format.

I am facing network issue, So I coudn't connect with the elasticsearch server right now.

Once it get start working I will share all the details.  
Meanwhile can you share some general config setting which we need to take care for elastic search config to improve performance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 17, 2019, 6:41pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/8 "2019-05-17T18:41:07Z")

</div>

Defaults are good in general.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 20, 2019, 11:49am UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/9 "2019-05-20T11:49:02Z")

</div>

Hi @dadoonet,  
I have just uninstall & then re-install the elastic-search version 7.0.1 in my window machine.  
When I run this service. In the task bar the physical memory reserved by the Java(TM) Platform SE binary version (jre-8u201) is 93 %. File-beat service has been stop at this moment.

I am not using any custom index to verify this issue.

How can I control this ?

I appreciate your help.  
Result of GET \_cat/health?v:

```
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1558352777 11:46:17 elasticsearch green 1 1 2 2 0 0 0 0 - 100.0%

```

GET /\_cat/indices?v:

```
  health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open .kibana_task_manager Ld6OEiyxTmqlqlyAUKPCkA 1 0 2 4 45kb 45kb
green open .kibana_1 AALbkTVAQLa7XIAI87b5Yg 1 0 3 0 13.9kb 13.9kb

```

Output of GET /\_cat/shards?v:

```
index shard prirep state docs store ip node
.kibana_1 0 p STARTED 3 14.2kb 127.0.0.1 DEV-APP
.kibana_task_manager 0 p STARTED 2 45.6kb 127.0.0.1 DEV-APP

```

Let me know if you require more information.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 20, 2019, 11:56am UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/10 "2019-05-20T11:56:47Z")

</div>

> [@Sharma3007](#):
>
> When I run this service. In the task bar the physical memory reserved by the Java(TM) Platform SE binary version (jre-8u201) is 93 %.

Can you share how much memory the jvm is using.?  
Also, I'd recommend using a more recent JVM. I believe that Elasticsearch now ships a default one with the distribution so I'd use that one instead.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 20, 2019, 12:09pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/11 "2019-05-20T12:09:02Z")

</div>

JVM using 60% memory.

So Ideally which version we need to use for 7.0.1 version?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 20, 2019, 12:22pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/12 "2019-05-20T12:22:07Z")

</div>

> [@Sharma3007](#):
>
> JVM using 60% memory.

But can you share what does in mean in Mb or gb? Not something that you compute but something that comes from Windows itself. May be a screen capture?

> So Ideally which version we need to use for 7.0.1 version?

As per [Support Matrix | Elastic](https://www.elastic.co/support/matrix#matrix_jvm), an Oracle/Open JDK 12.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 20, 2019, 12:32pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/13 "2019-05-20T12:32:01Z")

</div>

Thanks for the support .

Give me a half an hour. I am traveling to home now.  
The memory using by JVM is arround 2gb aprox.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 20, 2019, 12:54pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/14 "2019-05-20T12:54:43Z")

</div>

That sounds correct as you set `2gb` in the configuration file.  
What is the problem then?

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 20, 2019, 1:36pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/15 "2019-05-20T13:36:42Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/8/a8f900a2d7b40b07ddc8f3d203ef37edba28146f.png)

This is the actual one.

JVM version: jre1.8.0\_211

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 20, 2019, 1:49pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/16 "2019-05-20T13:49:05Z")

</div>

So you asked to use 2gb. It is using 2gb.  
What's wrong?

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 20, 2019, 1:55pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/17 "2019-05-20T13:55:00Z")

</div>

Its taking little bit more than 2gb. if I am not wrong.  
Issue is that While running elastic search it is consuming 97 % memory.

Ok, Got it, If I stop running ELK the system taking 48 %.

So If i use 1gb, Can we control this about to 70-80%?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 20, 2019, 3:11pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/18 "2019-05-20T15:11:19Z")

</div>

> [@Sharma3007](#):
>
> Issue is that While running Elasticsearch it is consuming 97 % memory.

That's inexact. It's not elasticsearch which is consuming 97% of the memory but Elasticsearch + all the other processes which are running on your machine.  
Proof is:

> [@Sharma3007](#):
>
> Ok, Got it, If I stop running ELK the system taking 48 %.

Yeah. You have yet half of the memory resources of your machine used by windows and other programs.  
My guess is that is not a production machine, right?

> So If i use 1gb, Can we control this about to 70-80%?

If you use 1gb, then elasticsearch will use 1gb. If other processes uses 3gb, then you will use 100% of the RAM.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 20, 2019, 3:43pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/19 "2019-05-20T15:43:09Z")

</div>

Yes , its not a production env.  
If I use 1gb then cpu usage increase.

I think 2gb is correct.

What else we need to set in elastic search.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 20, 2019, 4:57pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/20 "2019-05-20T16:57:48Z")

</div>

So if it's a dev environment, why do you care so much?

Anyway it's always better (and a best practice) to isolate elasticsearch from any other process. Ie, only elasticsearch should be running on your machine.

If you have only 1gb, then you should have a few number of indices / shards and not a big volume of data.

---

<div class="post-metadata">

**Author:** ![Sharma3007](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharma3007/32/43414_2.png) [@Sharma3007](https://discuss.elastic.co/u/Sharma3007)\
**Post date:** [May 20, 2019, 5:07pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/21 "2019-05-20T17:07:59Z")

</div>

Thanks for your Support David,

Actually I am new in ELK and its my responsibility to implement centralized logging in our application. so its a good practice to know about elastic search pros & cons before we move to the production env. Before we move on production We want to check all the area or gap.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 20, 2019, 6:07pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/22 "2019-05-20T18:07:11Z")

</div>

That's a good idea to check that indeed.  
That looks a bad idea to draw conclusions on a system which is not the target though.

To start quick and easy you can also think of using our [cloud.elastic.co](http://cloud.elastic.co) service.

---

<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:** [June 17, 2019, 6:09pm UTC](https://discuss.elastic.co/t/memory-usage-increased-to-more-than-90-while-running-elastic-search-service-on-window-machine/181590/23 "2019-06-17T18:09:55Z")

</div>

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