Skip to content

Commit ba9abc5

Browse files
committed
Update indexing speed recommendations around the refresh interval. (#40690)
We now need to update recommendations now that we have introduced the concept of "search idle" shards.
1 parent 37758bb commit ba9abc5

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

docs/reference/how-to/indexing-speed.asciidoc

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,24 @@ number of workers is. This can be tested by progressively increasing the
3636
number of workers until either I/O or CPU is saturated on the cluster.
3737

3838
[float]
39-
=== Increase the refresh interval
40-
41-
The default <<dynamic-index-settings,`index.refresh_interval`>> is `1s`, which
42-
forces Elasticsearch to create a new segment every second.
43-
Increasing this value (to say, `30s`) will allow larger segments to flush and
44-
decreases future merge pressure.
39+
=== Unset or increase the refresh interval
40+
41+
The operation that consists of making changes visible to search - called a
42+
<<indices-refresh,refresh>> - is costly, and calling it often while there is
43+
ongoing indexing activity can hurt indexing speed.
44+
45+
By default, Elasticsearch runs this operation every second, but only on
46+
indices that have received one search request or more in the last 30 seconds.
47+
This is the optimal configuration if you have no or very little search traffic
48+
(e.g. less than one search request every 5 minutes) and want to optimize for
49+
indexing speed.
50+
51+
On the other hand, if your index experiences regular search requests, this
52+
default behavior means that Elasticsearch will refresh your index every 1
53+
second. If you can afford to increase the amount of time between when a document
54+
gets indexed and when it becomes visible, increasing the
55+
<<dynamic-index-settings,`index.refresh_interval`>> to a larger value, e.g.
56+
`30s`, might help improve indexing speed.
4557

4658
[float]
4759
=== Disable refresh and replicas for initial loads

0 commit comments

Comments
 (0)