# Elastic search data node java process is consuming high virtual memory

**URL:** <https://discuss.elastic.co/t/elastic-search-data-node-java-process-is-consuming-high-virtual-memory/225347>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring, elastic-stack-alerting\
**Created:** [March 27, 2020, 7:42am UTC](https://discuss.elastic.co/t/elastic-search-data-node-java-process-is-consuming-high-virtual-memory/225347 "2020-03-27T07:42:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krish\_7](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@Krish\_7](https://discuss.elastic.co/u/Krish_7)\
**Post date:** [March 27, 2020, 7:42am UTC](https://discuss.elastic.co/t/elastic-search-data-node-java-process-is-consuming-high-virtual-memory/225347/1 "2020-03-27T07:42:19Z")

</div>

Hi Team,

we have elastic data node which is triggering alerts for high virtual memory , upon checking i could see below stats in server .

top - 07:25:19 up 549 days, 15 min, 4 users, load average: 0.76, 0.88, 0.90  
Tasks: 373 total, 2 running, 370 sleeping, 0 stopped, 1 zombie  
%Cpu(s): 6.9 us, 0.5 sy, 0.0 ni, 92.3 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st  
KiB Mem : 32680152 total, 322644 free, 26089360 used, 6268148 buff/cache  
KiB Swap: 0 total, 0 free, 0 used. 12166028 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND  
27684 elastic+ 20 0 420.3g 18.7g 918092 S 116.6 60.0 1225:35 java  
3483 root 20 0 1851796 17104 2432 S 0.0 0.1 32:18.03 nsrexecd  
1402 root 20 0 1606604 9200 6432 S 0.0 0.0 18:51.67 rsyslogd  
1399 root 20 0 1546900 39028 1432 S 0.0 0.1 659:27.46 dockerd  
1465 root 20 0 1245960 16316 940 S 0.0 0.0 1233:56 docker-containe  
20243 root 20 0 1205852 10868 708 S 0.0 0.0 642:12.79 falcon-sensor  
1404 root 20 0 553704 10700 0 S 0.0 0.0 70:51.89 tuned  
1148 polkitd 20 0 534560 6968 0 S 0.0 0.0 28:45.88 polkitd  
740 root 20 0 473756 4380 680 S 0.0 0.0 0:25.52 lvmetad

JVM allocation in our server

Xms represents the initial size of total heap space  
Xmx represents the maximum size of total heap space

-Xms16g  
-Xmx16g

Memory information :  
MemTotal: 32680152 kB  
MemFree: 266612 kB  
MemAvailable: 12162172 kB  
Buffers: 1028 kB  
Cached: 5051604 kB  
SwapCached: 0 kB  
Active: 25068084 kB  
Inactive: 5702052 kB  
Active(anon): 19442440 kB  
Inactive(anon): 143992 kB  
Active(file): 5625644 kB  
Inactive(file): 5558060 kB  
Unevictable: 0 kB  
Mlocked: 0 kB  
SwapTotal: 0 kB  
SwapFree: 0 kB  
Dirty: 172704 kB  
Writeback: 0 kB  
AnonPages: 19564384 kB  
Mapped: 1518900 kB  
Shmem: 22048 kB  
Slab: 1229088 kB  
SReclaimable: 1012552 kB  
SUnreclaim: 216536 kB  
KernelStack: 14768 kB  
PageTables: 193808 kB  
NFS\_Unstable: 0 kB  
Bounce: 0 kB  
WritebackTmp: 0 kB  
CommitLimit: 16340076 kB  
Committed\_AS: 20399940 kB  
VmallocTotal: 34359738367 kB  
VmallocUsed: 216428 kB  
VmallocChunk: 34359339004 kB  
HardwareCorrupted: 0 kB  
AnonHugePages: 366592 kB  
CmaTotal: 0 kB  
CmaFree: 0 kB  
HugePages\_Total: 0  
HugePages\_Free: 0  
HugePages\_Rsvd: 0  
HugePages\_Surp: 0  
Hugepagesize: 2048 kB  
DirectMap4k: 12517248 kB  
DirectMap2M: 19988480 kB  
DirectMap1G: 3145728 kB

Our monitoring tool service metrics :  
Service Metrics active=25593479168;;;; active\_anon=19892379648;;;; active\_file=5701099520;;;; anon\_huge\_pages=375390208;;;; anon\_pages=20016943104;;;; bounce=0;;;; buffers=4505600;;;; cached=4854808576;;;; caches=5900533760;;;; cma\_free=0;;;; cma\_total=0;;;; commit\_limit=16732237824;;;; committed\_as=20859682816;;;; dirty=165269504;;;; hardware\_corrupted=0;;;; inactive=5756665856;;;; inactive\_anon=147447808;;;; inactive\_file=5609218048;;;; kernel\_stack=15024128;;;; mapped=880381952;;;; mem\_available=12464586752;;;; mem\_free=420962304;;;; mem\_total=33464475648;;;; mem\_used=27142979584;;;; mlocked=0;;;; nfs\_unstable=0;;;; page\_tables=195354624;;;; pending=165273600;;;; sreclaimable=1041219584;;;; sunreclaim=221757440;;;; shmem=22577152;;;; slab=1262977024;;;; swap\_cached=0;;;; swap\_free=0;;;; swap\_total=0;;;; swap\_used=0;;;; total\_total=33464475648;;;; total\_used=27142979584;;;; unevictable=0;;;; writeback=4096;;;; writeback\_tmp=0;;;;

Please let us know what might be triggering this alerts , please let us know do we need to change any thing in our server end .

Regards,  
Krishna

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 27, 2020, 1:57pm UTC](https://discuss.elastic.co/t/elastic-search-data-node-java-process-is-consuming-high-virtual-memory/225347/2 "2020-03-27T13:57:06Z")

</div>

> [@Krish\_7](#):
>
> ```auto
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 27684 elastic+ 20 0 420.3g 18.7g 918092 S 116.6 60.0 1225:35 java
> 
> ```

Looks reasonable to me. Why is this a problem?

---

<div class="post-metadata">

**Author:** ![Krish\_7](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@Krish\_7](https://discuss.elastic.co/u/Krish_7)\
**Post date:** [March 30, 2020, 7:40am UTC](https://discuss.elastic.co/t/elastic-search-data-node-java-process-is-consuming-high-virtual-memory/225347/3 "2020-03-30T07:40:39Z")

</div>

Thanks for looking into this @DavidTurner

I have set up threshold limit in our monitoring tool for warning 80 % critical 90%. which is triggering alerts do i need to change these threshold limits?

WARN - RAM used: 25.06 GB of 31.17 GB (80.4%), Total virtual memory used: 25.06 GB of 31.17 GB (80.4%, warn/crit at 80.0%/90.0%) **WARN**

any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 30, 2020, 9:21am UTC](https://discuss.elastic.co/t/elastic-search-data-node-java-process-is-consuming-high-virtual-memory/225347/4 "2020-03-30T09:21:59Z")

</div>

You still haven't explained why this is a problem.

---

<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:** [April 27, 2020, 9:22am UTC](https://discuss.elastic.co/t/elastic-search-data-node-java-process-is-consuming-high-virtual-memory/225347/5 "2020-04-27T09:22:13Z")

</div>

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