Q:有两个人掉到陷阱里了,死的人叫死人,活人叫什么?

Elasticsearch文本搜索耗时异常

Elasticsearch | 作者 battlescars | 发布于2019年11月28日 | 阅读数:906

本人部署了一套单节点的测试集群,主要用于测试搜索速度,部署方式采取容器化的形式,大概参数如下:
1. JVM大小设置的31G,
2. 容器申请的物理内存为47G
3. cpu: 15核
4. 硬盘机械盘:40G
5. 索引文档数量为8k左右,只有一个分片,分片大小大概为12.3 MB
文本搜索示例(在容器里面执行curl)
curl -w "\ntime_namelookup:  %{time_namelookup}\ntime_connect:  %{time_connect}\ntime_appconnect:  %{time_appconnect}\ntime_pretransfer:  %{time_pretransfer}\ntime_redirect:  %{time_redirect}\ntime_starttransfer:  %{time_starttransfer}\n----------\ntime_total:  %{time_total}\n\n" -X GET "http://localhost:9200/index_a/_search" -H 'Content-Type: application/json' -d'{"query":{"match":{"question":"你好"}}}'
返回的结果中:
took字段的值为4,请求过程的耗时打印如下
time_namelookup:  0.004
time_connect: 0.004
time_appconnect: 0.000
time_pretransfer: 0.005
time_redirect: 0.000
time_starttransfer: 0.041
time_total: 0.041
其中server耗时应该是0.041-0.005=0.036,也就是36ms,出去es took的时间还有32ms不知道是做什么操作,想请问各位大神,多出来的32ms是在做什么操作?
已邀请:

five

赞同来自:

https://discuss.elastic.co/t/q ... /9870
took只是es内部执行查询的时间

要回复问题请先登录注册