Elasticsearch高CPU和RAM使用率

时间:2015-12-22 05:19:35

标签: elasticsearch

我是这个领域的新手。我已经设置了elasticsearch。它工作正常,但使用的CPU使用和内存变得非常高。这妨碍了服务器性能。这是我的弹性搜索版本

{
  "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"
}

服务器配置:

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

系统使用:

 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 /统计/ 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
               }
            }
         }
      }
   }
}

我在elasticsearch xml中使用默认配置。 提前致谢

1 个答案:

答案 0 :(得分:0)

默认情况下, Elasticsearch 默认包含1 GB的堆大小。

  

对于几乎每个部署,这个数字都太小了。如果你   正在使用默认堆值,您的群集可能已配置   不正确。

你需要增加内存,或者你可以减少堆大小(如果你玩少量数据)

Setting Heap Size