user5448212
user5448212

Reputation:

Elasticsearch High CPU and RAM usage

I am a newbie in this area. I have setup elasticsearch. It works fine but the cpu usage and memory used becomes very high. This is hampering the servers performance. This is my elastic search version

{
  "status" : 200,
  "name" : "Aireo",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.4.4",
    "build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
    "build_timestamp" : "2015-02-19T13:05:36Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.3"
  },
  "tagline" : "You Know, for Search"
}

Server config:

cpu family  : 6
model       : 62
model name  : Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz
stepping    : 4
microcode   : 0x1
cpu MHz     : 2399.998
cache size  : 15360 KB
MemTotal:        2049964 kB
MemFree:          122056 kB
Buffers:           77396 kB
Cached:           184528 kB
SwapCached:            0 kB
Active:          1685792 kB
Inactive:         139420 kB
Active(anon):    1569940 kB
Inactive(anon):     8332 kB
Active(file):     115852 kB
Inactive(file):   131088 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB

System usage:

 PID  USER      PR      NI    VIRT        RES          SHR     S    %CPU     %MEM       TIME+      COMMAND
27029 elastic+  20      0     4361248     1.186g       7372    S     110.7    60.7       1037:36    java  

_nodes/stats/jvm

{  
   "cluster_name":"elasticsearch",
   "nodes":{  
      "cYUNisljRXmeLSiMk6kY_Q":{  
         "timestamp":1450761255965,
         "name":"Aireo",
         "transport_address":"inet[128.199.229.70/128.199.229.70:9300]",
         "host":"TLM",
         "ip":[  
            "inet[128.199.229.70/128.199.229.70:9300]",
            "NONE"
         ],
         "jvm":{  
            "timestamp":1450761255965,
            "uptime_in_millis":64493824,
            "mem":{  
               "heap_used_in_bytes":1051633552,
               "heap_used_percent":99,
               "heap_committed_in_bytes":1056309248,
               "heap_max_in_bytes":1056309248,
               "non_heap_used_in_bytes":85983832,
               "non_heap_committed_in_bytes":87912448,
               "pools":{  
                  "young":{  
                     "used_in_bytes":139591680,
                     "max_in_bytes":139591680,
                     "peak_used_in_bytes":139591680,
                     "peak_max_in_bytes":139591680
                  },
                  "survivor":{  
                     "used_in_bytes":12757624,
                     "max_in_bytes":17432576,
                     "peak_used_in_bytes":17432576,
                     "peak_max_in_bytes":17432576
                  },
                  "old":{  
                     "used_in_bytes":899284872,
                     "max_in_bytes":899284992,
                     "peak_used_in_bytes":899284992,
                     "peak_max_in_bytes":899284992
                  }
               }
            },
            "threads":{  
               "count":50,
               "peak_count":52
            },
            "gc":{  
               "collectors":{  
                  "young":{  
                     "collection_count":844,
                     "collection_time_in_millis":4550
                  },
                  "old":{  
                     "collection_count":20606,
                     "collection_time_in_millis":54410384
                  }
               }
            },
            "buffer_pools":{  
               "direct":{  
                  "count":49,
                  "used_in_bytes":6269492,
                  "total_capacity_in_bytes":6269492
               },
               "mapped":{  
                  "count":1202,
                  "used_in_bytes":863065239,
                  "total_capacity_in_bytes":863065239
               }
            }
         }
      }
   }
}

I am using the default configuration in the elasticsearch xml. Thanks in advance

Upvotes: 3

Views: 6370

Answers (1)

Pandiyan Cool
Pandiyan Cool

Reputation: 6565

By default, Elasticsearch contains 1 GB heap size by default.

For just about every deployment, this number is far too small. If you are using the default heap values, your cluster is probably configured incorrectly.

You need to increase your RAM or you can reduce Heap Size(if you playing with small amount of data)

Setting Heap Size

Upvotes: 1

Related Questions