Insert/Update operations makes queries slow?

Hi

I am using elastic 1.7 (I know I should update, but it is currently not possible)

I have an index with the following setup:

  • ~70GB,
  • 4 shards
  • 2 replica
  • 1756260 documents

I have an ingestor, which inserts/updates ~25 documents/min - primarily updates.
When the ingestor is running queries takes ~5000ms, while they only take ~300ms when its not.

The refresh interval for the index is 30s.
It is only queries to the specific index (we have multiple other indices on the same nodes) which becomes slow.

My understanding of updates is, they delete and insert again, since documents are immutable.
But does it also do something else, which should influence the query time?
Like taking locks on shards or similar?

Hope someone can help, thanks.

What is leading to the increased latency? Increased CPU usage? Additional disk I/O? Increased iowait?

I have not registered any significant increase in CPU usage or disk I/O.
For the IOWait, there is a small increase in WritingIOWait, but not something which seems significant, and I would not expect it to influence queries, which are purely read. I would also expect queries to my other indices on the same nodes, to take longer time, if iowait was the reason - but I could very well be wrong :slight_smile:

Then it is probably cache related. Writing or updating documents will affect caching.

But is the refresh interval not the way to control that?

For future reference:

I narrowed the problem down to queries with aggregations.
The solution to my problem is mentioned here:

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