# Loading performance - what should I expect?

**URL:** <https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621>\
**Category:** Elasticsearch\
**Created:** [April 18, 2020, 7:28am UTC](https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621 "2020-04-18T07:28:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawmat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shawmat/32/66548_2.png) [@shawmat](https://discuss.elastic.co/u/shawmat)\
**Post date:** [April 18, 2020, 7:28am UTC](https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621/1 "2020-04-18T07:28:50Z")

</div>

This is Day 1 of me using elasticsearch so apologies for the basic question.

Line-by-line loading seems really slow, but I've no idea what to expect. I have 80 character text strings (lines of English words from books) and want to load about 400m of them as documents. But at 100 strings per second, this is nowhere near the speed I was expecting. However, the subsequent search on the first 5 million loaded is good.

I have a single node dev machine with SSD drive, 16Gb RAM running Ubuntu 18.04 and Elasticsearch 7.6.2. No other major jobs are running. The load is being done from Python.

I previously loaded the data into PostgreSQL in a few hours, which set my speed expectations. But, as you'd expect, the search performance wasn't good enough - hence looking at Elasticsearch.

I'll persevere is people say "yes, that's normal".

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 18, 2020, 7:31am UTC](https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621/2 "2020-04-18T07:31:26Z")

</div>

Have you followed [these guidelines](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/tune-for-indexing-speed.html), e.g. around using bulk requests of a suitable size?

---

<div class="post-metadata">

**Author:** ![shawmat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shawmat/32/66548_2.png) [@shawmat](https://discuss.elastic.co/u/shawmat)\
**Post date:** [April 18, 2020, 7:36am UTC](https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621/3 "2020-04-18T07:36:05Z")

</div>

Not yet - thanks for the pointer. I knew of bulk loading but wanted to get something simple working. I'll try it out.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [April 18, 2020, 7:37am UTC](https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621/4 "2020-04-18T07:37:15Z")

</div>

It generally makes a huge difference so we’ll worth using.

---

<div class="post-metadata">

**Author:** ![shawmat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shawmat/32/66548_2.png) [@shawmat](https://discuss.elastic.co/u/shawmat)\
**Post date:** [April 18, 2020, 11:47am UTC](https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621/5 "2020-04-18T11:47:16Z")

</div>

I've re-written my code to use bulk insertion - and achieved a speed-up of 150 times. So that was good advice - thanks. 15,000 documents per second.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 16, 2020, 11:47am UTC](https://discuss.elastic.co/t/loading-performance-what-should-i-expect/228621/6 "2020-05-16T11:47:24Z")

</div>

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