I test my program with high pressure of 1500 request per second and
each request need to do a es query(i use MatchAllQuery and a bunch of
filters as filters can be cached). The size of the index is 106.7kb
with 200 documents. I start my es with paramters: bin/elasticsearch -
Xms2g -Xmx2g -Des.max-open-files=true -Dbootstrap.mlockall=true
After a hour, es begins to become slow for query and from log i can
see lots of slow query, i paste some logs below and wish your help:
[2011-12-15 13:49:22,050][WARN ][index.search.slowlog.query]
[Nefarius] [dianxin][1] took[8.3s], took_millis[8329],
search_type[QUERY_THEN_FETCH], total_shards[2], source[{"from":
0,"size":1,"query":{"match_all":{}},"filter":{"bool":{"must":{"term":
{"pkgs":"recommendation.test.pkg.3"}},"must":{"term":
{"lcs":"recommendation.test.lc.3"}},"must":{"term":
{"nets":"1"}},"must":{"term":{"androidAPILevels":"9"}},"must":{"term":
{"status":1}},"must":{"range":{"from":{"from":null,"to":
1323928153712,"include_lower":true,"include_upper":false}}},"must":
{"range":{"to":{"from":
1323928153712,"to":null,"include_lower":false,"include_upper":true}}},"must":
{"range":{"hMax":{"from":
800,"to":null,"include_lower":true,"include_upper":true}}},"must":
{"range":{"hMin":{"from":null,"to":
800,"include_lower":true,"include_upper":true}}},"must":{"range":
{"wMax":{"from":
480,"to":null,"include_lower":true,"include_upper":true}}},"must":
{"range":{"wMin":{"from":null,"to":
480,"include_lower":true,"include_upper":true}}}}},"explain":false,"fields":"id"}
extra_source[],
the mapping are:
{
"test":{
"_all" : {
"enabled" : false
},
"properties" : {
"id":{
"type":"string",
"index":"not_analyzed",
"search_analyzer":"keyword",
"store":"yes"
},
"pkgs":{
"type":"string",
"index":"not_analyzed",
"search_analyzer":"keyword",
"store":"no"
},
"lcs":{
"type":"string",
"index":"not_analyzed",
"search_analyzer":"keyword",
"store":"no"
},
"from":{
"type":"long",
"index":"not_analyzed",
"store":"no"
},
"to":{
"type":"long",
"index":"not_analyzed",
"store":"no"
},
"status":{
"type":"integer",
"index":"not_analyzed",
"store":"no"
},
"nets" : {
"type" : "integer",
"index" : "not_analyzed",
"store":"no"
},
"androidAPILevels":{
"type" : "integer",
"index" : "not_analyzed",
"store":"no"
},
"hMin":{
"type" : "integer",
"index" : "not_analyzed",
"store":"no"
},
"hMax":{
"type" : "integer",
"index" : "not_analyzed",
"store":"no"
},
"wMin":{
"type" : "integer",
"index" : "not_analyzed",
"store":"no"
},
"wMax":{
"type" : "integer",
"index" : "not_analyzed",
"store":"no"
},
"models":{
"type" : "string",
"index": "analyzed",
"index_analyzer":"standardAnalyzer",
"search_analyzer":"standardAnalyzer",
"store":"no"
}
}
}
}