2017-09-25 14 views
0

よりよく質問の対象となるようにtopicを作成してください。ElasticSearch 100%CPU

WindowsサービスとしてElasticSearch 5.4.0を使用しています。 16 GB RAMのWindows Server 2016コマンドを使ってインストール

:elasticsearch-service.batマネージャ

Javaオプション:

-Xms8g 
-Xmx8g 
-XX:+UseConcMarkSweepGC 
-XX:CMSInitiatingOccupancyFraction=75 
-XX:+UseCMSInitiatingOccupancyOnly 
-XX:+DisableExplicitGC 
-XX:+AlwaysPreTouch 
-Xss1m 
-Djava.awt.headless=true 
-Dfile.encoding=UTF-8 
-Djna.nosys=true 
-Djdk.io.permissionsUseCanonicalPath=true 
-Dio.netty.noUnsafe=true 
-Dio.netty.noKeySetOptimization=true 
-Dio.netty.recycler.maxCapacityPerThread=0 
-Dlog4j.shutdownHookEnabled=false 
-Dlog4j2.disable.jmx=true 
-Dlog4j.skipJansi=true 
-Delasticsearch 
-Des.path.home=C:\elasticsearch 
-Des.default.path.logs=C:\elasticsearch\logs 
-Des.default.path.data=C:\elasticsearch\data 
-Des.default.path.conf=C:\elasticsearch\config 

初期メモリプール:8192メガバイト

最大メモリプール:8192メガバイト

スレッド・スタックサイズ:1024 KB。

norconexクローラを使用してインデックスを作成した後のデータで一杯になります。作業が終了した後は、常にタスクマネージャーでほぼ100%の処理が行われます。場合によっては0%または25%に下がりますが、1分後には95%に戻ります。

[2017-09-25T16:23:13,166][INFO ][o.e.m.j.JvmGcMonitorService] [Zugx4zq] [gc][9415] overhead, spent [364ms] collecting in the last [1s] 
[2017-09-25T16:23:14,534][INFO ][o.e.m.j.JvmGcMonitorService] [Zugx4zq] [gc][9416] overhead, spent [647ms] collecting in the last [1.3s] 
[2017-09-25T16:23:15,550][INFO ][o.e.m.j.JvmGcMonitorService] [Zugx4zq] [gc][9417] overhead, spent [397ms] collecting in the last [1s] 
[2017-09-25T16:23:16,708][WARN ][o.e.m.j.JvmGcMonitorService] [Zugx4zq] [gc][9418] overhead, spent [657ms] collecting in the last [1.1s] 
[2017-09-25T16:23:17,745][INFO ][o.e.m.j.JvmGcMonitorService] [Zugx4zq] [gc][9419] overhead, spent [494ms] collecting in the last [1s] 

要求が長すぎるかexeptionで失敗した実行:

ElasticSearch.logファイルは、このタイプのレコードで満たされている

org.elasticsearch.transport.RemoteTransportException: [Zugx4zq][127.0.0.1:9300][indices:data/read/search[phase/query]] 
Caused by: org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution of [email protected] on EsThreadPoolExecutor[search, queue capacity = 1000, [email protected]fa409f[Running, pool size = 7, active threads = 7, queued tasks = 1000, completed tasks = 93134]] 

org.elasticsearch.transport.RemoteTransportException: [Zugx4zq][127.0.0.1:9300][indices:data/read/search[phase/query]] 
Caused by: org.elasticsearch.common.util.concurrent.EsRejectedExecutionException: rejected execution of [email protected] on EsThreadPoolExecutor[search, queue capacity = 1000, [email protected]fa409f[Running, pool size = 7, active threads = 7, queued tasks = 1000, completed tasks = 118501]] 

は、私が理解しdont't誰ロードのこの種を生成しますこのサービスでこのタスクはどこから(どこにあるタスク= 1000)ですか?サービスの読み込みを監視する方法どのようなサービスの微調整私が逃した?私はDevOpsや専門のシステム管理者ではありません。私は.netプログラマですので、このJavaアプリケーションはすべて私のために暗い木です。

UPDATE

サーバーのRAMは32GBまで増加しました。ヒープサイズが24 GBに変更されました。 CPU使用率が最小値に低下しました。これは不思議です.17k文書のサイズは1.1GBで、ヒープサイズは8GBではありません。

答えて

0

あなたは実際にあなたの時間を費やしている場所を知りたいと思います。最も簡単なのは、監視プラグインを使用することです.KibanaとX-Pack監視プラグインが必要です(無料で利用できます)。一部のスクリーンショットではhttps://www.elastic.co/products/x-pack/monitoringを参照してください。

PS:クイックルックでは、デフォルトのJVMオプションを使用しています。これは一般的に良いです。野生の微調整を開始しないでください、彼らはしばしば状況を悪化させます。

+0

つだけ微調整は、サーバーのRAMのサイズを大きくし、24ギガバイトにヒープサイズを増やし、インストールkibanaすることです+ x-pack、今すぐスムーズに作業してください。 – aleha