# Elasticsearch high CPU

**URL:** <https://discuss.elastic.co/t/elasticsearch-high-cpu/80832>\
**Category:** Elasticsearch\
**Created:** [March 31, 2017, 3:09pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu/80832 "2017-03-31T15:09:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmelton](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmelton/32/16568_2.png) [@rmelton](https://discuss.elastic.co/u/rmelton)\
**Post date:** [March 31, 2017, 3:09pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu/80832/1 "2017-03-31T15:09:49Z")

</div>

I see a bunch of posts about high CPU utilization but after reading a few i don't  
see a remedy.

I installed filebeat on 5 OpenStack servers and put ELK Stack (5.2.2) on a 6th machine which also  
serves as a login server running XRDP so that i can use the OpenStack thru RDP from  
windows. Elasticsearch after instaling ELK is hard to connect with RDP (works about 1 time in  
10). I assume this is because of elastic high CPU utilization (always over 100%).

The login server (with ELK stack) is dual Xeon with 12 physical cores (no hyper threading).

I attached capture of 'top' showing CPU utilization .

 ![](https://us1.discourse-cdn.com/elastic/original/3X/c/4/c41b233076568c58b19548baca01aa6a4924435f.jpg)

I added some of the elasticsearch hot\_threads output below. editor would let me add all  
hot\_threads output.

Is it bad practice to install elastic search on a machine that servers RDP? Is there a way to  
reduce elastic search CPU utilization? What is the latest thinking on managing elastic  
CPU% ?

thx,  
Rod

* * *

here is elasticsearch output  
{  
"name" : "NZK5rQN",  
"cluster\_name" : "elasticsearch",  
"cluster\_uuid" : "pQmLGu2oSdqPz6T7JgUFeA",  
"version" : {  
"number" : "5.2.2",  
"build\_hash" : "f9d9b74",  
"build\_date" : "2017-02-24T17:26:45.835Z",  
"build\_snapshot" : false,  
"lucene\_version" : "6.4.1"  
},  
"tagline" : "You Know, for Search"  
}

-------------------------------- hot\_ threads output ---------------------------------------------------------  
::: {NZK5rQN}{NZK5rQNsSDi1pklwhr9kXw}{LrRHfoieRCaYd04Zw\_Zp7g}{localhost}{[::1]:9300}  
Hot threads at 2017-03-31T14:39:11.761Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true:

84.0% (419.8ms out of 500ms) cpu usage by thread 'elasticsearch[NZK5rQN][management][T#5]'  
3/10 snapshots sharing following 56 elements  
java.security.AccessController.getStackAccessControlContext(Native Method)  
java.security.AccessController.checkPermission(AccessController.java:858)  
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)  
java.lang.SecurityManager.checkRead(SecurityManager.java:888)  
sun.nio.fs.UnixPath.checkRead(UnixPath.java:795)  
sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:49)  
sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)  
sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)  
java.nio.file.Files.readAttributes(Files.java:1737)  
java.nio.file.Files.size(Files.java:2332)  
org.apache.lucene.store.FSDirectory.fileLength(FSDirectory.java:243)  
org.apache.lucene.store.FilterDirectory.fileLength(FilterDirectory.java:67)  
org.apache.lucene.store.FilterDirectory.fileLength(FilterDirectory.java:67)  
org.elasticsearch.index.store.Store$StoreStatsCache.estimateSize(Store.java:1373)  
org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1362)  
org.elasticsearch.index.store.Store$StoreStatsCache.refresh(Store.java:1349)  
org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:54)  
org.elasticsearch.index.store.Store.stats(Store.java:301)  
org.elasticsearch.index.shard.IndexShard.storeStats(IndexShard.java:703)  
org.elasticsearch.action.admin.indices.stats.CommonStats.(CommonStats.java:177)  
org.elasticsearch.action.admin.cluster.stats.TransportClusterStatsAction.nodeOperation(TransportClusterStatsAction.java:104)  
org.elasticsearch.action.admin.cluster.stats.TransportClusterStatsAction.nodeOperation(TransportClusterStatsAction.java:53)  
org.elasticsearch.action.support.nodes.TransportNodesAction.nodeOperation(TransportNodesAction.java:145)  
org.elasticsearch.action.support.nodes.TransportNodesAction$NodeTransportHandler.messageReceived(TransportNodesAction.java:270)  
org.elasticsearch.action.support.nodes.TransportNodesAction$NodeTransportHandler.messageReceived(TransportNodesAction.java:266)  
org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$1.doRun(SecurityServerTransportInterceptor.java:237)  
org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)  
org.elasticsearch.common.util.concurrent.EsExecutors$1.execute(EsExecutors.java:109)  
org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler.lambda$messageReceived$0(SecurityServerTransportInterceptor.java:289)  
org.elasticsearch.xpack.security.transport.SecurityServerTransportInterceptor$ProfileSecuredRequestHandler$$Lambda$1538/1903947112.accept(Unknown Source)  
org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:56)  
org.elasticsearch.xpack.security.transport.ServerTransportFilter$NodeProfile.lambda$null$2(ServerTransportFilter.java:164)  
org.elasticsearch.xpack.security.transport.ServerTransportFilter$NodeProfile$$Lambda$1544/278447279.accept(Unknown Source)  
org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.maybeRun(AuthorizationUtils.java:127)  
org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.setRunAsRoles(AuthorizationUtils.java:121)  
org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.authorize(AuthorizationUtils.java:109)

---

<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 28, 2017, 3:09pm UTC](https://discuss.elastic.co/t/elasticsearch-high-cpu/80832/2 "2017-04-28T15:09:49Z")

</div>

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