switch to parallel_bulk() #3426
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #3417
(I'm not going to say this solves the performance problems till I've confirmed it in production).
I tried everything! I wrote a whole framework for testing different settings and my poor MacBook's been burning a hole in the table from all this CPU work. I first experimented with
chunk_size. Thenmax_chunk_bytes. Then those in combination. Then I messed around withrefresh_intervalwhich requires a bit more attention and care because you have refresh after you're done indexing. Then I experimented withnumber_of_replicas. NOTHING WORKED! Only marginal improvements.One thing I did learn was that when you set
chunk_sizeabove 500 you can get ReadTimeout errors.But then, what REALLY made a huge difference was the simple discovery of using
parallel_bulkinstead ofstreaming_bulk. What a difference! You can see it here:In this testing I didn't use the entire build. Just the
en-usbuild. And I used the Elastic Dev server (from my laptop) which is after all, on the other side of America.Basically, the results are (median rate on Dev) that it's 2.6 times after to use parallel_bulk().