Hello, I'm doing searches in elasticsearch and I see many with high times,
some close to 4 seconds.
Configuration:
-OS:
CPU vendor: Intel
CPU model: Core(TM)2 Duo CPU T7700 @ 2.40GHz (2267 MHz)
CPU total cores: 8
CPU sockets: 1 with 6 cores each
CPU cache: 4kb
-Mem:
Refresh interval: 1000ms
Total mem: 31.4gb (33807208448 b)
Total swap: 0b (0 b)
-JVM:
VM name: Java HotSpot(TM) 64-Bit Server VM
VM vendor: Sun Microsystems Inc.
VM version: 20.1-b02
Java version: 1.6.0_26
3 nodes cluster
2 nodes for indexing and 2 nodes for searchs (with transport and client
connections respectively)
1 index with default settings (5 shards 2 replicas)
60 active shards in the cluster
approximately 100 documents indexed per second (routing by user_id)
ES_MIN_MEM = ES_MIN_MEM = 26g
The slow transactions log file(index_search_slow_log_file) shows the
following:
...
[2012-08-28 16:39:10,941][WARN ][index.search.slowlog.fetch] [Mimic]
[items][5] took[1s], took_millis[1018], search_type[QUERY_AND_FETCH],
total_shards[1],
source[{"from":0,"size":100,"query":{"constant_score":{"filter":{"and":{"filters":[{"term":{"seller_id":"104802919"}},{"range":{"date_created":{"from":"2012-06-29T20:39:09.876Z","to":"2012-08-28T20:39:09.876Z","include_lower":true,"include_upper":true}}}]}}}},"sort":[{"date_created":{"order":"desc"}}]}],
extra_source[],
[2012-08-28 16:39:50,319][WARN ][index.search.slowlog.fetch] [Mimic]
[items][15] took[1s], took_millis[1037], search_type[QUERY_AND_FETCH],
total_shards[1],
source[{"from":0,"size":100,"query":{"constant_score":{"filter":{"and":{"filters":[{"term":{"seller_id":"68777696"}},{"range":{"date_created":{"from":"2012-06-29T20:39:48.986Z","to":"2012-08-28T20:39:48.986Z","include_lower":true,"include_upper":true}}}]}}}},"sort":[{"date_created":{"order":"desc"}}]}],
extra_source[],
[2012-08-28 16:39:55,922][WARN ][index.search.slowlog.fetch] [Mimic]
[items][8] took[1s], took_millis[1095], search_type[QUERY_AND_FETCH],
total_shards[1],
source[{"from":0,"size":100,"query":{"constant_score":{"filter":{"and":{"filters":[{"term":{"seller_id":"23852555"}},{"range":{"date_created":{"from":"2012-06-29T20:39:54.780Z","to":"2012-08-28T20:39:54.780Z","include_lower":true,"include_upper":true}}}]}}}},"sort":[{"date_created":{"order":"desc"}}]}],
extra_source[],
[2012-08-28 16:40:06,141][WARN ][index.search.slowlog.fetch] [Mimic]
[items][4] took[1.3s], took_millis[1371], search_type[QUERY_AND_FETCH],
total_shards[1],
source[{"from":0,"size":100,"query":{"constant_score":{"filter":{"and":{"filters":[{"term":{"seller_id":"52416364"}},{"range":{"date_created":{"from":"2012-06-29T20:40:04.729Z","to":"2012-08-28T20:40:04.729Z","include_lower":true,"include_upper":true}}}]}}}},"sort":[{"date_created":{"order":"desc"}}]}],
extra_source[],
[2012-08-28 16:40:17,428][WARN ][index.search.slowlog.fetch] [Mimic]
[items][1] took[1.2s], took_millis[1241], search_type[QUERY_AND_FETCH],
total_shards[1],
source[{"from":0,"size":100,"query":{"constant_score":{"filter":{"and":{"filters":[{"term":{"seller_id":"32406782"}},{"range":{"date_created":{"from":"2012-06-29T20:40:16.072Z","to":"2012-08-28T20:40:16.072Z","include_lower":true,"include_upper":true}}}]}}}},"sort":[{"date_created":{"order":"desc"}}]}],
extra_source[],
....
I made an index optimization (run : curl -XPOST
'http://localhost:9200/items/_optimize?max_num_segments=3' ) this took about
3 hours,after that the search improved
but after a few hours occur again.
I attached pictures displayed by bigdesk. Your help will be very useful,
thanks!
Ana
--