# 100% CPU Usage

**URL:** <https://discuss.elastic.co/t/100-cpu-usage/6213>\
**Category:** Elasticsearch\
**Created:** [December 21, 2011, 7:24pm UTC](https://discuss.elastic.co/t/100-cpu-usage/6213 "2011-12-21T19:24:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaun\_Farrell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaun_farrell/32/2827_2.png) [@Shaun\_Farrell](https://discuss.elastic.co/u/Shaun_Farrell)\
**Post date:** [December 21, 2011, 7:24pm UTC](https://discuss.elastic.co/t/100-cpu-usage/6213/1 "2011-12-21T19:24:05Z")

</div>

I have elasticsearch installed on a AWS box. I am doing some testing  
with it. Indexing like 3K records. All text. I kick off an indexing  
with Elastica and after about 15 seconds JAVA goes to 100% CPU.  
Memory is consistant at about 37%

It's a micro box and I have the following configs and settings

Elastic Search 0.18.5  
ES\_MIN and ES\_MAX 256 - 300  
Using the Elasticsearch service wrapper  
bootstrap.mlockall: true  
java version "1.6.0\_20"

I'm just looking for figure out how to not make java take up 100 % of  
the CPU.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 22, 2011, 12:48am UTC](https://discuss.elastic.co/t/100-cpu-usage/6213/2 "2011-12-22T00:48:15Z")

</div>

If you stop indexing, does the CPU go down? Maybe its just the load of the  
indexing that takes all that CPU on the micro instance (which is, well,  
micro 🙂 ).

On Wed, Dec 21, 2011 at 9:24 PM, Shaun Farrell [farrelley@gmail.com](mailto:farrelley@gmail.com) wrote:

> I have elasticsearch installed on a AWS box. I am doing some testing  
> with it. Indexing like 3K records. All text. I kick off an indexing  
> with Elastica and after about 15 seconds JAVA goes to 100% CPU.  
> Memory is consistant at about 37%
> 
> It's a micro box and I have the following configs and settings
> 
> Elastic Search 0.18.5  
> ES\_MIN and ES\_MAX 256 - 300  
> Using the Elasticsearch service wrapper  
> bootstrap.mlockall: true  
> java version "1.6.0\_20"
> 
> I'm just looking for figure out how to not make java take up 100 % of  
> the CPU.
> 
> Any thoughts?

---

<div class="post-metadata">

**Author:** ![Douglas\_Muth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/douglas_muth/32/29006_2.png) [@Douglas\_Muth](https://discuss.elastic.co/u/Douglas_Muth)\
**Post date:** [December 22, 2011, 1:06am UTC](https://discuss.elastic.co/t/100-cpu-usage/6213/3 "2011-12-22T01:06:22Z")

</div>

On Wed, Dec 21, 2011 at 7:48 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> If you stop indexing, does the CPU go down? Maybe its just the load of the  
> indexing that takes all that CPU on the micro instance (which is, well,  
> micro 🙂 ).

Indeed, from my experience with micro instances, you can get up to 2  
EC units of computing power in "burst mode" for a few seconds, with  
the CPU then being completely starved for the next several seconds.  
(to the point that the machine won't even respond to ping, actually)

My suggestion for the original poster would be to try using a small  
instance instead. You'll get 1 EC compute unit with that, but you can  
use the CPU at 100% without any sort of throttling like what the micro  
instances have.

Best,

-- Doug  
[http://twitter.com/dmuth](http://twitter.com/dmuth)

---

<div class="post-metadata">

**Author:** ![Ben\_Hall](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@Ben\_Hall](https://discuss.elastic.co/u/Ben_Hall)\
**Post date:** [December 23, 2011, 3:08am UTC](https://discuss.elastic.co/t/100-cpu-usage/6213/4 "2011-12-23T03:08:16Z")

</div>

Hello,

From my experience it's the JVM which is really unhappy on the micro  
instances as I had a similar problem when using HBase. I've tried even  
creating it as a small and returning it to a micro but had same  
problem.

I'm currently using a small EC2 instance which works fine. When under  
heavy load it does go up-to 100% but behaves like a normal box.

Hope it helps.

Ben

On Dec 22, 1:06 am, Douglas Muth [doug.m...@gmail.com](mailto:doug.m...@gmail.com) wrote:

> On Wed, Dec 21, 2011 at 7:48 PM, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > If you stop indexing, does the CPU go down? Maybe its just the load of the  
> > indexing that takes all that CPU on the micro instance (which is, well,  
> > micro 🙂 ).
> 
> Indeed, from my experience with micro instances, you can get up to 2  
> EC units of computing power in "burst mode" for a few seconds, with  
> the CPU then being completely starved for the next several seconds.  
> (to the point that the machine won't even respond to ping, actually)
> 
> My suggestion for the original poster would be to try using a small  
> instance instead. You'll get 1 EC compute unit with that, but you can  
> use the CPU at 100% without any sort of throttling like what the micro  
> instances have.
> 
> Best,
> 
> -- Doughttp://twitter.com/dmuth

---

<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, 3:44am UTC](https://discuss.elastic.co/t/100-cpu-usage/6213/5 "2017-07-06T03:44:28Z")

</div>


