Search times out and incurs high CPU

(Guoxing Li) #1

Our es node is experiencing a search performance problem. A single search query to es (with no other load) could easily time out (30s) and the CPU can go > 100%. Is it because of the hardware problem? Here are some infos.

ES setup:
ES version: 5.2.2
Nodes: 1 node
Data size: ~8GB, ~800,000 docs
CPU: 2 core intel
Hard drive: non-SSD
ES heap: ~3.5GB

The search query is with highlighting. It's searching against an index with ~35,000 docs.

Hot threads output:

Any help is appreciated.

(Guoxing Li) #2

Anyone shed some light please?

(Mark Harwood) #3

If you highlight many results and looking to highlight multiple fields then the default highlighter is known to be expensive. In an effort to re-create the matching and scoring logic that went into producing each hit it does this pseudo code:

for each doc to be highlighted:
    for each field that needs highlighting:
       index field value into a temporary, in-memory index
       run query against in-memory index
       throw away in-memory index

You can see some of this in-memory indexing going on in your hot threads.

(Guoxing Li) #4

That does seem like a quite expensive operation. Will try to limit the usage of highlights and see if it helps. Thanks!

(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.