Elasticsearch 性能监控与扩展指南
1. 控制当前运行的基准测试
在执行基准测试时,一个包含多个查询且重复数千次的基准测试命令可能需要运行数分钟甚至数小时。为了方便了解测试进度和预估测试完成时间,Elasticsearch 提供了相应的信息。
查看测试进度
要获取测试进度信息,只需运行以下命令:
curl -XGET 'localhost:9200/_bench?pretty'该命令的输出示例如下:
{ "active_benchmarks" : { "firstTest" : { "status" : "RUNNING", "errors" : [ ], "competitors" : { "post_filter" : { "summary" : { "nodes" : [ "James Proudstar" ], "total_iterations" : 5, "completed_iterations" : 3, "total_queries" : 3000, "concurrency" : 5, "multiplier" : 1000, "avg_warmup_time" : 137.0,